Typescript
Topics Today
● What is Typescript ?
● Installation
● Demo Session
● Typescript Benefits
What is
Typescript ?
TypeScript: JavaScript that scales
A statically typed superset
of JavaScript that compiles
to plain JavaScript
Any browser.
Any host.
Any OS.
Open Source.
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
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
Installation
npm install -g typescript
tsc helloworld.ts
npm install -g typings
Typescript
Benefits
Object
Oriented
programming
.Net Developers
Large teams and applications
Switch between
es5 and es6
The TypeScript
Definition
Manager
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
0 1 2 42 0.25
‘a’, ‘b’, ‘hello’
true or false
number
string
boolean
undefined
undefined
null
null
Non-nullable types
Union types
0 1 2 42 0.25
number
‘a’, ‘b’, ‘hello’
string
null
null
number | string | null
“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
“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
Questions

Typescript - MentorMate Academy

  • 1.
  • 2.
    Topics Today ● Whatis Typescript ? ● Installation ● Demo Session ● Typescript Benefits
  • 3.
  • 4.
  • 5.
    A statically typedsuperset of JavaScript that compiles to plain JavaScript
  • 6.
  • 7.
    The feature gap Javascript Evolution ES3ES5 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 ES3ES5 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
  • 9.
  • 10.
    npm install -gtypescript
  • 11.
  • 12.
  • 14.
  • 15.
  • 17.
  • 18.
    Large teams andapplications
  • 19.
  • 20.
  • 22.
    New features EcmaScript 2015support 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
  • 23.
    0 1 242 0.25 ‘a’, ‘b’, ‘hello’ true or false number string boolean undefined undefined null null Non-nullable types
  • 24.
    Union types 0 12 42 0.25 number ‘a’, ‘b’, ‘hello’ string null null number | string | null
  • 25.
    “We love TypeScriptfor 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'smain 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
  • 27.