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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Lucas Santos
May 11, 2023
Technology
250
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
120
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
93
JS Software testing for beginners
khaosdoctor
0
100
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
69
The Dark Side of JavaScript
khaosdoctor
0
97
Integrating Containers Into JavaScript
khaosdoctor
0
86
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
140
Pavlokで始める電撃駆動開発
sgrsn
0
180
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
6.9k
関東Kaggler会発表資料
takoi
1
200
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
150
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.4k
ラジオの科学
frievea
0
280
AIコーディングの次。コードレビューと理解負荷を解消して組織の開発生産性を高める
moongift
PRO
2
2.3k
바이브풀 라이프
arawn
0
110
20260608_Codexの可能性_ノンプログラマー向け_大城追記
doradora09
PRO
0
780
QAエンジニア起点で進める、SmartHRにおける信頼性向上について
kaomi_wombat
1
120
AI時代の強いチームの作り方
yuukiyo
26
16k
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
360
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
640
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
890
Crafting Experiences
bethany
1
240
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
BBQ
matthewcrist
89
10k
Building the Perfect Custom Keyboard
takai
2
830
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
440
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
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