Typescript language

27
Typescript language

Transcript of Typescript language

Page 1: Typescript language

Typescript language

Page 2: Typescript language

Agenda

▪ Introduction to language

▪ Javascript problems

▪ Typescript features

▪ How Typescript works

▪ What you need to get started

▪ Similar languages

▪ Statistics

▪ Demo

▪ What’s next?

▪ More information

2

Page 3: Typescript language

Introduction to language

▪ TypeScript is a free and open source programming language developed and maintained by Microsoft

▪ It is a strict superset of JavaScript, and adds optional static typing and class-based object-oriented programming to the language

▪ TypeScript is designed for development of large applications and transcompiles to JavaScript

▪ As TypeScript is a superset of JavaScript, any existing JavaScript programs are also validTypeScript programs.

▪ Appeared in 2012 October 1

▪ Current version 1.4

3

Page 4: Typescript language

Javascript problems. Dynamic types

4

Page 5: Typescript language

Javascript problems. Refactoring

5

Page 6: Typescript language

Javascript problems. Which pattern to use?

6

Page 7: Typescript language

Javascript problems. Inheritance

7

Page 8: Typescript language

8

Page 9: Typescript language

Typescript features. Strongly typed. IntelliSense

9

Page 10: Typescript language

Typescript features. Custom types

10

Page 11: Typescript language

Typescript features. Better refactoring

11

Page 12: Typescript language

Typescript features. Offers classes, modules, and interfaces

12

Page 13: Typescript language

How Typescript works

13

Page 14: Typescript language

14

Page 15: Typescript language

TFS build fix for typescript ~ 1.0

1. Within Visual Studio right click on your project and unload it.

2. Right click on the project again and edit the csproj.

3. Make sure that the Typescript import comes directly after Microsoft.CSharp.targets.

15

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />

Page 16: Typescript language

What you need to get started

16

Page 17: Typescript language

Similar languages

17

Page 18: Typescript language

Statistics. Project Size

18

10K LOC ~ jQuery 25K LOC ~ Angular

Page 19: Typescript language

Statistics. Usage

19

Page 20: Typescript language

Statistics. Project Types

20

Page 21: Typescript language

Statistics. Stackoverflow

21

Page 22: Typescript language

Statistics. Pluralsight

22

Page 23: Typescript language

Statistics. GitHub

▪ 4 121 commits

▪ 68 branches

▪ 4 releases

▪ 38 contributors

▪ 497 issues

▪ 25 pull requests

23

Page 24: Typescript language

Typescript demo

Using Visual Studio 2013, Resharper 9, Web essentials and Typescript 1.3

Page 25: Typescript language

What’s next?

▪ ECMAScript 6

▪ Typescript 2.0

▪ Typescript Roadmap

25

Page 26: Typescript language

More information

▪ http://www.typescriptlang.org/

26

Page 27: Typescript language