Download presentation
Presentation is loading. Please wait.
Published byBeatrice Miles Modified over 6 years ago
1
Microsoft Build 2016 11/22/2018 6:07 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
What’s New in TypeScript?
B881 What’s New in TypeScript? Anders Hejlsberg Technical Fellow
3
TypeScript: JavaScript that scales.
4
A statically typed superset of JavaScript that compiles to plain JavaScript.
5
Any browser. Any host. Any OS.
6
Open Source.
7
Great tools enabled by static types Features from the future, today!
8
JavaScript feature gap
The feature gap JavaScript Evolution ES3 ES5 ES2016 ES2017 ES2018 ES2015 State of web JS State of server JS State of the art JS JavaScript feature gap Target Productivity March 2015 March 2016
9
Demo
10
One year, four releases 1.8 1.7 1.6 JavaScript in TS projects + control flow analysis 1.5 Async/await on server + polymorphic ‘this’ types Full ES React/JSX Core ES Decorators
11
New features ECMAScript 2015 support Reachability analysis
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 exponentation operator Polymorphic this type Async/await Reachability analysis Checking of destructuring with literal initializers JavaScript in TypeScript compilations String literal types Stateless Functional 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 this-based type guards Support for custom JSX factories Improved checking of for-in statements
12
Demo
13
TypeScript roadmap TypeScript 2.0 TypeScript 2.1 and beyond
Non-nullable types Control flow based type analysis Async/await downlevel support Readonly properties Declared ‘this’ type in functions Improved typings acquisition TypeScript 2.1 and beyond New JS language service in Visual Studio More refactoring support Improved support for ‘this’ in functions And much more…
14
Nullable types string boolean number 'a' '' 1 'hello' 'b' '42' true …
1 'hello' 'b' '42' true … false 42 2 0.25 … undefined null undefined undefined null null
15
Nullable types string boolean number number | string 'a' '' 1 'hello'
1 'hello' 'b' '42' true … false 42 2 0.25 … undefined null undefined undefined null null number | string
16
Nullable types string boolean number 'a' '' 1 'hello' 'b' '42' true …
1 'hello' 'b' '42' true … false 42 2 0.25 … undefined null undefined undefined null null
17
Non-nullable types string boolean number 'a' '' 1 'hello' 'b' '42'
1 'hello' 'b' '42' true … false 42 2 0.25 … undefined null undefined undefined null null
18
Non-nullable types string boolean number null undefined 'a' '' 1
1 'hello' 'b' '42' true … false 42 2 0.25 … null undefined null undefined
19
Non-nullable types number number | undefined undefined 1 42 2 0.25 …
1 42 2 0.25 … undefined undefined
20
string | null | undefined
Non-nullable types string | null | undefined string 'a' '' 'hello' 'b' '42' … null undefined null undefined
21
Demo
22
Non-nullable and control flow based types
New --strictNullChecks compiler flag Definite assignment analysis Control flow reflected in types of local variables Non-null and non-undefined type guards Dotted names in type guards Non-null assertion operator (postfix ‘!’) Backwards compatibility GitHub pull request #7140
23
Improved typings acquisition
Uses NPM to install “type declaration packages” For example “npm NPM automatically handles dependencies Automatic publishing from DefinitelyTyped on GitHub New “Universal Module Declarations” (pull request #7264) New /// <reference types="jquery"/> directive New “types” property in tsconfig.json Version conflict detection for global typings
24
TypeScript tools Visual Studio Sublime Text Atom WebStorm
Visual Studio Code Eclipse Emacs Vim
25
TypeScript community GitHub Stack Overflow Definitely Typed
3,800+ commits in the last year 1,200+ forks 10,000+ stars Stack Overflow 8,000+ questions, up more than 2x in the last year Definitely Typed 1,600+ .d.ts declaration files, up 2x in the last year
26
TypeScript adoption
28
TypeScript and frameworks
“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.” -- Brad Green, Engineering Director at Google “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 at Ionic “TypeScript helped us to reuse the team’s knowledge and to keep the same team velocity by providing the same excellent developer experience as C# ... A huge improvement over plain JavaScript.” -- Valio Stoychev, PM Lead NativeScript “By combining Aurelia with TypeScript for modern web, mobile and desktop development, we've seen what is perhaps the most beautiful and elegant app development workflow to date.” -- Rob Eisenberg, Architect - Aurelia “TypeScript has helped ensure that Dojo 2 will be built on rock solid foundations, which will make enterprise development better. TS gives us all the benefits of ES6, plus more productivity, … and responsive support from the TypeScript team ” -- Dylan Schiemann, Co-founder - Dojo Toolkit, CEO - SitePen
30
Please Complete An Evaluation Form Your input is important!
11/22/2018 Please Complete An Evaluation Form Your input is important! or © 2016 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
31
11/22/2018 6:07 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.