TypeScript Features

TypeScript Features

TypeScript is a language extension that adds features to ECMAScript 5. TypeScript has many features.

Compatibility with JavaScript
TypeScript is a strict superset of ECMAScript 2015, which is itself a superset of ECMAScript 5, commonly referred to as JavaScript. As such, a JavaScript program is also a valid TypeScript program, and a TypeScript program can seamlessly consume JavaScript. By default the compiler targets ECMAScript 5, the current prevailing standard, but is also able to generate constructs used in ECMAScript 3 or 2015.

With TypeScript, it is possible to use existing JavaScript code, incorporate popular JavaScript libraries, and call TypeScript-generated code from other JavaScript. Type declarations for these libraries are provided with the source code.

Type annotations
TypeScript provides static typing through type annotations to enable type checking at compile time. This is optional and can be ignored to use the regular dynamic typing of JavaScript.

Additional TypeScript features include:
Type annotations and compile-time type checking
Type inference
Type erasure
Interfaces
Enumerated type
Mixin
Generic
Namespaces
Tuple
Await

The following features are backported from ECMAScript 2015:

Classes
Modules
Abbreviated “arrow” syntax for anonymous functions
Optional parameters and default parameters

Syntactically, TypeScript is very similar to JScript .NET, another Microsoft implementation of the ECMA-262 language standard that added support for static typing and classical object-oriented language features such as classes, inheritance, interfaces, and namespaces.

 

IT Professionals, Web Developers, Web Programmers, IT students can Apply for the certification course to move ahead in their careers.

Angular 4 Tutorial IndexBack to Angular 4 Tutorial Main Page

TypeScript tsc
TypeScript Classes

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?