Millwork
    Preparing search index...

    Function toStandardSchema

    • Makes a Standard Schema (v1) from a codec, or from a shape or value class.

      • A class gives the same schema as shapeSchema(cls).
      • For a codec, validate reads the raw form with the strict path, so bad input gives issues and no onInvalid report. null and undefined give an issue: a shape schema decides if a field is optional.

      Type Parameters

      Parameters

      Returns StandardSchemaV1<unknown, T>

    • Makes a Standard Schema (v1) from a codec, or from a shape or value class.

      • A class gives the same schema as shapeSchema(cls).
      • For a codec, validate reads the raw form with the strict path, so bad input gives issues and no onInvalid report. null and undefined give an issue: a shape schema decides if a field is optional.

      Type Parameters

      • R
      • V
      • O

      Parameters

      Returns StandardSchemaV1<R, V>