Variable QueryBooleanSchemaConst

QueryBooleanSchema: ZodPipeline<
    ZodEffects<
        ZodUnion<[ZodString, ZodBoolean]>,
        undefined | boolean,
        string | boolean,
    >,
    ZodBoolean,
> = ...

A Zod schema for a boolean in a query parameter. Since query parameters must be strings, you can't validate them with a z.boolean() schema. You can use this as a schema which parses a string into a boolean. It uses the yn library for parsing.

QueryBooleanSchema.parse('1'); // true
QueryBooleanSchema.parse('false'); // false