We will talk about
○ What is TypeScript?
○ Brief history
○ Main features
What is TypeScript?
“TypeScript is a free and open source programming
language developed and maintained by Microsoft.
static typing and class-based object-oriented
programming to the language.” (Definition by Wiki)
The meaning of transpiling
Compilation - taking source code written in one
language and transforming into another.
For example: C# -> IL.
Transpilation - taking source code written in one
language and transforming into another language
that has a similar level of abstraction.
For example: C++ -> C, Sass / LESS -> CSS.
○ Syntax checking
○ Code completion
○ Type annotations
○ ES6 support
○ Help us preparing for AngularJS 2.0
○ 2010 - Microsoft started internal development.
○ 2012 - First release (0.8) of TypeScript.
It was supported in Visual Studio only.
○ 2013 - Next release (0.9) for supporting other IDE’s.
○ 2014 - TypeScript 1.0 was released.
Meanwhile, AtScript was announced by Google.
○ 2015 - Microsoft and Google announced that AtScript
development was abandoned and that features of
AtScript would be implemented in TypeScript. 6
Declaration Merging - Interfaces
The following are equal:
Declaration Merging - Modules
In similar way, the following are equal:
Declaration Merging - Modules & Classes
Exporting of module members into a class:
Declaration Merging - Modules & Enums / Functions
In the same way,
Enum object with static
Function object with
Declaration file (.d.ts)
Without this file - TypeScript transpiler will not
Actually, it guides the transpiler how to structure the
code and it provides the desired “type annotation”.
Download or build your own.