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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
130
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
220
The future of JavaScript
khaosdoctor
0
96
É hora de falar sobre Deno
khaosdoctor
0
98
JS Software testing for beginners
khaosdoctor
0
110
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
73
The Dark Side of JavaScript
khaosdoctor
0
99
Integrating Containers Into JavaScript
khaosdoctor
0
92
Entendendo o ecossistema de containers
khaosdoctor
1
1.5k
Other Decks in Technology
See All in Technology
Minecraft JavaのMODをSwiftで作る
1mash0
0
180
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
140
品質と信頼性を地続きにする
grimoh
2
820
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
9
1k
beyond jj: config & tools ecosystem
indirect
0
5.4k
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
240
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
150
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.3k
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
490
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
360
C#未経験の僕がAIに読めるコードを書かせるまで
maguroalternative
0
110
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
2.1k
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Amusing Abliteration
ianozsvald
1
310
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Building AI with AI
inesmontani
PRO
1
1.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
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