Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Types in Real Life
Search
Sibelius Seraphini
July 13, 2018
Technology
330
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
69
As Dores de uma Fintech
sibelius
1
320
Woovi - Safe Coding Practices
sibelius
1
96
⛔ No Cloud: how Woovi moved from the Cloud to its own servers
sibelius
1
810
React Colocation
sibelius
2
340
The Frontend Dichotomy
sibelius
5
770
React Native Bridges Architectures
sibelius
2
1.4k
What's next?
sibelius
3
670
ReactConfBR - Is Relay Modern the Future?
sibelius
3
980
Other Decks in Technology
See All in Technology
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
940
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
140
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
200
How to Design Configuration for Rails Applications
willnet
1
770
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
440
Featured
See All Featured
Speed Design
sergeychernyshev
33
2.2k
We Are The Robots
honzajavorek
0
400
The Art of Programming - Codeland 2020
erikaheidi
57
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Site-Speed That Sticks
csswizardry
13
1.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
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