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
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
React、まだ楽しくて草
uhyo
7
4k
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
380
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
180
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1k
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
190
Agentic ERPをどう設計するか ー 受発注エージェントを動かす、現場の知見と設計思想ー
recerqainc
1
1.1k
GoとSIMDとWasmの今。
askua
3
490
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
250
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
180
「気づいたら仕事が終わっている」バクラクAIエージェント本番運用の裏側 / layerx-bakuraku-aie2026
yuya4
18
9.2k
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
6
730
速さだけじゃない! VoidZero ツールが移行先に選ばれる理由
mizdra
PRO
6
730
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
GitHub's CSS Performance
jonrohan
1033
470k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
The Invisible Side of Design
smashingmag
302
52k
The Spectacular Lies of Maps
axbom
PRO
1
790
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
The Curious Case for Waylosing
cassininazir
1
370
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
Scaling GitHub
holman
464
140k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
380
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