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
0
220
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
100
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
190
The future of JavaScript
khaosdoctor
0
61
É hora de falar sobre Deno
khaosdoctor
0
77
JS Software testing for beginners
khaosdoctor
0
87
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
42
The Dark Side of JavaScript
khaosdoctor
0
81
Integrating Containers Into JavaScript
khaosdoctor
0
70
Entendendo o ecossistema de containers
khaosdoctor
1
1k
Other Decks in Technology
See All in Technology
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
180
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
SchooでVue.js/Nuxtを技術選定している理由
yamanoku
3
110
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
200
Digitization部 紹介資料
sansan33
PRO
1
6.8k
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
0
140
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
130
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
470
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
160
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
320
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
260
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
RailsConf 2023
tenderlove
30
1.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
54
Git: the NoSQL Database
bkeepers
PRO
432
66k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Agile that works and the tools we love
rasmusluckow
331
21k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
270
Utilizing Notion as your number one productivity tool
mfonobong
3
220
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Building Applications with DynamoDB
mza
96
6.9k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
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