Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TypeScript tips that could save your life
Search
Lucas Santos
May 11, 2023
Technology
260
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
140
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
230
The future of JavaScript
khaosdoctor
0
99
É hora de falar sobre Deno
khaosdoctor
0
99
JS Software testing for beginners
khaosdoctor
0
110
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
76
The Dark Side of JavaScript
khaosdoctor
0
110
Integrating Containers Into JavaScript
khaosdoctor
0
97
Entendendo o ecossistema de containers
khaosdoctor
1
1.5k
Other Decks in Technology
See All in Technology
Incremental HTTP
kazuho
5
1.9k
1人アドミンな私はAWSアカウント申請をSlackで完結したい!
ysuzuki
0
110
AWS DevOps Agent スキルをつかいこなそう / Master AWS DevOps Agent Skills
kinunori
2
660
「とりあえず動く」の先へ。 AI時代のチーム開発と内部設計/2026-slsdays
slsops
0
100
The seven pitfalls of AI (revised version)
ufried
0
180
AI Made Us Faster at Solving the Wrong Problems
marceloancelmo
0
130
サーバーフルコンピューティング?AWS Lambda
iwatatomoya
0
120
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
290
Apache Iceberg が拓く AI 時代のオープンレイクハウス
tomtanaka
0
210
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
300
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
380
Claude Designがめちゃくちゃ便利なので使ってほしい
diggymo
0
190
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
590
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
260
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
WENDY [Excerpt]
tessaabrams
14
40k
Facilitating Awesome Meetings
lara
57
7.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.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