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
230
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
81
É 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
89
Integrating Containers Into JavaScript
khaosdoctor
0
81
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
SREの仕事は「壊さないこと」ではなくなった 〜自律化していくシステムに、責任と判断を与えるという価値〜 / 20260515 Naoki Shimada
shift_evolve
PRO
1
110
多角的な視点から見たAGI
terisuke
0
130
AI時代に越境し、 組織を変えるQAスキルの正体 / QA Skills for Transforming an Organization
mii3king
5
4.2k
アプリブロック機能のつくりかたと、AIとHTMLの不合理な相性の良さについて
kumamotone
1
220
20260516_SecJAWS_Days
takuyay0ne
0
120
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
3
210
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
580
【技術書典20】OpenFOAM(自宅で深める流体解析)流れと熱移動(2)
kamakiri1225
0
380
20260507-ACL-seminar
satoshi5884
0
110
Agent Skillsで実現する記憶領域の運用とその後
yamadashy
2
1.6k
Claude Code / Codex / Kiro に AWS 権限を 渡すとき、何を設計すべきか
k_adachi_01
3
430
AI 時代の Platform Engineering
recruitengineers
PRO
1
130
Featured
See All Featured
Side Projects
sachag
455
43k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
190
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
910
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
440
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
The agentic SEO stack - context over prompts
schlessera
0
770
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
210
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
A designer walks into a library…
pauljervisheath
211
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
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