Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TypeScript tips that could save your life
Search
Lucas Santos
May 11, 2023
Technology
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
130
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
220
The future of JavaScript
khaosdoctor
0
96
É hora de falar sobre Deno
khaosdoctor
0
98
JS Software testing for beginners
khaosdoctor
0
110
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
72
The Dark Side of JavaScript
khaosdoctor
0
99
Integrating Containers Into JavaScript
khaosdoctor
0
91
Entendendo o ecossistema de containers
khaosdoctor
1
1.5k
Other Decks in Technology
See All in Technology
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
9
4k
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
3
1.7k
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
1.8k
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
140
Cloudflare Workers 向けアプリを C# で構築する ~WASM Native AOT への道~
nenonaninu
1
230
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
130
データ_AIの事業の勝敗をわけるもの
nek0128
1
450
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
210
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
2k
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.9k
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
100
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
180
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
エンジニアに許された特別な時間の終わり
watany
109
250k
Typedesign – Prime Four
hannesfritz
42
3.2k
Writing Fast Ruby
sferik
630
63k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Making the Leap to Tech Lead
cromwellryan
135
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Ethics towards AI in product and experience design
skipperchong
2
380
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
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