TypeScript starts from the same syntax and semantics that millions of JavaScript developers know today. Use existing JavaScript code, incorporate popular JavaScript libraries, and call TypeScript code from JavaScript.
TypeScript compiles to clean, simple JavaScript code which runs on any browser, in Node.js, or in any JavaScript engine that supports ECMAScript 3 (or newer).
Examples: ttps://gist.github.com/dimitardanailov/0381a4e502c86c8ec21e
Additional resources: http://www.developerhandbook.com/typescript/writing-angularjs-1-x-with-typescript/
7. The feature gap
Javascript
Evolution
ES3 ES5
ES
2015
ES
2016
ES
2017
ES
2018
ES
2019
State of the
art JS
State of
Server JS
State of
Web JS
2015
JavaScript feature gapTarget Productivity
8. The feature gap
Javascript
Evolution
ES3 ES5
ES
2015
ES
2016
ES
2017
ES
2018
ES
2019
State of the
art JS
State of
Server JS
State of
Web JS
2016
Target ProductivityJavaScript feature gap
22. New features
EcmaScript 2015 support
tsconfig.json files
TS Server language service
Decorators
Local types
Generic type aliases
User defined type guard functions
JSX support
Intersection types
Abstract classes and methods
ES2016 exponentiation operator
Polymorphic this type
Async/await
this-based type guards
Improved checking of for-in statements
Reachability analysis
Checking of destructuring with literal
initializers
JavaScript in TypeScript compilations
String literal types
Sateless function components in JSX
Support for F-bounded polymorphism
JSDoc support in JavaScript files
Support for default import interop with
SystemJS
Recognize constructor functions in
JavaScript files
Module augmentations
Support for custom JSX factories
Non-nullable types
24. Union types
0 1 2 42 0.25
number
‘a’, ‘b’, ‘hello’
string
null
null
number | string | null
25. “We love TypeScript for many things… With
TypeScript, several of our team members have
said things like 'I now actually understand most of
our own code!' because they can easily traverse it
and understand relationships much better. And
we’ve found several bugs via TypeScript’s checks.”
— Brad Green, Engineering Director - AngularJS
26. “One of Ionic's main goals is to make app
development as quick and easy as possible, and
the tooling support TypeScript gives us with
autocompletion, type checking and source
documentation really aligns with that.”
— Tim Lancina, Tooling Developer - Ionic