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
Lucas Santos
May 11, 2023
Technology
240
0
Share
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
89
É hora de falar sobre Deno
khaosdoctor
0
89
JS Software testing for beginners
khaosdoctor
0
99
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
59
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
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
170
Databricks 月刊サービスアップデート 2026年05月号
tyosi1212
0
200
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
340
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
6
3.1k
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
230
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
200
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
2
2.3k
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
110
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
1.1k
探して_入れて_作って_使う_Agent_Skills___LT.pdf
peintangos
2
160
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
540
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
170
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Faster Mobile Websites
deanohume
310
31k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
The Cult of Friendly URLs
andyhume
79
6.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
590
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
HDC tutorial
michielstock
2
690
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
170
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