29
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

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 – обзор

Embed Size (px)

Citation preview

Page 1: 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 – обзор

11 июля 2015

As true as steel to your desire

You come with just an idea -we make great software for you!

TrustTeamwork

Transparency

TypeScript – обзорАлександр Шевнин - Arcadia

Page 2: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 2

О себе

Александр ШевнинМенеджер направления, JSC “Arcadia Inc.”[email protected]

В Аркадии с 2012-го года, последние полтора года работаю в основном с C#, AngularJS и TypeScript

Page 3: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 3

TypeScript

• Designed by Microsoft

• Author: Anders Hejlsberg (C#, Delphi, Turbo Pascal)

• First appeared: October 1, 2012

• License: Apache License 2.0

Page 4: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 4

TypeScript

• Strict superset of JavaScript

• Strongly-typed

• ECMAScript6 oriented

• Produces valid ES3, ES5 or ES6 code

Page 5: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 5

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

Page 6: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 6

History

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

Page 7: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 7

ES6 compatibility

Feb 2015 Today (TS 1.5-beta)

Page 8: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 8

Let’s move to Features!

Page 9: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 9

Type Checking

Page 10: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 10

Classes

Page 11: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 11

Classes

Page 12: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 12

Classes

Page 13: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 13

Compiles to…

Page 14: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 14

Or to… ES6

Page 15: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 15

Access Modifiers

• Public

• Private

• Protected (since 1.3)

Page 16: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 16

Properties

Page 17: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 17

Classes inheritance

Page 18: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 18

Generics (since 0.9)

Page 19: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 19

Interfaces

Page 20: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 20

Arrow functions

Page 21: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 21

Modules

Page 22: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 22

1.3 - 1.4 small joys…

Page 23: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 23

Union Types

Page 24: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 24

1.5 Changes (inspired by Google AtScript)

Page 25: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 25

Decorators (ES7 proposal, magic)

Page 26: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 26

Using JavaScript libraries

• d.ts

• Github/DefinitelyTyped

Page 27: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 27

AngularJS: Services & Controllers

Page 28: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 28

AngularJS 2.0 – Written in TypeScript

Page 29: 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 – обзор

© Copyright JSC “Arcadia, Inc.” 29

Вопросы

• Email: [email protected]