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
TypeScriptの型定義が JavaScriptのバグを駆逐する
Search
Tetsuya Negishi
February 22, 2019
Programming
3
880
TypeScriptの型定義が JavaScriptのバグを駆逐する
Tetsuya Negishi
February 22, 2019
Tweet
Share
More Decks by Tetsuya Negishi
See All by Tetsuya Negishi
SOLIDから考える良いコンポーネントの設計原則
tetsuyanegishi
1
1.3k
React Hooksで美しいコードを書く / Writing beautiful code using React Hooks
tetsuyanegishi
0
170
React初学者が知らない コンポーネント分割テクニック
tetsuyanegishi
1
460
AWS Amplifyで作るサーバーレスバックエンド
tetsuyanegishi
3
1.7k
リアルタイムデータベース Cloud Firestore入門
tetsuyanegishi
10
8.5k
ブロックチェーンのマイニングとはなにか
tetsuyanegishi
1
74
スクラム開発の手法と実例
tetsuyanegishi
0
220
Other Decks in Programming
See All in Programming
RubyLSPのマルチバイト文字対応
notfounds
0
120
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
880
役立つログに取り組もう
irof
28
9.6k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
EventSourcingの理想と現実
wenas
6
2.3k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
CSC509 Lecture 11
javiergs
PRO
0
180
Remix on Hono on Cloudflare Workers
yusukebe
1
280
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Featured
See All Featured
Building Your Own Lightsaber
phodgson
103
6.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
What's in a price? How to price your products and services
michaelherold
243
12k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
How to train your dragon (web standard)
notwaldorf
88
5.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Become a Pro
speakerdeck
PRO
25
5k
Transcript
TypeScriptͷܕఆ͕ٛ JavaScriptͷόάΛۦஞ͢Δ ࠜ؛ప
ࣗݾհ • ࠜ؛ప • ϥϯαʔζגࣜձࣾ • ৽نࣄۀ • ओʹϑϩϯτ·ΘΓ୲ •
ڵຯؔ৺ • React, Vue.js, TypeScript • αʔόʔϨε
ࠓ͢͜ͱ • ৽ϓϩμΫτʹTypeScriptΛಋೖͯ͠ΈͯͲ͏͔ͩͬͨ • TypeScriptͪΌΜͱܕఆٛ͢Ε࠷ߴ • ͋Γ͕ͱ͏TypeScript
ϥϯαʔζͷϑϩϯτΤϯυٕज़ͷมભ 2008 ~ ݱࡏ 2015 ~ ݱࡏ 2018 ~ ݱࡏ
2017 ~ 2018
ϥϯαʔζͷϑϩϯτΤϯυٕज़ͷมભ 2008 ~ ݱࡏ 2015 ~ ݱࡏ 2018 ~ ݱࡏ
2016 ~ 2018
TypeScriptΛͬͯΘ͔ͬͨ͜ͱ ܕఆٛʹΑͬͯόά͕ܹݮ ͪΌΜͱܕఆٛ͠ͳ͍ͱόάΔ
None
JavaScriptͰΑ͘ى͖Δόά
JavaScriptͰΑ͘ى͖Δόά data ʹ number ͷྻΛೖΕΔ → Ұ࣌తʹundefind͕ೖΔύλʔϯ͕͋ͬͨ → <Graph>undefindΛఆ͓ͯ͠ΒͣΤϥʔ ReactͰΓ͕ͪ
Τϥʔ
JavaScriptͰΑ͘ى͖Δόά data ʹ Object ΛೖΕΔ → Ұ࣌తʹundefind͕ೖΔύλʔϯ͕͋ͬͨ → <Graph>undefindΛఆ͓ͯ͠ΒͣΤϥʔ ReactͰͷΤϥʔ΄΅͜ͷύλʔϯͷؾ͕͢Δ
Τϥʔ TypeScriptͰൃੜ͠ͳ͍
TypeScriptͰܕఆٛͨ͠߹
TypeScriptͰܕఆٛͨ͠߹ ? → undefinedΛڐ͢
TypeScriptͰܕఆٛͨ͠߹ propsͷܕ͕ܾ·Δ
TypeScriptͰܕఆٛͨ͠߹ data number[] ͱఆٛ͞Ε͍ͯͨͱ͢Δ
TypeScriptͰܕఆٛͨ͠߹ ͜ͷ࣌Ͱ·ͩΤϥʔ → <Graph>ʹ͢ data ͕ undefinedͰ͋ΔՄೳੑ͕͋Δ
TypeScriptͰܕఆٛͨ͠߹ undefinedͷνΣοΫ Τϥʔ͕ग़ͳ͘ͳΔ
TypeScriptͰܕఆٛͨ͠߹ undefinedͷνΣοΫ Τϥʔ͕ग़ͳ͘ͳΔ
TypeScriptͰܕఆٛͨ͠߹ undefinedͷνΣοΫ Τϥʔ͕ग़ͳ͘ͳΔ όάΛະવʹ͛ͯ࠷ߴ
• ͨͩ͜͠Εܕఆ͕͖ٛͪΜͱ͞Ε͍ͯΔ߹ • ϥΠϒϥϦͰରԠ͍ͯ͠ͳ͍߹ͨ·ʹ͋Δ → any Ͱܕఆٛͯ͠ΓΔ͔͠ͳ͍ → ٯʹόάͷԹচʹͳΓ͍͢ Graph͕ܕఆٛ͞Ε͍ͯͳ͍ͱΤϥʔ͕ग़ͳ͍
Enjoy TypeScript!