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
99
JS Software testing for beginners
khaosdoctor
0
110
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
77
The Dark Side of JavaScript
khaosdoctor
0
110
Integrating Containers Into JavaScript
khaosdoctor
0
97
Entendendo o ecossistema de containers
khaosdoctor
1
1.5k
Other Decks in Technology
See All in Technology
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
3.3k
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
130
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
250
Jetson Orin Nanoとk3sとローカルLLMで音声文字起こしシステム作ってみた
y_sera15
0
110
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
460
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
830
今こそ知りたいAmplifyGen2
mkdev10
2
160
分析AIエージェントを育てる、動く環境を育てる
codatum
1
760
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.6k
go-sqletch
moznion
0
130
AI時代のPRレビューにどう向き合うか?
kairim0
1
160
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.8k
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
A better future with KSS
kneath
240
18k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Raft: Consensus for Rubyists
vanstee
142
7.7k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
980
Designing for Performance
lara
612
70k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
620
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
The Curious Case for Waylosing
cassininazir
1
560
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
580
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