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
Types in Real Life
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sibelius Seraphini
July 13, 2018
Technology
310
4
Share
Types in Real Life
Practical approve to types in javascript
Sibelius Seraphini
July 13, 2018
More Decks by Sibelius Seraphini
See All by Sibelius Seraphini
Por que criar uma nova Fintech?
sibelius
1
44
As Dores de uma Fintech
sibelius
1
310
Woovi - Safe Coding Practices
sibelius
1
83
⛔ No Cloud: how Woovi moved from the Cloud to its own servers
sibelius
1
750
React Colocation
sibelius
2
310
The Frontend Dichotomy
sibelius
5
740
React Native Bridges Architectures
sibelius
2
1.3k
What's next?
sibelius
3
650
ReactConfBR - Is Relay Modern the Future?
sibelius
3
950
Other Decks in Technology
See All in Technology
freeeで運用しているAIQAについて
qatonchan
1
630
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
4
240
Gaussian Splattingの表現力を拡張する — 高周波再構成とインタラクションへのアプローチ —
gpuunite_official
0
180
写真で見るAWS Summit Singapore 2026
k_adachi_01
0
110
Claude Code で使える DuckDB Skills を試してみた / DuckDB Skills and Claude Code
masahirokawahara
1
490
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
230
"スキルファースト"で作る、AIの自走環境
subroh0508
0
530
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
540
クラウドネイティブ DB はいかにして制約を 克服したか? 〜進化歴史から紐解く、スケーラブルアーキテクチャ設計指針〜
hacomono
PRO
6
1k
みんなの考えた最強のデータ基盤アーキテクチャ'26前期〜前夜祭〜ルーキーズ_資料_遠藤な
endonanana
0
350
Swift Sequence の便利 API 再発見
treastrain
1
290
分断された OT と IT を繋ぐ架け橋 -Kubernetes が切り拓く 産業用組み込み製品の現在地 -
yudaiono
1
120
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Become a Pro
speakerdeck
PRO
31
5.9k
Amusing Abliteration
ianozsvald
1
170
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
230
How to Ace a Technical Interview
jacobian
281
24k
Being A Developer After 40
akosma
91
590k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
290
HDC tutorial
michielstock
2
660
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Transcript
Types in Real Life How to improve your dev workflow
Sibelius Seraphini
Sibelius Seraphini @sibelius @sseraphini 2
- Motivation - Basics - Sum types - Generics -
REST api study case - React - Redux - Utilities Outline 3
Type System in JS 4
- Less bugs - More maintainability - Type Driven Development
Motivation 5
- Better tools support - Code completion - Refactor -
Documentation - Jump to definition Motivation 6
- Types are set of values - string - 'a'
| 'b' | 'c' | ... - number - 1 | 2 | 3 | ... - boolean - true | false - function - string -> boolean | ... - object - { a: string, b: number } | ... What are Types? 7
Typing a variable 8
Typing a function 9
Typing an object 10
Nominal Typing 11 - C++, Java, Swift
Structural Typing 12 - OCaml, Haskell, Elm
Typing an array 13
Sum/Union Type 14
Intersection Type 15
- How to type a function that can be used
for any type of array (int[], string[], number[])? Generics 16
Generics 17
18 Optional type
- type the input - api body payload - headers
- query string Typing a REST API 19
- type the output (response) - Get a json output
of a REST api - Transform json to types - https://transform.now.sh/json-to-flo w-types/ Typing a REST API 20
Typing a REST api 21
Typing a REST api 22
Typing a React Component 23
Typing a React Component (TS) 24
Typing a React Component 25
Typing a HOC 26
Typing Redux 27
Typing Redux 28
Typing Redux 29
Flow Type Utilities 30
TypeScript Utilities Mapped Types 31
TypeScript Utilities Conditional Typing 32
Resources 33 - https://github.com/entria/guidelines/tree/ master/flow - https://flow.org/en/docs/lang/ - https://www.typescriptlang.org/docs/ho me.html
- https://github.com/fantasyland/fantasy-l and - https://github.com/gcanti/flow-static-land
Resources 34 - https://medium.com/javascript-scene/m aster-the-javascript-interview-what-is-fu nctional-programming-7f218c68b3a0 - https://medium.com/@matthiasak/state- of-the-union-js-d664bdbffd14 -
https://mitpress.mit.edu/books/types-an d-programming-languages - https://github.com/niieani/typescript-vs-fl owtype
Resources 35 - https://transform.now.sh/json-to-flow-typ es/
I didn't mention 36 - More about Type Theory -
Functional Programming - Types + Functional - Fantasy Land specs - Realworld problems and solutions
Sibelius