Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Warum TypeScript?
Search
Joshy Cyriac
September 18, 2015
Programming
0
150
Warum TypeScript?
Talk given at bed-con.org in Berlin 2015
Joshy Cyriac
September 18, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
20
7.6k
AIともっと楽するE2Eテスト
myohei
7
2.7k
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
180
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
780
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
180
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
780
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
2
18k
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
130
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
850
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
110
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
10
5.7k
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
230
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
How to train your dragon (web standard)
notwaldorf
96
6.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Practical Orchestrator
shlominoach
189
11k
Optimizing for Happiness
mojombo
379
70k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
Writing Fast Ruby
sferik
628
62k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
How to Ace a Technical Interview
jacobian
278
23k
Transcript
WARUM TYPESCRIPT? JOSHY CYRIAC @IRRWITZ FINEBRAIN.COM
UMFRAGE
ANFANG Java-Land JS-Land
TYPESCRIPT LÖSUNGEN FÜR 2 JS PROBLEME
PROBLEM EINS
module.exports = function extract(data, topic) { … } “article.js”
var article=require(‘article’); var item = require(‘item’); article.extract(data, ‘news’); item.extract(data, 12);
PROBLEM ZWEI
function extract( data, topic ) { … }
None
–from typescriptlang.org “Any browser. Any host. Any OS. Open Source.”
JS TS TS is a TYPED superset of JS
TS Files TS Compiler JS Files
PROBLEM EINS
module.exports = function extract(data, topic) { … } “article.js”
OPTIONAL TYPE SYSTEM
var answer: number = 4; var n: number[] = [1,
2, 3]; var city: string = “Berlin”; enum Color { Red, Green, Blue }; “basic.ts”
var answer = 4; var n = [1, 2, 3];
var city = “Berlin”; var Color; (function (Color) { … } “basic.js”
var foo: any; var foos: any[]; function log(msg): void {
… } var fAdd: (x: number, y: number)=>number; “func.ts”
var foo; var foos; function log(msg) { … } var
fAdd; “func.js”
FIND REFERENCE src/services/extractor.ts function extract(data: Article[], topic: string) src/services/storer.ts ArticleExtractor.extract(data,
defaultTopic)
PROBLEM ZWEI
function extract( data, topic ) { … }
INTERFACES
interface Article { _id: string; url: string; date?: Date; title:
string; text: string; }
function extract( data: Article[], topic: string) { … }
extract(articles, “bar”);“ ✔ extract(“foo”, “bar”); ✗ Argument of type “string”
is not assignable to parameter of type Article[] ^^^^^
MORE STUFF
Type Inference Classes Modules Default parameters Optional parameters Generics Union
Types Intersection Types
INTEGRATING 3RD PARTY LIBS / FRAMEWORKS
DefinitelyTyped
EDITOR SUPPORT
None
MIGRATION
> npm install -g typescript > mv *.js *.ts >
tsc -w -m commonjs server.ts
SUMMARY
PRO CONTRA Optional TYPE SYSTEM Compiles to plain JS Compile
Step ES5/(ES6) compatible
LINKS typescriptlang.org http://basarat.gitbooks.io/typescript/