bupkis
    Preparing search index...

    Interface $ZodCustomDef<O>

    interface $ZodCustomDef<O = unknown> {
        type: "custom";
        check: "custom";
        path?: PropertyKey[];
        error?: $ZodErrorMap<$ZodIssue>;
        params?: Record<string, any>;
        fn: (arg: O) => unknown;
        checks?: z.core.$ZodCheck<never>[];
        abort?: boolean;
        when?: (payload: ParsePayload) => boolean;
    }

    Type Parameters

    • O = unknown

    Hierarchy (View Summary)

    Index

    Properties

    type: "custom"
    check: "custom"
    path?: PropertyKey[]
    params?: Record<string, any>
    fn: (arg: O) => unknown
    checks?: z.core.$ZodCheck<never>[]
    abort?: boolean

    If true, no later checks will be executed if this check fails. Default false.

    when?: (payload: ParsePayload) => boolean

    If provided, this check will only be executed if the function returns true. Defaults to payload => z.util.isAborted(payload).