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
Sharing type definitions between TypeScript And...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ikasoumen
June 18, 2019
Programming
920
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Sharing type definitions between TypeScript And Dart
ikasoumen
June 18, 2019
More Decks by ikasoumen
See All by ikasoumen
pixiv chatstory の PWA としての取り組み
ikasoumen
5
6.4k
Ionic 4 の話
ikasoumen
0
130
ただしく学ぼうPWA
ikasoumen
2
710
Angular + Ionicを使って iOSエンジニアにもやさしいPWA開発をした話
ikasoumen
0
940
Other Decks in Programming
See All in Programming
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
220
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.6k
iOSDC2026登壇資料.pdf
riofujimon
0
200
FreeBSDでZabbixを動かす
kenkino
0
350
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
120
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
Are APIs Still Relevant in the AI Era?
soyuka
0
410
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
4
410
Verilogで学ぶCPU自作入門.pdf
uyuki234
8
3.9k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
530
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
750
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Building AI with AI
inesmontani
PRO
1
1.3k
Site-Speed That Sticks
csswizardry
13
1.5k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
290
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Transcript
5ZQF4DSJQU%BSUؒͰ ܕΛڞ༗͢Δ 2019/6/18 Fukuoka.ts #01 ikasoumen
w JLBTPVNFO w UXJUUFS!@JLBTPVNFO w QJYJWJLB@TPVNFO w HJUIVCJLBTPVNFO w ϐΫγϒԬΦϑΟε
w 5ZQF4DSJQU"OHVMBS͔Β w ࠷ۙ3FBDUͰԿͰ54Ͱॻ͘ w ΠϥετອըΛඳ͘ͷ͖ ࣗݾհ 2
ຊ
w ؒͷࣾһݚमͰ͏ΞϓϦΛ࡞Δ͜ͱʹͳͬͨ w ࣾͷΞυϨεͰ֤ࣾһ͕(PPHMFϩάΠϯͰ͖ͯ w ࣸਅ͕ߘͰ͖ͯ w ʮ͍͍ͶʂʯͰ͖Δ w ࡞ͬͨํ͕໘ന͍ͷͰ࡞Δ
w ࢼͯ͠Έ͍ٕͨज़Γ͜͏ͥʔʂ w 'MVUUFS $MPVE'JSFTUPSF γφϦΦ 4
w (PPHMFͷ/P42-%# w (00% w ΦϑϥΠϯ࣌ͰSFBEXSJUFͰ͖Δ w ߋ৽͞ΕͨσʔλΛͪ͜Β͔ΒऔΓʹߦ͘ඞཁ͕ͳ͍ w هड़͖࣮͕͍ͩ͢ͿݮΔ
w #"% w %#ʹεΩʔϚ͕ͳ͍ w σʔλͷݕࡧෳυΩϡϝϯτͷҰׅஔʹऑ͍ 'JSFTUPSF 5
͏·͍ो͚ͩٵ͍͍ͨ
ϦΞϧλΠϜߋ৽͚ͩ ඒຯ͍͖͍ͨͩͨ͘͠
εΩʔϚΛ༻ҙ͠·͠ΐ͏
None
w +40/ͷܕΛجʹଞݴޠͷܕͱͯ͠ग़ྗ w TPVSDF+40/ +40/4DIFNB 5ZQF4DSJQU w UBSHFU͍Ζ͍Ζ RVJDLUZQF 10
npx quicktype ./ts/models.ts -o ./dart/models.dart DPNNBOE
export type UserDoc = { name: string, role: Roles, /**
* @TJS-type integer */ createdAt: number, } export enum Roles { guest = "guest", member = "member", admin = "admin", } JOQVU5ZQF4DSJQU
class UserDoc { int createdAt; String name; Roles role; UserDoc({
this.createdAt, this.name, this.role, }); factory UserDoc.fromJson(Map<String, dynamic> json) => new UserDoc( createdAt: json["createdAt"], name: json["name"], role: rolesValues.map[json["role"]], ); Map<String, dynamic> toJson() => { "createdAt": createdAt, "name": name, "role": rolesValues.reverse[role], }; } PVUQVU%BSU
enum Roles { ADMIN, GUEST, MEMBER } final rolesValues =
new EnumValues({ "admin": Roles.ADMIN, "guest": Roles.GUEST, "member": Roles.MEMBER }); class EnumValues<T> { Map<String, T> map; Map<T, String> reverseMap; EnumValues(this.map); Map<T, String> get reverse { if (reverseMap == null) { reverseMap = map.map((k, v) => new MapEntry(v, k)); } return reverseMap; } } PVUQVU%BSU
w 'JSFTUPSF+40/֦ுͳσʔλΛอ࣋Ͱ͖Δ w 5ZQF4DSJQUΛTPVSDFʹͰ͖Δ w +40/4DIFNBهड़ྔ͕ଟ͍ˍ׳Ε͍ͯͳ͍ w ։ൃɾຊ൪σʔλͷೖεΫϦϓτΛ5ZQF4DSJQUͰॻ͖ ͍ͨ w
ಉ͡ܕσʔλ͔Βੜ·Ε࣮ͨͳͷͰɺ%#ʹೖͨ͠ σʔλͱΫϥΠΞϯτͷ࣮ͷࠩҟ͕ͳ͘ͳΔ બఆཧ༝ 15
w %#ͷσʔλͷܕ͕߹ͬͯͳ͍Τϥʔͷ໓ w ෆ׳Εͳٕज़ελοΫͰʮΤϥʔͷՄೳੑ͕͋ΔՕॴʯΛ ݮΒͤͨͷେ͖͍ w ෆਖ਼ͳσʔλͷ͍ͤͰϋϚΔͱർฐ͢Δ w ࠓ͍ΔϒϥϯνͷεΩʔϚΛҰൃͰ֬ೝͰ͖Δ w
͓͔͛ͰΞϓϦແࣄϦϦʔε͞ΕݚमΓ্͕Γ·͠ ͨͱ͞ ಋೖՌ 16
w 'JSFTUPSFʹεΩʔϚΛ༻ҙ͢Δ͜ͱʹΑͬͯ νʔϜʹͱͬͯ։ൃΛਐΊ͍͢ঢ়ଶʹͨ͠ w 5ZQF4DSJQUϓϩδΣΫτʹΈࠐΈ͍͢ w ๛ͳOQNύοέʔδࢿݯ w σʔλೖͱ͔ूܭͱ͔ w
ผݴޠͷܕͷࣗಈੜ·ͰͰ͖ͪΌ͏ ·ͱΊ 17