• Parse the query of a h3 event.

    For example /bar?sort=ASC binds the query value sort = "ASC"

    Type Parameters

    Type Parameters

    • ZodSchema extends ZodType<any, any, any, ZodSchema>

    Parameters

    • event: CompatibilityEvent

      Input to parse using the passed schema

    • schema: ZodSchema

      Error code of error if parsing fails

    • Optional errorCode: number = 422

      Optional error message if parsing fails

    • Optional errorMessage: string = "Query parsing failed"

    Returns TypeOf<ZodSchema>

Generated using TypeDoc