Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
How I Learned To Stop Worrying And Love TypeScript
Search
Tommy O'Keefe
November 15, 2019
Programming
81
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
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
74
Other Decks in Programming
See All in Programming
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
730
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
290
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
ActionController meets Protocol Buffers
sorah
0
180
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
240
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
770
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
1
280
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
Jetpack Compose Mechanisms
skydoves
2
720
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
130
Featured
See All Featured
Abbi's Birthday
coloredviolet
4
10k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Un-Boring Meetings
codingconduct
0
450
Optimising Largest Contentful Paint
csswizardry
37
4k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
The Mindset for Success: Future Career Progression
greggifford
PRO
0
530
We Have a Design System, Now What?
morganepeng
55
8.4k
Site-Speed That Sticks
csswizardry
13
1.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
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