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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Lucas Santos
May 11, 2023
Technology
230
0
Share
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
110
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
200
The future of JavaScript
khaosdoctor
0
75
É hora de falar sobre Deno
khaosdoctor
0
86
JS Software testing for beginners
khaosdoctor
0
97
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
50
The Dark Side of JavaScript
khaosdoctor
0
87
Integrating Containers Into JavaScript
khaosdoctor
0
80
Entendendo o ecossistema de containers
khaosdoctor
1
1k
Other Decks in Technology
See All in Technology
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
150
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
3
4k
色を視る
yuzneri
0
180
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
190
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
120
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
5.5k
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
360
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
180
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.5k
AWS Transform CustomでIaCコードを自由自在に変換しよう
duelist2020jp
0
170
今年注目する!データ分析プラットフォームでのAIの活用
nayuts
0
170
Hacobu Tech Deck
hacobu
PRO
0
130
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Statistics for Hackers
jakevdp
799
230k
Marketing to machines
jonoalderson
1
5.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
510
Information Architects: The Missing Link in Design Systems
soysaucechin
0
900
Producing Creativity
orderedlist
PRO
348
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Design in an AI World
tapps
1
200
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
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