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
Standard Schema: スキーマライブラリの統一企画とは何か
Search
Nozomu Ikuta
May 24, 2025
Technology
2.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Standard Schema: スキーマライブラリの統一企画とは何か
TSKaigi 2025 の登壇資料です
Nozomu Ikuta
May 24, 2025
More Decks by Nozomu Ikuta
See All by Nozomu Ikuta
Go 1.24 のイテレータ from byte to bite
nozomuikuta
0
110
Demystifying Vite Internals
nozomuikuta
3
2.9k
Nuxt DevTools 101
nozomuikuta
3
2.2k
Deep Dive to UnJS and Nuxt 3
nozomuikuta
3
3.1k
OSS作者はじめの一歩
nozomuikuta
1
250
2022 年は Docus に注目しよう
nozomuikuta
1
140
Go初学者、最初の1週間の学び
nozomuikuta
1
130
Other Decks in Technology
See All in Technology
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
110
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
0
790
アジャイルな経理と Claude Code と経営の未来
kawaguti
PRO
3
190
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
120
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.7k
入門!AWS Blocks
ysuzuki
1
190
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
2
400
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
0
290
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
310
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
170
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
150
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
260
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.8k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
HDC tutorial
michielstock
2
720
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
Technical Leadership for Architectural Decision Making
baasie
3
420
Transcript
Nozomu Ikuta 24th May 2025 Standard Schema: εΩʔϚϥΠϒϥϦͷ౷Ұن֨ͱԿ͔
εΩʔϚϥΠϒϥϦͬͯ·͔͢
• Zod • Valibot • ArkType • etc.
͍͟͏ͱ՝͋Γ·͢
• ϩοΫΠϯ • ΞμϓλɺΞμϓλɺΞμϓλ… • etc.
newmo Ͱͬͯͳ͍Ͱ͢
Tierͷߟ͑ํ Tier 1 : ͜ΕΛࣺͯΔ࣌ίʔυΛҰ͔Β ॻ͖֮͢ޛΛ࣋ͭʮ৺த͢Δʯ૬ख Tier 2 : ࠩ͠ସ͑ʹେ͖ͳ࿑ྗΛඞཁͱ
͢Δʮڧ͘ґଘ͢Δʯ૬ख Tier 3 : ͍ͣΕࠩ͠ସ͑Δ͜ͱΛఆͨ͠ ʮґଘΛܰ͘͢Δʯ૬ख Communication Design 32 Modular Monolith Monorepo ~ γϯϓϧ͞Λอͪͳ͕ΒmonorepoͷϝϦοτΛ࠷େԽ͢Δ ~ JSConf 2024 ΑΓ
ఏڙػೳ΄΅ಉ͡
• ϥϯλΠϜόϦσʔγϣϯ • όϦσʔγϣϯͷResultܕ • όϦσʔγϣϯΤϥʔͷҰཡ • εΩʔϚͷܕਪ
Standard Schema
• Zod, Valibot, ArkType ͷ࡞ऀʹΑͬ ͯઃܭ͞Εͨ • StandardSchemaV1 ͱ͍͏୯Ұͷ interface
͓Αͼ namespace ͱͯ͠ ఆٛ͞Ε͍ͯΔ
interface StandardSchemaV1<Input = unknown, Output = Input> { readonly '~standard':
StandardSchemaV1.Props<Input, Output>; } export declare namespace StandardSchemaV1 { // ϓϩύςΟఆٛ } • APIίϯϑϦΫτճආͷͨΊ `~standard` ϓϩύςΟԼʹͯ͢ఆٛ͢Δ
interface Props<Input = unknown, Output = Input> { readonly version:
1; readonly vendor: string; readonly validate: ( value: unknown ) => Result<Output> | Promise<Result<Output>>; readonly types?: Types<Input, Output> | unde fi ned; } • όϦσʔγϣϯؔ • εΩʔϚͷܕਪ
type Result<Output> = SuccessResult<Output> | FailureResult; interface SuccessResult<Output> { readonly
value: Output; readonly issues?: unde fi ned; } interface FailureResult { readonly issues: ReadonlyArray<Issue>; } • όϦσʔγϣϯͷResultܕ • Τϥʔissuesͱ͍͏ྻͰදݱ͢Δ
interface Issue { readonly message: string; readonly path?: ReadonlyArray<PropertyKey |
PathSegment> | unde fi ned; } interface PathSegment { readonly key: PropertyKey; } • όϦσʔγϣϯΤϥʔ • ͻͱͭͷΤϥʔϝοηʔδͱϓϩύςΟΩʔͰදݱ͢Δ
interface Types<Input = unknown, Output = Input> { readonly input:
Input; readonly output: Output; } type InferInput<Schema extends StandardSchemaV1> = NonNullable< Schema['~standard']['types'] >['input']; type InferOutput<Schema extends StandardSchemaV1> = NonNullable< Schema['~standard']['types'] >['output']; • εΩʔϚͷܕਪ
·ͱΊ
• Standard SchemaͰεΩʔϚϥΠϒϥϦͷ૬ޓӡ༻ੑ͕ߴ·Δ • ओཁͳεΩʔϚϥΠϒϥϦ͢ͰʹରԠࡁΈ • εΩʔϚϥΠϒϥϦͷࠩผԽ͕͘͠ͳΔ͔ʢʁʣ
ࢀߟจݙ • https://github.com/standard-schema • https://github.com/colinhacks/zod • https://github.com/fabian-hiller/valibot • https://github.com/arktypeio/arktype •
https://speakerdeck.com/yuisakamoto/modular-monolith-monorepo- sinpurusawobao-tinagaramonoreponomeritutowozui-da-hua-suru
@nozomuikuta • ιϑτΣΞΤϯδχΞ • Vue.js-JP ڞಉΦʔΨφΠβʔ • UnJS ϝϯόʔ •
Shibuya.go ओ࠵
None
None