Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Connect /7/ :18 AM

Similar presentations


Presentation on theme: "Microsoft Connect /7/ :18 AM"— Presentation transcript:

1 Microsoft Connect 2016 12/7/2018 12:18 AM
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 TypeScript 2.0 & 2.1 Daniel Rosenwasser TypeScript 2.0 & 2.1

3 TypeScript 2.0 Features Non-Nullable Types Modularized lib.d.ts
12/7/ :18 AM TypeScript 2.0 Features Non-Nullable Types Modularized lib.d.ts Easier .d.ts File Workflow Tagged Unions Glob Support in tsconfig.json Explicit this Types For Functions © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4 TypeScript 2.0 Features Non-Nullable Types Easier .d.ts File Workflow
12/7/ :18 AM TypeScript 2.0 Features Non-Nullable Types Worry less with stronger types using --strictNullChecks Easier .d.ts File Workflow Fetching declaration files gets easier Tagged Unions Model common JavaScript idioms and functional styles © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 Nullable types number string boolean 1 "a" "b" true false 2 42 0.25
1 "a" "b" true false 2 42 0.25 "password123" undefined undefined undefined null null null

6 Non-Nullable types number string boolean 1 "a" "b" true false 2 42
1 "a" "b" true false 2 42 0.25 "password123" undefined undefined undefined null null null

7 Non-Nullable types number string boolean 1 "a" "b" true false 2 42
1 "a" "b" true false 2 42 0.25 "password123" null undefined

8 Non-Nullable types number string boolean undefined null 1 "a" "b" true
1 "a" "b" true false 2 42 0.25 "password123" undefined null null undefined

9 Non-Nullable types number | undefined number undefined 1 2 42 0.25 …
1 2 42 0.25 undefined undefined

10 Making .d.ts Files Easy to Get
npm install -g typings typings install --global lodash [edit tsconfig.json]

11 Making .d.ts Files Easy to Get
npm install -g typings typings install --global lodash [edit tsconfig.json]

12 Making .d.ts Files Easy to Get
npm install

13 Demo Microsoft Connect 2016 12/7/2018 12:18 AM
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 TypeScript 2.1 Features Async Functions (async/await)
12/7/ :18 AM TypeScript 2.1 Features Async Functions (async/await) Write your asynchronous code elegantly Improved Type Inference Smart inference means fewer implicit ‘any‘ types Better Editor Support Model common JavaScript idioms and functional styles © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 Asynchronous Functions
12/7/ :18 AM Asynchronous Functions function contains(word: string) { return readFile("worldlist").then( contents => contents .split(/\r?\n/) .indexof(word) >= 0) } © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 Asynchronous Functions
12/7/ :18 AM Asynchronous Functions async function contains(word: string) { let contents = await readFile("worldlist"); return contents split(/\r?\n/) .indexOf(word) >= 0; } © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17 Demo Microsoft Connect 2016 12/7/2018 12:18 AM
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

18 Resources Visit us at https://www.typescriptlang.org/
12/7/ :18 AM Resources Visit us at Reach out to us on GitHub Follow us on Twitter @typescriptlang © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19


Download ppt "Microsoft Connect /7/ :18 AM"

Similar presentations


Ads by Google