Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Angular 2 use the .ts file extension?

Why is the .ts file extension used in Angular 2?

like image 837
Ismail H Avatar asked Sep 16 '16 14:09

Ismail H


People also ask

What is the .TS file extension?

A TS file is a type of video stream file. It's used to store video content on DVD and Blu-ray discs. It makes use of standard MPEG compression in order to compress video data, mostly being used for saving streamed or broadcast video content.

Is it mandatory to use TypeScript in Angular?

Typescript is optional, but strongly recommended.

When did Angular start using TypeScript?

Programmer adoption is key to every language's survival, and according to Ryan Cavanaugh, Microsoft's engineering lead for TypeScript, a pivotal moment on that front happened in 2015 when Google decided Angular 2 would be built using TypeScript.

What do I do with a .TS file?

A TS file is a Video Transport Stream (TS) file that stores video data compressed with standard MPEG-2 (. MPEG) video compression. The TS format is often utilized for saving video on a DVD disc but may also be used to store streamed or broadcast video. You will most likely encounter TS files on DVDs.


1 Answers

The .ts extension is used by TypeScript. Angular 2 does not really use the .ts extension. The code produced by the TypeScript compiler will be JavaScript with the .js extension. You can also use Dart as a development language that will still produce JavaScript code. If you feel like avoiding TypeScript or Dart, you can use plain JavaScript for developing Angular 2 applications.

With TypeScript you get some options that are not available to you in plain JavaScript. The definition of TypeScript from its web site is:

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript

To lean more about TypeScript visit its web site.

like image 138
Husein Roncevic Avatar answered Oct 10 '22 20:10

Husein Roncevic