ts.data.json - v4.2.1
    Preparing search index...

    Function toStandardSchema

    • Adapts a decoder into a Standard Schema so it drops into any Standard-Schema-aware tool. Opt-in, so apps that don't use Standard Schema never bundle the adapter.

      Type Parameters

      • T

      Parameters

      Returns StandardSchemaV1<unknown, T>

      const schema = toStandardSchema(object({ id: number() }));
      schema['~standard'].validate({ id: 1 });