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
510
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
個人の生産性は青天井、そんな時代のエンジニアはチームに何をなすべきか
subroh0508
0
82
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
3
1.4k
Pull Request、AIレビューだけでマージしてOK?
subroh0508
1
110
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
640
"スキルファースト"で作る、AIの自走環境
subroh0508
2
1k
AIを賢くしたいなら、まずは人間の改善ループから
subroh0508
0
310
"S/N-GUL4R1TY"に向けて人類は何をすべきなのか
subroh0508
0
89
画面の向こうから「気づき」を得る 画面の向こうを「物差し」として捉える
subroh0508
1
460
蓮ノ空女学院スクールアイドルクラブはなぜ強いのか
subroh0508
0
130
Other Decks in Technology
See All in Technology
AIエージェントを最高のパートナーに育てる方法|評価と判断軸を育てる5つのステップ
koichiaoki
1
160
.NET WebAssemblyで実現するクライアントサイドAI推論:NuGetからViteまで、2つのエコシステムを繋ぐビルド戦略
yamachu
0
400
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.5k
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
1.8k
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
420
AI coding 整合正規方法
philipz
0
430
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
2
260
SREは、MCPとAutopilotをこう使え!
kazumax55
3
940
Vibe Coding で作ったプロダクトをどう安全に動かすか / How to Safely Run Products Built with Vibe Coding
glidenote
0
450
beyond jj: config & tools ecosystem
indirect
0
5.7k
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.7k
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
25
17k
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
730
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
340
Being A Developer After 40
akosma
91
590k
Mobile First: as difficult as doing things right
swwweet
225
10k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
700
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
How to build a perfect <img>
jonoalderson
1
6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
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