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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
82
É hora de falar sobre Deno
khaosdoctor
0
88
JS Software testing for beginners
khaosdoctor
0
98
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
53
The Dark Side of JavaScript
khaosdoctor
0
90
Integrating Containers Into JavaScript
khaosdoctor
0
81
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
AI 時代の Platform Engineering
recruitengineers
PRO
1
200
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
240
みんなの考えた最強のデータ基盤アーキテクチャ'26前期〜前夜祭〜ルーキーズ_資料_遠藤な
endonanana
0
350
AI飲み会幹事エージェントを作っただけなのに
ykimi
0
210
AWS運用におけるAI Agent活用術 / JAWS-UG 神戸 #11 LT大会
genda
1
260
データモデリング通り #5オンライン勉強会: AIに『ビジネスの文脈』を教え込むデータモデリング
datayokocho
0
280
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
230
パーソルキャリア IT/テクノロジー職向け 会社紹介資料|Company Introduction Deck
techtekt
PRO
0
140
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
130
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
520
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
410
(きっとたぶん)人材育成や教育のような何かの話
sejima
0
750
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
2
1k
How to Talk to Developers About Accessibility
jct
2
200
The Cult of Friendly URLs
andyhume
79
6.9k
Context Engineering - Making Every Token Count
addyosmani
9
880
Designing for humans not robots
tammielis
254
26k
First, design no harm
axbom
PRO
2
1.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Designing for Performance
lara
611
70k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
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