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
0
200
TypeScript tips that could save your life
Lucas Santos
May 11, 2023
Tweet
Share
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
88
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
190
The future of JavaScript
khaosdoctor
0
58
É hora de falar sobre Deno
khaosdoctor
0
73
JS Software testing for beginners
khaosdoctor
0
74
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
40
The Dark Side of JavaScript
khaosdoctor
0
73
Integrating Containers Into JavaScript
khaosdoctor
0
64
Entendendo o ecossistema de containers
khaosdoctor
1
960
Other Decks in Technology
See All in Technology
Observability — Extending Into Incident Response
nari_ex
1
150
CREが作る自己解決サイクルSlackワークフローに組み込んだAIによる社内ヘルプデスク改革 #cre_meetup
bengo4com
0
320
20251027_findyさん_音声エージェントLT
almondo_event
0
220
ヘンリー会社紹介資料(エンジニア向け) / company deck for engineer
henryofficial
0
360
SQLAlchemy の select(User).where(User.id =="123") を理解してみる/sqlalchemy deep dive
3l4l5
3
330
頭部ふわふわ浄酔器
uyupun
0
110
ViteとTypeScriptのProject Referencesで 大規模モノレポのUIカタログのリリースサイクルを高速化する
shuta13
3
190
OCIjp_Oracle AI World_Recap
shinpy
1
170
[2025年10月版] Databricks Data + AI Boot Camp
databricksjapan
1
260
だいたい分かった気になる 『SREの知識地図』 / introduction-to-sre-knowledge-map-book
katsuhisa91
PRO
3
1.4k
What's new in OpenShift 4.20
redhatlivestreaming
0
190
現場データから見える、開発生産性の変化コード生成AI導入・運用のリアル〜 / Changes in Development Productivity and Operational Challenges Following the Introduction of Code Generation AI
nttcom
1
460
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Bash Introduction
62gerente
615
210k
Thoughts on Productivity
jonyablonski
70
4.9k
KATA
mclloyd
PRO
32
15k
Documentation Writing (for coders)
carmenintech
75
5.1k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.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