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
88
É hora de falar sobre Deno
khaosdoctor
0
89
JS Software testing for beginners
khaosdoctor
0
99
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
57
The Dark Side of JavaScript
khaosdoctor
0
92
Integrating Containers Into JavaScript
khaosdoctor
0
85
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure:2026年5月度サービス・アップデート
oracle4engineer
PRO
1
270
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
400
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
130
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
100
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
270
プラットフォームエンジニア ワークショップ/ platform-workshop
databricksjapan
0
140
APIテストとは?
nagix
0
160
Sony_KMP_Journey_KotlinConf2026
sony
0
180
Claude code Orchestra
ozakiomumkj
2
720
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
150
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
290
TypeScript Compiler APIとPHP-Parserを活用し、TypeScriptとPHPで型を共有する
shuta13
0
220
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Faster Mobile Websites
deanohume
310
31k
Crafting Experiences
bethany
1
160
Everyday Curiosity
cassininazir
0
210
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
180
Designing for Timeless Needs
cassininazir
1
240
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Code Reviewing Like a Champion
maltzj
528
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Unsuck your backbone
ammeep
672
58k
Exploring anti-patterns in Rails
aemeredith
3
380
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
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