Documentation
    Preparing search index...
    interface SchemaUtils<Raw, Parsed> {
        jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw;
        nullable: () => Schema<Raw | null, Parsed | null>;
        optional: () => Schema<Raw | null | undefined, Parsed | undefined>;
        optionalNullable: () => Schema<
            Raw
            | null
            | undefined,
            Parsed | null | undefined,
        >;
        parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed;
        transform: <Transformed>(
            transformer: SchemaTransformer<Parsed, Transformed>,
        ) => Schema<Raw, Transformed>;
    }

    Type Parameters

    • Raw
    • Parsed
    Index

    Properties

    jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw
    nullable: () => Schema<Raw | null, Parsed | null>
    optional: () => Schema<Raw | null | undefined, Parsed | undefined>
    optionalNullable: () => Schema<
        Raw
        | null
        | undefined,
        Parsed | null | undefined,
    >
    parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed
    transform: <Transformed>(
        transformer: SchemaTransformer<Parsed, Transformed>,
    ) => Schema<Raw, Transformed>