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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
110
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
200
The future of JavaScript
khaosdoctor
0
62
É hora de falar sobre Deno
khaosdoctor
0
78
JS Software testing for beginners
khaosdoctor
0
88
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
45
The Dark Side of JavaScript
khaosdoctor
0
82
Integrating Containers Into JavaScript
khaosdoctor
0
72
Entendendo o ecossistema de containers
khaosdoctor
1
1k
Other Decks in Technology
See All in Technology
ファイルシステムの不整合
sat
PRO
2
110
歴史に敬意を! パラシュートVPoEが組織と共同で立ち上がる信頼醸成オンボーディング
go0517go
PRO
0
120
GitHub Copilot CLI 現状確認会議(2026年2月のすがた)
torumakabe
3
480
React 19時代のコンポーネント設計ベストプラクティス
uhyo
17
6.3k
チーム開発の基礎_研究を事業につなげるために
cyberagentdevelopers
PRO
8
4k
AgentCore RuntimeをVPCにデプロイして 開発ドキュメント作成AIエージェントを作った
alchemy1115
3
260
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
74k
Azure Copilot Migration Agent / #jazug
koudaiii
1
240
Amazon Bedrock AgentCoreでブラウザ拡張型AI調査エージェントを開発した話 (シングルエージェント編)
nasuvitz
2
100
AI駆動開発とRAGプロダクトへの挑戦の軌跡 - 弁護士ドットコムでの学びから -
bengo4com
2
600
OCI技術資料 : 外部接続 VPN接続 詳細
ocise
1
10k
生成AIで始める業務改革 - 製造業編 in 福島 -
daikikanemitsu
2
640
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
The agentic SEO stack - context over prompts
schlessera
0
660
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
The Invisible Side of Design
smashingmag
302
51k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Six Lessons from altMBA
skipperchong
29
4.2k
The Language of Interfaces
destraynor
162
26k
Rails Girls Zürich Keynote
gr2m
96
14k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
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