microfoom
API referenceFunctions

makeStandardSchema

Function: makeStandardSchema()

function makeStandardSchema<Output>(validate, vendor?): StandardSchemaV1<unknown, Output>;

Defined in: packages/microfoom-core/src/standard_schema.ts:60

Build a Standard Schema from a plain validate function. Used by the parameter derivation (ADR-0003) to package a derived validator and by tests; keeps the ~standard shape in one place.

Type Parameters

Type Parameter
Output

Parameters

ParameterTypeDefault value
validate(input) => anyundefined
vendorstring"microfoom"

Returns

StandardSchemaV1<unknown, Output>

On this page