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
250
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
120
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
220
The future of JavaScript
khaosdoctor
0
93
É hora de falar sobre Deno
khaosdoctor
0
93
JS Software testing for beginners
khaosdoctor
0
100
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
64
The Dark Side of JavaScript
khaosdoctor
0
93
Integrating Containers Into JavaScript
khaosdoctor
0
86
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
Claude Code公式skillで 自分の仕事を少しずつ手放そう!(Claude Code開発ノウハウ大公開スペシャル by クラスメソッド)
kaym
1
500
DMM.com 購入改善推進チーム におけるCodeRabbitを用いた レビューフロー改善の一例
ysknsid25
2
670
そのドキュメント、自動化しませんか?
yuksew
1
310
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
250
マルチアカウント環境でSecurity Hubの運用、その後どうなった? / SRE NEXT 2026 miniLT会
genda
0
110
個人開発で育てる「大規模設計の苗床」 - AI時代の1人開発から始める業務への知識接続 / The Seedbed for Large-Scale Design - From AI-Era Solo Projects to Professional Knowledge
bitkey
PRO
1
280
Multicaで30個のミニプロジェクトをAIエージェント運用して見えてきたこと
eiei114
0
250
OpenTelemetryにおけるGoのゼロコード・コンパイル時計装について #fukuokago
quiver
0
130
SRE Next 2026 何でも屋からの脱却
bto
0
1k
AI Native なプロダクト組織の立ち上げ方 : 生産性 100 倍への挑戦
mikesorae
0
200
【Claude Code】鹿野さんに聞く 私の推しの並行開発環境 大公開 / claude-code-parallel-2026-07-15
tonkotsuboy_com
12
8.8k
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
250
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
8
830
Design in an AI World
tapps
1
260
Rails Girls Zürich Keynote
gr2m
96
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
A designer walks into a library…
pauljervisheath
211
24k
Utilizing Notion as your number one productivity tool
mfonobong
4
430
How to train your dragon (web standard)
notwaldorf
97
6.7k
Done Done
chrislema
186
16k
Being A Developer After 40
akosma
91
590k
Practical Orchestrator
shlominoach
191
11k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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