TypeScript
-
Upload
software-infrastructure -
Category
Technology
-
view
170 -
download
0
Transcript of TypeScript
![Page 1: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/1.jpg)
TypeScript Language
Serdar Sert | Software Infrastructure
TypeScript
![Page 2: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/2.jpg)
AGENDA
What’s JavaScript
What’s TypeScript ?
Why TypeScript ?
Features
Development Environment
Language Specification (Demo)
Alternatives
![Page 3: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/3.jpg)
JAVASCRIPT
What’s JavaScript ? JavaScript is the most
popular programming language in the world.
![Page 4: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/4.jpg)
What’s JavaScript ?
![Page 5: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/5.jpg)
What’s JavaScript ?
![Page 6: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/6.jpg)
What’s JavaScript ?
![Page 7: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/7.jpg)
What’s JavaScript ?
JavaScript is a programming language used to make web pages interactive.
![Page 8: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/8.jpg)
What’s JavaScript ?
JavaScript was really never designed to be a programming language. It’s a scripting language.
![Page 9: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/9.jpg)
JAVASCRIPT
![Page 10: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/10.jpg)
What’s Good About JAVASCRIPT?
It’s everywhere
![Page 11: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/11.jpg)
What’s Good About JAVASCRIPT?
Huge amount of libraries
![Page 12: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/12.jpg)
What’s Good About JAVASCRIPT?
Flexible
![Page 13: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/13.jpg)
JAVASCRIPT
![Page 14: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/14.jpg)
JAVASCRIPT
What’s wrong in JavaScript ?
![Page 15: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/15.jpg)
What’s wrong in JAVASCRIPT?
Dynamic typing
![Page 16: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/16.jpg)
What’s wrong in JAVASCRIPT?
Lack of modularity
![Page 17: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/17.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/18.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/19.jpg)
TYPESCRIPT
What Is TypeScript? Superset of JavaScript Contains all of
JavaScript. And much more !
![Page 20: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/20.jpg)
What’s TypeScript?
Transpile ES6 to ES5
![Page 21: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/21.jpg)
What’s TypeScript?
ES5
![Page 22: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/22.jpg)
What’s TypeScript?
ES6
![Page 23: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/23.jpg)
What’s TypeScript?
Leverage some future(ES7) features
![Page 24: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/24.jpg)
What’s TypeScript?
Compiles to plain JavaScript
![Page 25: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/25.jpg)
What’s TypeScript?
No special runtime
![Page 26: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/26.jpg)
What’s TypeScript?
Any browser. Any host. Any OS.
![Page 27: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/27.jpg)
What’s TypeScript?
Open Source.
![Page 28: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/28.jpg)
Why TypeScript?
TypeScript works
with all JavaScript
frameworks,
libraries.
![Page 29: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/29.jpg)
Why TypeScript?
Strong Typing Catch errors at compile time. Better tooling (refactoring,
autocomplete,intellisense) Explicitly express intent
![Page 30: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/30.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/31.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/32.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/33.jpg)
Language Specification
DEMO
![Page 34: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/34.jpg)
Alternatives
http://coffeescript.org/ https://www.dartlang.org/
AtScript
![Page 35: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/35.jpg)
Friends Of TypeScript
![Page 36: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/36.jpg)
Any Questions ?
![Page 37: TypeScript](https://reader036.fdocuments.in/reader036/viewer/2022070603/5872ed731a28abfa548b77ff/html5/thumbnails/37.jpg)
THANK YOU