Wrapping Zod with extern()

Use extern() to wrap a Zod schema (or any Standard Schema v1 library) into a @cleverbrush/schema builder. Mix and match schemas from different libraries — types and getErrorsFor() work across the boundary.

editor.ts
Loading editor...
Waiting for code...
Assign a validation result to a variable to see output here, e.g. const result = schema.validate(data)
Inferred Type

Define a schema to see its inferred TypeScript type.

InferType<typeof schema> automatically derives the TypeScript type from your schema definition.