Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
0
210
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
98
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
190
The future of JavaScript
khaosdoctor
0
60
É hora de falar sobre Deno
khaosdoctor
0
76
JS Software testing for beginners
khaosdoctor
0
82
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
42
The Dark Side of JavaScript
khaosdoctor
0
78
Integrating Containers Into JavaScript
khaosdoctor
0
70
Entendendo o ecossistema de containers
khaosdoctor
1
980
Other Decks in Technology
See All in Technology
【ServiceNow SNUG Meetup LT deck】WorkFlow Editorの廃止と Flow Designerへの移行戦略
niwato
0
110
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
480
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.2k
ハッカソンから社内プロダクトへ AIエージェント「ko☆shi」開発で学んだ4つの重要要素
sonoda_mj
6
1.1k
Agent Skillsがハーネスの垣根を超える日
gotalab555
5
2.2k
CARTAのAI CoE が挑む「事業を進化させる AI エンジニアリング」 / carta ai coe evolution business ai engineering
carta_engineering
0
2.1k
モダンデータスタックの理想と現実の間で~1.3億人Vポイントデータ基盤の現在地とこれから~
taromatsui_cccmkhd
1
190
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
570
AI-DLCを現場にインストールしてみた:プロトタイプ開発で分かったこと・やめたこと
recruitengineers
PRO
2
200
AIBuildersDay_track_A_iidaxs
iidaxs
3
680
Kiro を用いたペアプロのススメ
taikis
3
1.2k
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1.2k
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
140
Building Applications with DynamoDB
mza
96
6.8k
Un-Boring Meetings
codingconduct
0
160
Designing for humans not robots
tammielis
254
26k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1k
[SF Ruby Conf 2025] Rails X
palkan
0
550
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Test your architecture with Archunit
thirion
1
2.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.7k
エンジニアに許された特別な時間の終わり
watany
105
220k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
89
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
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