11 июля 2015 As true as steel to your desire You come with just an idea - we make great software for you! Trust Teamwork Transparency TypeScript – обзор Александр Шевнин - Arcadia
© Copyright JSC “Arcadia, Inc.” О себе 2 Александр Шевнин Менеджер направления, JSC “Arcadia Inc.” В Аркадии с 2012-го года, последние полтора года работаю в основном с C#, AngularJS и TypeScript
© Copyright JSC “Arcadia, Inc.” TypeScript Designed by Microsoft Author: Anders Hejlsberg (C#, Delphi, Turbo Pascal) First appeared: October 1, 2012 License: Apache License 2.0 3
© Copyright JSC “Arcadia, Inc.” TypeScript Strict superset of JavaScript Strongly-typed ECMAScript6 oriented Produces valid ES3, ES5 or ES6 code 4
© Copyright JSC “Arcadia, Inc.” IDE/tools support Visual Studio – native (+msbuild) ReSharper – included IntelliJ IDEA Sublime Text 2/3 – official plugin as a part of 1.5 release Online Cloud9 IDE Eclipse IDE Grunt, Maven, Gradle plugins 5
© Copyright JSC “Arcadia, Inc.” History 6 10/2012 v0.8 6/2013 v0.9 4/2014 v1.0 9/2014 v1.1 10/2014 v1.3 1/2015 v1.4 4/2015 v1.5beta
© Copyright JSC “Arcadia, Inc.” ES6 compatibility 7 Feb 2015 Today (TS 1.5-beta)
© Copyright JSC “Arcadia, Inc.” Let’s move to Features! 8
© Copyright JSC “Arcadia, Inc.” Type Checking 9
© Copyright JSC “Arcadia, Inc.” Classes 10
© Copyright JSC “Arcadia, Inc.” Classes 11
© Copyright JSC “Arcadia, Inc.” Classes 12
© Copyright JSC “Arcadia, Inc.” Compiles to… 13
© Copyright JSC “Arcadia, Inc.” Or to… ES6 14
© Copyright JSC “Arcadia, Inc.” Access Modifiers Public Private Protected (since 1.3) 15
© Copyright JSC “Arcadia, Inc.” Properties 16
© Copyright JSC “Arcadia, Inc.” Classes inheritance 17
© Copyright JSC “Arcadia, Inc.” Generics (since 0.9) 18
© Copyright JSC “Arcadia, Inc.” Interfaces 19
© Copyright JSC “Arcadia, Inc.” Arrow functions 20
© Copyright JSC “Arcadia, Inc.” Modules 21
© Copyright JSC “Arcadia, Inc.” small joys… 22
© Copyright JSC “Arcadia, Inc.” Union Types 23
© Copyright JSC “Arcadia, Inc.” 1.5 Changes (inspired by Google AtScript) 24
© Copyright JSC “Arcadia, Inc.” Decorators (ES7 proposal, magic) 25
© Copyright JSC “Arcadia, Inc.” Using JavaScript libraries d.ts Github/DefinitelyTyped 26
© Copyright JSC “Arcadia, Inc.” AngularJS: Services & Controllers 27
© Copyright JSC “Arcadia, Inc.” AngularJS 2.0 – Written in TypeScript 28
© Copyright JSC “Arcadia, Inc.” Вопросы 29