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
TypeScript tips that could save your life
Search
Lucas Santos
May 11, 2023
Technology
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TypeScript tips that could save your life
Lucas Santos
May 11, 2023
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
140
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
230
The future of JavaScript
khaosdoctor
0
100
É hora de falar sobre Deno
khaosdoctor
0
100
JS Software testing for beginners
khaosdoctor
0
120
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
83
The Dark Side of JavaScript
khaosdoctor
0
110
Integrating Containers Into JavaScript
khaosdoctor
0
100
Entendendo o ecossistema de containers
khaosdoctor
1
1.5k
Other Decks in Technology
See All in Technology
Jev の中身は50行で再現できる。でも本物との差はどこにあるのか
hisuzuya
0
280
キヨさん、67歳。AIコーディングエージェントに挑む
happysamurai294
0
140
Vibe-to-Spec開発_実践ガイド
happysamurai294
0
140
20261031_IoTLT_vol140_kitazaki_v1.pdf
kitazaki
0
150
自律的なチームを作るためにTechPMがやらないこと
ny7760
0
460
[General] 개발자로 해외 기업에서 일하기
skydoves
1
260
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
400
[re:Invent2026事前勉強会(有志開催)]続きは、ラスベガスの廊下で / continue-in-the-vegas-hallway
sh_fk2
0
490
OneLakeをデータソースにした AI Search(Foundry IQ)の ライフサイクル管理
ryuseiiida
0
220
WireGuard for Apache NuttX - Bringing Secure Remote Access to embedded Devices -
aki310ooooo
0
120
Technical Project Manager の役割とやりがい、少しだけ AI
yoshiiryo1
0
560
re:Invent の去年のスケジュールを公開します!
miu_crescent
PRO
0
150
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
650
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
Leo the Paperboy
mayatellez
10
2.4k
Visualization
eitanlees
153
17k
GitHub's CSS Performance
jonrohan
1033
470k
Unsuck your backbone
ammeep
672
58k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
620
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
570
Making the Leap to Tech Lead
cromwellryan
135
10k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Transcript
TypeScript tips that could save your life
who am I_ {twitter, youtube, linkedin…}.lsantos.dev software engineer_
[email protected]
typescript can be tricky sometimes
so let's cut to the chase_
tsconfig extension_
None
None
None
None
None
It's not only for bases
It's not only for bases
type_ testing
one native way: *.typetest.ts files
one native way: *.typetest.ts files https://lsantos.dev/keychain-pull
the (more) native way
vitest
tsd https://lsantos.dev/tsd-lib
move errors to types
instead of this
do this
branded types_
UUIDs are the perfect example
to brand a type
to brand a type
even better
but well… Why isn't this working
but well… Why isn't this working To be continued…
but there's another example
type guards_
but well… Why isn't this working
now we have something
but this if…
assertion functions
assertion out of tests
understand your enums_
enums produce valid JavaScript
enums produce valid JavaScript
numeric enums
string enums
constant enums
constant enums
obrigado_ lsantos.dev