API Reference
    Preparing search index...

    Type Alias ParserOptions<TSchema, TEnvelope, TSafeParse, TErrorHandlerReturn>

    ParserOptions: ParserOptionsBase<TSchema, TEnvelope> & (
        TSafeParse extends true
            ? { errorHandler?: never; safeParse: TSafeParse }
            : {
                errorHandler?: ErrorHandler<TErrorHandlerReturn>;
                safeParse?: TSafeParse;
            }
    )

    Options for the parser used in middy middleware and decorator.

    safeParse and errorHandler are mutually exclusive: with safeParse the parser never throws, so an errorHandler would never be invoked.

    Type Parameters

    • TSchema extends StandardSchemaV1
    • TEnvelope extends Envelope
    • TSafeParse extends boolean
    • TErrorHandlerReturn = unknown