🔮 OSS Fellow @ Clerk
🦆 Friendly neighborhood TypeScript nerd
🧑🏼💻 Prev @ Bun, EdgeDB, YC, MIT
good question! they're identical at runtime, but their type signatures differ in an important way.
unlike .parse()—which accepts `unknown` input—decode and encode expect strongly-typed inputs
good question! they're identical at runtime, but their type signatures differ in an important way.
unlike .parse()—which accepts `unknown` input—decode and encode expect strongly-typed inputs
.decode() — "forward" parsing
.encode() — "reverse" parsing
.decode() — "forward" parsing
.encode() — "reverse" parsing
z.codec() is a new API for defining *bi-directional transformations* in Zod
z.codec() is a new API for defining *bi-directional transformations* in Zod
making this stuff auto-discoverable would resolve one of the biggest usability issues with today's agents/IDEs. a simple convention here will go a long way! 🤘
making this stuff auto-discoverable would resolve one of the biggest usability issues with today's agents/IDEs. a simple convention here will go a long way! 🤘
✓ features are week-to-week (~140k impressions)
✓ simple auction-based pricing (per-week or standing bids accepted)
✓ artwork subject to approval
DM/email me if your company is interested! 🤙
✓ features are week-to-week (~140k impressions)
✓ simple auction-based pricing (per-week or standing bids accepted)
✓ artwork subject to approval
DM/email me if your company is interested! 🤙
🙏 @jayair.bsky.social @katt.dev @chorobin.bsky.social @jumr.dev @souporserious.com @awad.dev @unnoq.com
🙏 @jayair.bsky.social @katt.dev @chorobin.bsky.social @jumr.dev @souporserious.com @awad.dev @unnoq.com
Given a spec-compliant validator you can:
a) validate data with it (duh)
b) retrieve validation errors in a standardized format
c) extract its inferred input & output types
Given a spec-compliant validator you can:
a) validate data with it (duh)
b) retrieve validation errors in a standardized format
c) extract its inferred input & output types
It was designed collaboratively by myself (creator of Zod 👋), @fabianhiller.com (creator of Valibot), and @ssalbdivad.dev (creator of ArkType).
It’s the final form of something I tweeted nearly two years ago.
It was designed collaboratively by myself (creator of Zod 👋), @fabianhiller.com (creator of Valibot), and @ssalbdivad.dev (creator of ArkType).
It’s the final form of something I tweeted nearly two years ago.
her response changed my life
her response changed my life
- lazily computes a value when accessed
- autocaches the result
- typesafe
i use this all the time...unlike a naive getter there's no runtime overhead after the first invokation since the getter itself is overwritten with the memoized value
- lazily computes a value when accessed
- autocaches the result
- typesafe
i use this all the time...unlike a naive getter there's no runtime overhead after the first invokation since the getter itself is overwritten with the memoized value