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
0
220
TypeScript tips that could save your life
Lucas Santos
May 11, 2023
Tweet
Share
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
110
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
200
The future of JavaScript
khaosdoctor
0
62
É hora de falar sobre Deno
khaosdoctor
0
79
JS Software testing for beginners
khaosdoctor
0
91
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
47
The Dark Side of JavaScript
khaosdoctor
0
82
Integrating Containers Into JavaScript
khaosdoctor
0
73
Entendendo o ecossistema de containers
khaosdoctor
1
1k
Other Decks in Technology
See All in Technology
[JAWSDAYS2026][D8]その起票、愛が足りてますか?AWSサポートを味方につける、技術的「ラブレター」の書き方
hirosys_
3
180
Datadog の RBAC のすべて
nulabinc
PRO
3
460
The_Evolution_of_Bits_AI_SRE.pdf
nulabinc
PRO
0
190
AI実装による「レビューボトルネック」を解消する仕様駆動開発(SDD)/ ai-sdd-review-bottleneck
rakus_dev
0
120
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
1.8k
JAWS DAYS 2026 楽しく学ぼう!ストレージ 入門
yoshiki0705
2
180
Dr. Werner Vogelsの14年のキーノートから紐解くエンジニアリング組織への処方箋@JAWS DAYS 2026
p0n
1
130
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
140
堅牢.py#2 LT資料
t3tra
0
140
Claude Code Skills 勉強会 (DevelersIO向けに調整済み) / claude code skills for devio
masahirokawahara
1
19k
情シスのための生成AI実践ガイド2026 / Generative AI Practical Guide for Business Technology 2026
glidenote
0
230
Claude Code のコード品質がばらつくので AI に品質保証させる仕組みを作った話 / A story about building a mechanism to have AI ensure quality, because the code quality from Claude Code was inconsistent
nrslib
13
7.5k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
310
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
210
Ruling the World: When Life Gets Gamed
codingconduct
0
170
Building AI with AI
inesmontani
PRO
1
790
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The untapped power of vector embeddings
frankvandijk
2
1.6k
Evolving SEO for Evolving Search Engines
ryanjones
0
150
A better future with KSS
kneath
240
18k
KATA
mclloyd
PRO
35
15k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
470
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