Colin McDonnell

Results 423 comments of Colin McDonnell

This is correct as-is actually but I see how it's confusing. The behavior is designed to align with these TypeScript built-ins: https://www.typescriptlang.org/docs/handbook/utility-types.html#excludeuniontype-excludedmembers https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union

Oh 😅 That's been wrong for a long time. Good eye!

Hey! Cool project. The Ecosystem section in the README has been removed in favor of a dedicated page on the v4 docs site: https://github.com/colinhacks/zod/blob/v4/packages/docs/content/ecosystem.mdx If/when KOTYK supports Zod 4, feel...

You need to delve down to the object schema, which gets wrapped by ZodOptional/ZodReadonly etc. ```ts z.object({ ... }).optional().unwrap().shape; z.object({ ... }).nullable().unwrap().shape; z.object({ ... }).readonly().unwrap().shape; ```

There's a fix in the latest beta. Upgrade and let me know how it goes. Not sure if it'll work in production or not...still seeing the warning. Zod is designed...

@niba @schiller-manuel This has landed in Zod 4.0.6, apologies for the delay!

The `.meta()` method is just syntactic sugar for `.register(z.globalRegistry, `). Anyone with advanced use cases will need to define their own registries (say, one per spec). This feels like a...

Landed in 3.25.32 Possibly over-engineered, but I tweaked this to the following: ```ts expect( z.toJSONSchema(z.string().startsWith("hello").includes("cruel").endsWith("world").regex(/stuff/)) ).toMatchInlineSnapshot(` { "$schema": "https://json-schema.org/draft/2020-12/schema", "allOf": [ { "pattern": "^hello.*", }, { "pattern": "cruel", }, {...