Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ポケモンの型をTypeScriptの型システムで表現してみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
subroh_0508
June 10, 2026
Technology
390
0
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
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
300
"スキルファースト"で作る、AIの自走環境
subroh0508
1
890
AIを賢くしたいなら、まずは人間の改善ループから
subroh0508
0
180
"S/N-GUL4R1TY"に向けて人類は何をすべきなのか
subroh0508
0
50
画面の向こうから「気づき」を得る 画面の向こうを「物差し」として捉える
subroh0508
1
340
蓮ノ空女学院スクールアイドルクラブはなぜ強いのか
subroh0508
0
88
2026年、書籍をちゃんと読むぞ👊 〜約3万円分の書籍を積読にしないためにやること〜
subroh0508
5
870
「発信の依頼」が採用広報活動の立ち上げに効くかもしれない
subroh0508
1
800
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
1.6k
Other Decks in Technology
See All in Technology
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
180
【FinOps】データドリブンな意思決定を目指して
z63d
0
120
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
250
複数のSONiCディストリビューションを触りながら比較してみた
sonic
0
120
Claude Codeをどのように キャッチアップしているか
oikon48
13
8.8k
Comment regagner la souveraineté de vos données tout en étant payé grâce à Nostr !
rlifchitz
0
180
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
20
7.2k
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
1
1.7k
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
3k
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
10
1.5k
ロボティクスの技術 / Robotics Technology
ks91
PRO
0
130
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
160
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
300
Designing for Timeless Needs
cassininazir
1
260
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Facilitating Awesome Meetings
lara
57
7k
Building AI with AI
inesmontani
PRO
1
1.1k
The Spectacular Lies of Maps
axbom
PRO
1
820
A Tale of Four Properties
chriscoyier
163
24k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
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