Asynchronously parses a value against a Zod schema.

If parsing fails.

  • Type Parameters

    • T

    Parameters

    • value: T

      The value to parse.

    • schema: ZodType<T, ZodTypeDef, T>

      The Zod schema to parse against.

    Returns Promise<T>

    A promise that resolves to the parsed value.