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
240
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
210
The future of JavaScript
khaosdoctor
0
92
É hora de falar sobre Deno
khaosdoctor
0
90
JS Software testing for beginners
khaosdoctor
0
100
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
60
The Dark Side of JavaScript
khaosdoctor
0
93
Integrating Containers Into JavaScript
khaosdoctor
0
85
Entendendo o ecossistema de containers
khaosdoctor
1
1.1k
Other Decks in Technology
See All in Technology
あなたの知らないPDFのアクセシビリティ
lycorptech_jp
PRO
0
180
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
130
Socrates × Looker 〜セマンティックレイヤーで進化するデータ分析エージェント〜
hanon52_
3
2.3k
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
3
1.8k
アンオフィシャルな、オフィシャルからのお願い
wyamazak_devrel
0
100
SONiCで構築・運用する生成AI向けパブリッククラウドネットワーク ~実装編~
sonic
0
180
200個のGitHubリポジトリを横断調査したかった
icck
0
120
機械学習を「社会実装」するということ 2026年夏版 / Social Implementation of Machine Learning June 2026 Version
moepy_stats
5
2.1k
なぜ Platform Engineering の土台に Kubernetes を選ぶのか
r4ynode
2
630
2026 TECHFRESH 畢業分享會 - 開發日常大解密!從領域驅動到企業級上線
line_developers_tw
PRO
0
960
MCP Appsを作ってみよう
iwamot
PRO
4
610
気づかぬうちにセキュリティ負債を生むAPIキー運用
sgwrmctk
0
120
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Leo the Paperboy
mayatellez
7
1.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
420
Designing for Timeless Needs
cassininazir
1
250
Navigating Team Friction
lara
192
16k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
200
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