• Asynchronously parses the input using the provided Zod schema (v3 or v4) and returns a safe parse result. This function handles both Zod v3 and v4 schemas, returning a result object indicating success or failure.

    Type Parameters

    • T

      The expected output type of the schema.

    Parameters

    • schema: InteropZodType<T, T>

      The Zod schema (v3 or v4) to use for parsing.

    • input: unknown

      The input value to parse.

    Returns Promise<InteropZodSafeParseResult<T>>

    A promise that resolves to a safe parse result object.

    If the schema is not a recognized Zod v3 or v4 schema.