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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
260
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
290
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
AIのReact習熟度を測る
uhyo
2
680
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
330
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
3
840
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
160
自宅LLMの話
jacopen
1
720
AI Agentをシステムに組み込む前にゆるく向き合ってみる
hayama17
0
130
徹底討論!ECS vs EKS!
daitak
3
1.7k
AWS Security Agent といっしょに脅威モデリングをやってみよう
amarelo_n24
1
210
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
260
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
170
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
580
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
240
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
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