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
63
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
AI時代の闇と光
tatsuya1970
0
100
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
860
AIレビューはどこまで任せられるのか?自動化と人が背負うレビューの境界
sansantech
PRO
3
1k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.4k
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
9
3.9k
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
230
壊して学ぶAWS CDK: そのcdk deployで消えるもの、残るもの
k_adachi_01
1
360
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
2
340
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
5.8k
SRE依存からの脱却 運用を開 発チームへ移す、 フルサイ クル開 発体制の実践
joooee0000
0
3.1k
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
2
740
公式ドキュメントの歩き方etc
coco_se
1
120
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
250
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Bash Introduction
62gerente
615
220k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
420
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Music & Morning Musume
bryan
47
7.3k
The browser strikes back
jonoalderson
0
1.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
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