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
Lucas Santos
May 11, 2023
Technology
230
0
Share
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
110
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
200
The future of JavaScript
khaosdoctor
0
66
É hora de falar sobre Deno
khaosdoctor
0
83
JS Software testing for beginners
khaosdoctor
0
95
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
48
The Dark Side of JavaScript
khaosdoctor
0
84
Integrating Containers Into JavaScript
khaosdoctor
0
75
Entendendo o ecossistema de containers
khaosdoctor
1
1k
Other Decks in Technology
See All in Technology
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
240
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
130
VSCode中心だった自分がターミナル沼に入門した話
sanogemaru
0
880
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
260
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
3
330
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
420
OCI技術資料 : 証明書サービス概要
ocise
1
7.2k
20260326_AIDD事例紹介_ULSC.pdf
findy_eventslides
0
290
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
130
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
210
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
220
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
390
Mind Mapping
helmedeiros
PRO
1
140
We Are The Robots
honzajavorek
0
210
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
320
KATA
mclloyd
PRO
35
15k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
870
The Mindset for Success: Future Career Progression
greggifford
PRO
0
290
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
320
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
Marketing to machines
jonoalderson
1
5.1k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
230
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
88
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