Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
210
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
98
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
190
The future of JavaScript
khaosdoctor
0
60
É hora de falar sobre Deno
khaosdoctor
0
76
JS Software testing for beginners
khaosdoctor
0
82
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
42
The Dark Side of JavaScript
khaosdoctor
0
78
Integrating Containers Into JavaScript
khaosdoctor
0
70
Entendendo o ecossistema de containers
khaosdoctor
1
980
Other Decks in Technology
See All in Technology
AI時代の新規LLMプロダクト開発: Findy Insightsを3ヶ月で立ち上げた舞台裏と振り返り
dakuon
0
210
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
NIKKEI Tech Talk #41: セキュア・バイ・デザインからクラウド管理を考える
sekido
PRO
0
150
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
170
Power of Kiro : あなたの㌔はパワステ搭載ですか?
r3_yamauchi
PRO
0
180
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
700
AWS re:Invent 2025で見たGrafana最新機能の紹介
hamadakoji
0
420
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
6
1.6k
SREには開発組織全体で向き合う
koh_naga
0
380
プロンプトやエージェントを自動的に作る方法
shibuiwilliam
13
11k
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
840
regrowth_tokyo_2025_securityagent
hiashisan
0
260
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
BBQ
matthewcrist
89
9.9k
RailsConf 2023
tenderlove
30
1.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Making Projects Easy
brettharned
120
6.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Code Reviewing Like a Champion
maltzj
527
40k
Thoughts on Productivity
jonyablonski
73
5k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
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