2. We will talk about
○ What is TypeScript?
○ Motivation
○ Brief history
○ Main features
○ Conclusions
2
3. What is TypeScript?
“TypeScript is a free and open source programming
language developed and maintained by Microsoft.
It is a strict superset of JavaScript, and adds optional
static typing and class-based object-oriented
programming to the language.” (Definition by Wiki)
TypeScript transpiles to pure JavaScript.
3
4. 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.
4
6. Brief history
○ 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
23. Declaration Merging - Modules & Classes
Exporting of module members into a class:
23
24. Declaration Merging - Modules & Enums / Functions
In the same way,
24
Module
- Members
Enum
Enum object with static
members
Function
Function object with
static members
25. Declaration file (.d.ts)
Without this file - TypeScript transpiler will not
recognize the code of external JavaScript library.
Actually, it guides the transpiler how to structure the
code and it provides the desired “type annotation”.
Download or build your own.
25