TypeScript

37
TypeScript Language Serdar Sert | Software Infrastructure TypeScript

Transcript of TypeScript

Page 1: TypeScript

TypeScript Language

Serdar Sert | Software Infrastructure

TypeScript

Page 2: TypeScript

AGENDA

What’s JavaScript

What’s TypeScript ?

Why TypeScript ?

Features

Development Environment

Language Specification (Demo)

Alternatives

Page 3: TypeScript

JAVASCRIPT

What’s JavaScript ? JavaScript is the most

popular programming language in the world.

Page 4: TypeScript

What’s JavaScript ?

Page 5: TypeScript

What’s JavaScript ?

Page 6: TypeScript

What’s JavaScript ?

Page 7: TypeScript

What’s JavaScript ?

JavaScript is a programming language used to make web pages interactive.

Page 8: TypeScript

What’s JavaScript ?

JavaScript was really never designed to be a programming language. It’s a scripting language.

Page 9: TypeScript

JAVASCRIPT

Page 10: TypeScript

What’s Good About JAVASCRIPT?

It’s everywhere

Page 11: TypeScript

What’s Good About JAVASCRIPT?

Huge amount of libraries

Page 12: TypeScript

What’s Good About JAVASCRIPT?

Flexible

Page 13: TypeScript

JAVASCRIPT

Page 14: TypeScript

JAVASCRIPT

What’s wrong in JavaScript ?

Page 15: TypeScript

What’s wrong in JAVASCRIPT?

Dynamic typing

Page 16: TypeScript

What’s wrong in JAVASCRIPT?

Lack of modularity

Page 17: TypeScript

TYPESCRIPT

TypeScript is an open source language and compiler written by Microsoft.

Adds optional static typing and class-based object oriented programming to the javascript language

Page 18: TypeScript

TYPESCRIPT

He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Microsoft as the lead architect of C# and core developer on TypeScript. Anders Hejlsberg

Page 19: TypeScript

TYPESCRIPT

What Is TypeScript? Superset of JavaScript Contains all of

JavaScript. And much more !

Page 20: TypeScript

What’s TypeScript?

Transpile ES6 to ES5

Page 21: TypeScript

What’s TypeScript?

ES5

Page 22: TypeScript

What’s TypeScript?

ES6

Page 23: TypeScript

What’s TypeScript?

Leverage some future(ES7) features

Page 24: TypeScript

What’s TypeScript?

Compiles to plain JavaScript

Page 25: TypeScript

What’s TypeScript?

No special runtime

Page 26: TypeScript

What’s TypeScript?

Any browser. Any host. Any OS.

Page 27: TypeScript

What’s TypeScript?

Open Source.

Page 28: TypeScript

Why TypeScript?

TypeScript works

with all JavaScript

frameworks,

libraries.

Page 29: TypeScript

Why TypeScript?

Strong Typing Catch errors at compile time. Better tooling (refactoring,

autocomplete,intellisense) Explicitly express intent

Page 30: TypeScript

What’s TypeScript?

Class-based object orientation

tscmainController.tsvar x: number;class mainController { }

mainController.jsvar x;function mainController { }

cscmainController.cs mainController.dll

Page 31: TypeScript

Why TypeScript?

At Development Time Better type checking More powerful refactoring experience Class-based object oriented programming

techniques

At Deployment Time It’s just JavaScript

Page 32: TypeScript

Development Environment

Node.jsThe command-line TypeScript compiler can be installed as a Node.js package.

npm install -g typescript

tsc helloworld.ts

ToolsVisual Studio includes TypeScript in the box, starting with Visual Studio 2013 Update 2. You can also edit TypeScript in VS Code, WebStorm, Atom,Sublime Text, and Eclipse.

Open SourceTypeScript is being developed on GitHub. The TypeScript compiler is implemented in TypeScript, and can be used in any JavaScript host.

Page 33: TypeScript

Language Specification

DEMO

Page 34: TypeScript

Alternatives

http://coffeescript.org/ https://www.dartlang.org/

AtScript

Page 35: TypeScript

Friends Of TypeScript

Page 36: TypeScript

Any Questions ?

Page 37: TypeScript

THANK YOU