@servicenow/sdk - v4.14.3
    Preparing search index...

    Type Alias UnrepresentableHandler<T>

    UnrepresentableHandler: (
        ctx: { message: string; path: (string | number)[]; zodSchema: T },
    ) => BaseSchema | "throw" | "any" | undefined

    Called for each schema that has no JSON Schema equivalent. Return a JSON Schema to use in its place, "any" to fall back to the unrepresentable: "any" behavior, or "throw"/undefined to throw the default error. Throwing from the handler propagates, so custom errors work too.

    Type Parameters

    Type Declaration

      • (
            ctx: { message: string; path: (string | number)[]; zodSchema: T },
        ): BaseSchema | "throw" | "any" | undefined
      • Parameters

        • ctx: { message: string; path: (string | number)[]; zodSchema: T }
          • message: string

            The error Zod would throw. Distinguishes sites that share a zodSchema, e.g. an undefined vs a bigint member of the same literal.

          • path: (string | number)[]
          • zodSchema: T

        Returns BaseSchema | "throw" | "any" | undefined