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
How I Learned To Stop Worrying And Love TypeScript
Search
Tommy O'Keefe
November 15, 2019
Programming
1
62
How I Learned To Stop Worrying And Love TypeScript
The story of my journey from TypeScript skeptic to TypeScript fanboy
Tommy O'Keefe
November 15, 2019
Tweet
Share
More Decks by Tommy O'Keefe
See All by Tommy O'Keefe
Content Challenges: Moving from Amazon Alexa to Google Assistant (and back again :)
tommyokeefe
0
65
Other Decks in Programming
See All in Programming
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Amazon Bedrock Multi Agentsを試してきた
tm2
1
280
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
Conform を推す - Advocating for Conform
mizoguchicoji
3
680
Honoとフロントエンドの 型安全性について
yodaka
4
250
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
180
SRE、開発、QAが協業して挑んだリリースプロセス改革@SRE Kaigi 2025
nealle
3
4.1k
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
30
11k
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
11
1.8k
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
230
Featured
See All Featured
BBQ
matthewcrist
86
9.5k
Become a Pro
speakerdeck
PRO
26
5.1k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Designing for Performance
lara
604
68k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Embracing the Ebb and Flow
colly
84
4.6k
Docker and Python
trallard
44
3.3k
Practical Orchestrator
shlominoach
186
10k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Agile that works and the tools we love
rasmusluckow
328
21k
A Philosophy of Restraint
colly
203
16k
Transcript
How I Learned to Stop Worrying and Love TypeScript Tommy
O’Keefe (@tommyokeefe) | RVA JS | November 15, 2019
Senior full-stack developer At NPR since November 2016 Part of
the Voice Platforms team since it was formed in September of 2017 Who am I?
Why TypeScript?
Why Typescript? 46.6% - Have used would use again 5.4%
- Have used wouldn’t use again 33.7% - Heard of it, want to learn 13.7% - Heard of it, not interested
Why Typescript?
Why Me?
“Most Qualified”
“Most Experienced”
“Most Knowledgeable”
None
None
“ What made you a skeptic?
My Background
My Experience
My Own Biases
“ What made you a fan?
Confusion → Clarity
While Reading Code Confusion → Clarity
While Reading Code While Writing Code Confusion → Clarity
While Reading Code While Writing Code While Running Code Confusion
→ Clarity
From Skeptic to Fanboy A Journey in Two Parts
Adding TypeScript to an Existing Project 1. Angular Upgrade
Things That Got Me Like:
Increased Readability & Self Documenting Code
“ Hold up Tommy, can’t TypeScript files be like 30%
longer than a JavaScript file?
Better IDE Support & Integration
“ Wait just a minute Tommy, my IDE already does
all kinds of great stuff, why should I add TypeScript?
Simple, but so Helpful
Key Takeaways
Keep Things Loose At First Keep your config file as
permissive as possible: settings like AllowJS are key!
Keep Things Loose At First Keep your config file as
permissive as possible: settings like AllowJS are key! Focus on adding type annotations that improve readability and expose problem areas in your app
Tighten Things Up Progressively add more meaningful type definitions as
you work through your files.
Tighten Things Up Progressively add more meaningful type definitions as
you work through your files. Tighten up the config and linting rules once your first pass is finished.
Using TypeScript for a New Project 2. Alexa, Do You
Like TypeScript?
Things That Got Me Like:
Catching Type Errors at Compilation or Earlier
“ Tommy… Why can’t we just perform these checks at
runtime?
Errors Are Friends, Not Enemies
Errors Are Friends, Not Enemies
Errors Are Friends, Not Enemies
Key Takeaways
Errors Are Your Friends No matter what kind of error
you encounter, it’s revealing an inconsistency in your code. It’s an ally, not an enemy.
Type Any is not Your Friend Get rid of it
wherever you can.
Don’t Forget Your Config! Many quick start guides jump right
into running tsc from the command line. No matter how small your project is, you need a config!
Use Existing Tools Starting a React app? Angular? Vue? Someone
else has undoubtedly already put together a great starter repo you can use!
Helpful Resources Quick Start Samples Migrating JS to TS TypeScript
Handbook (very useful) TypeScript Deep Dive (Basarat Ali Sayed)
None
Thank you!
[email protected]
@tommyokeefe https://npr.codes https://n.pr/tech-jobs https://bit.ly/typescriptfanboy