Safely parses the input using the provided Zod schema (v3 or v4) and returns a result object indicating success or failure. This function is compatible with both Zod v3 and v4 schemas.
interopSafeParse<T>(schema: InteropZodType<T>, input: unknown): InteropZodSafeParseResult<T>| Name | Type | Description |
|---|---|---|
schema* | InteropZodType<T> | The Zod schema (v3 or v4) to use for parsing. |
input* | unknown | The input value to parse. |