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 tips that could save your life
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Lucas Santos
May 11, 2023
Technology
240
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
120
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
210
The future of JavaScript
khaosdoctor
0
92
É hora de falar sobre Deno
khaosdoctor
0
90
JS Software testing for beginners
khaosdoctor
0
100
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
60
The Dark Side of JavaScript
khaosdoctor
0
93
Integrating Containers Into JavaScript
khaosdoctor
0
85
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
2026TECHFRESH畢業分享會 - 葬送的通靈師:化系統與用戶雜訊成行動訊號
line_developers_tw
PRO
0
960
新しいVibe Codingと”自走”について
watany
6
310
【NRUG vol.18】なぜ多くのオブザーバビリティ導入は失敗するのか
nrug_member
0
120
protovalidate-es を導入してみた
bengo4com
0
180
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
970
AIはどのように 組織のアジリティを変えるのか?
junki
2
720
LayerXにおけるセキュリティ管理の現在地と次の一手
tosho
0
140
連合学習と機密コンピューティング
lycorptech_jp
PRO
0
110
2026TECHFRESH畢業分享會 - Lightning Talk - 資料也要 CI/CD? 用 Airbyte 自動化資料同步
line_developers_tw
PRO
0
950
人材育成分科会.pdf
_awache
3
190
あなたの知らないPDFのアクセシビリティ
lycorptech_jp
PRO
0
180
気づかぬうちにセキュリティ負債を生むAPIキー運用
sgwrmctk
0
120
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Amusing Abliteration
ianozsvald
1
200
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
WCS-LA-2024
lcolladotor
0
630
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
Designing for humans not robots
tammielis
254
26k
Balancing Empowerment & Direction
lara
6
1.2k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.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