• Parse the parameters of a h3 event.

    For example /[test].get.ts binds the parameter test to a value, for example /1 then results in test = 1

    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 = "Parameter parsing failed"

    Returns TypeOf<ZodSchema>

Generated using TypeDoc