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
520
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
87
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
3
1.5k
Pull Request、AIレビューだけでマージしてOK?
subroh0508
1
120
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
680
"スキルファースト"で作る、AIの自走環境
subroh0508
2
1k
AIを賢くしたいなら、まずは人間の改善ループから
subroh0508
0
320
"S/N-GUL4R1TY"に向けて人類は何をすべきなのか
subroh0508
0
95
画面の向こうから「気づき」を得る 画面の向こうを「物差し」として捉える
subroh0508
1
470
蓮ノ空女学院スクールアイドルクラブはなぜ強いのか
subroh0508
0
180
Other Decks in Technology
See All in Technology
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
150
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.2k
Jetson Orin Nanoとk3sとローカルLLMで音声文字起こしシステム作ってみた
y_sera15
0
100
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.3k
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
360
Deep Data Security 機能解説
oracle4engineer
PRO
2
760
今こそ知りたいAmplifyGen2
mkdev10
2
160
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
580
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
370
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
0
100
大型犬好きによるPugの紹介
yamanoku
1
110
分析AIエージェントを育てる、動く環境を育てる
codatum
1
740
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Are puppies a ranking factor?
jonoalderson
2
4k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Balancing Empowerment & Direction
lara
6
1.3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
So, you think you're a good person
axbom
PRO
2
2.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
770
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