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
260
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
130
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
220
The future of JavaScript
khaosdoctor
0
96
É hora de falar sobre Deno
khaosdoctor
0
98
JS Software testing for beginners
khaosdoctor
0
110
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
74
The Dark Side of JavaScript
khaosdoctor
0
100
Integrating Containers Into JavaScript
khaosdoctor
0
92
Entendendo o ecossistema de containers
khaosdoctor
1
1.5k
Other Decks in Technology
See All in Technology
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.5k
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
250
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
330
SREへの勘違いに気づいた後の話
tomodakengo
0
140
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.7k
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
2
650
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
660
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.5k
Goodbye ShellScript, Hello File-based App
shunsock
0
650
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
1.1k
AI coding 整合正規方法
philipz
0
480
リアーキテクチャ後の障害ゼロを目指したShadow Testingの取り組み
nihonbuson
PRO
1
170
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
580
GitHub's CSS Performance
jonrohan
1033
470k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Six Lessons from altMBA
skipperchong
29
4.5k
Statistics for Hackers
jakevdp
799
230k
Agile that works and the tools we love
rasmusluckow
331
22k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Documentation Writing (for coders)
carmenintech
77
5.5k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
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