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
ポケモンの型をTypeScriptの型システムで表現してみた
Search
subroh_0508
June 10, 2026
Technology
550
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ポケモンの型をTypeScriptの型システムで表現してみた
TSKaigi Night talks 〜after conference〜 のLT資料です
https://findy.connpass.com/event/392420/
subroh_0508
June 10, 2026
More Decks by subroh_0508
See All by subroh_0508
"計画的無茶振り"を通してAIネイティブ世代の新人を育てる
subroh0508
1
140
蓮ノ三連華は如何にしてBGPにたどり着いたのか
subroh0508
0
130
個人の生産性は青天井、そんな時代のエンジニアはチームに何をなすべきか
subroh0508
0
98
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
3
1.5k
Pull Request、AIレビューだけでマージしてOK?
subroh0508
1
120
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
690
"スキルファースト"で作る、AIの自走環境
subroh0508
2
1k
AIを賢くしたいなら、まずは人間の改善ループから
subroh0508
0
360
"S/N-GUL4R1TY"に向けて人類は何をすべきなのか
subroh0508
0
98
Other Decks in Technology
See All in Technology
eBPF 簡介 2026 版
shunghsiyu
0
120
ひとりで始めた AI駆動開発、チームに広げて何が変わったのか
kenichiodo
1
200
LLMの知識とAIエージェント
happysamurai294
0
150
増え続けるプロダクトの品質をどう担保するか。ProductSpecとTypeScriptによる取り組み
joere
3
320
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
190
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
3
600
AIに任せられるFlutterコードベースを作る 〜仕様をコードで表し、ハーネスで守る〜
myohei
1
600
複雑な業務システムを高速でつくるため、チーム全員をつくれる人へ
ayakurabuchi
0
120
Jev の中身は50行で再現できる。でも本物との差はどこにあるのか
hisuzuya
0
270
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
150
詳解 never 型 - ボトム型の性質を深掘り
nealle
0
120
AI時代の開発はウォーターフォールに回帰する? / development-with-ai-back-to-wf
okamototakuyasr2
0
160
Featured
See All Featured
Leo the Paperboy
mayatellez
10
2.4k
Faster Mobile Websites
deanohume
310
32k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
550
Designing Powerful Visuals for Engaging Learning
tmiket
1
630
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
640
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
330
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
760
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
340
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Transcript
None
None
None
None
None
None
None
None
None
None
None
None
None
None
➔ ➔ ➔
species: regulations: - champions-m-a nature: up: down: ability: item: X
moves: - - - - --- party: regulation: champions-m-a members: - ../individuals/garchomp.yaml - ../individuals/dragonite.yaml # … ---
pnpm check:party dragon-standard.md : pnpm analyze:coverage dragon-standard.md : 5 /
0 : 4 / 1 : 4 / 0
species: regulations: - champions-m-a moves: - - - - #
pnpm check:individual charizard-invalid.yaml charizard-invalid.yaml:9: MoveNotLearnedBy: Type 'string' is not assignable to type 'MoveNotLearnedBy< "champions-m-a", "charizard", "surf" >'.
codegen tsc --noEmit OK NG YAML TypeScript tsc --noEmit
species: regulations: - champions-m-a moves: - - - - //
@source charizard.yaml:4 const charizard_moves_champions_m_a: ValidMoves< "champions-m-a", "charizard", readonly [ "flare-blitz", "dragon-claw", "earthquake", "roost" ] > = [ "flare-blitz", "dragon-claw", "earthquake", "roost" ]; ValidMoves charizard_moves_champions_m_a
species: regulations: - champions-m-a moves: - - - - #
// @source charizard-invalid.yaml:4 const charizard_moves_champions_m_a: ValidMoves< "champions-m-a", "charizard", readonly [ "flare-blitz", "dragon-claw", "earthquake", "surf" ] > = [ "flare-blitz", "dragon-claw", "earthquake", "surf" ];
species: regulations: - champions-m-a moves: - - - - #
// @source charizard-invalid.yaml:4 const charizard_moves_champions_m_a: ValidMoves< "champions-m-a", "charizard", readonly [ "flare-blitz", "dragon-claw", "earthquake", "surf" ] > = [ "flare-blitz", "dragon-claw", "earthquake", "surf" ]; roost surf
species: regulations: - champions-m-a moves: - - - - #
roost surf
export type ValidMoves< R extends RegulationId, // S extends SpeciesIdIn<R>,
// Ms extends readonly string[], // > = { readonly [I in keyof Ms]: ValidMove<R, S, Ms[I] & string>; }; Ms
export type ValidMove< R extends RegulationId, // S extends SpeciesIdIn<R>,
// M extends string, // > = M extends SpeciesEntryOf< R, S >["moves"][number] ? M : MoveNotLearnedBy<R, S, M>; SpeciesEntryOf<"champions-m-a", "charizard"> { readonly id: "charizard"; readonly moves: readonly [ "flare-blitz", "dragon-claw", "roost", "earthquake", "swords-dance", ... ] // M-A ... }
export type ValidMove< R extends RegulationId, // S extends SpeciesIdIn<R>,
// M extends string, // > = M extends SpeciesEntryOf< R, S >["moves"][number] ? M : MoveNotLearnedBy<R, S, M>; M [ "flare-blitz", "dragon-claw", "earthquake", "surf" ] → [ "flare-blitz", "dragon-claw", "earthquake", MoveNotLearnedBy ]
charizard_moves_champions_m_a [string, ..., MoveNotLearnedBy] [string, ..., string]
None
None