Skip to content

StandardSchemaV1

Defined in: packages/validate/src/standard.ts:11

The Standard Schema interface, declared here rather than imported.

The spec is structural: a schema is anything carrying a ~standard property of this shape. Declaring it locally costs twenty lines of types that vanish at build time, and buys a self-contained .d.ts — no dependency for a consumer to resolve, nothing for attw to trip over.

https://standardschema.dev

Output = unknown

readonly ~standard: object

Defined in: packages/validate/src/standard.ts:12

readonly validate: (value) => StandardResult<Output> | Promise<StandardResult<Output>>

Checks a value against the schema, returning the result or a promise of it.

unknown

StandardResult<Output> | Promise<StandardResult<Output>>

readonly vendor: string

readonly version: 1