zod 4.3.2 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -92,7 +92,7 @@ export interface ZodType<
|
|
|
92
92
|
refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(
|
|
93
93
|
check: Ch,
|
|
94
94
|
params?: string | core.$ZodCustomParams
|
|
95
|
-
): Ch extends (arg: any) => arg is infer R ? core
|
|
95
|
+
): Ch extends (arg: any) => arg is infer R ? this & ZodType<R, core.input<this>> : this;
|
|
96
96
|
superRefine(
|
|
97
97
|
refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>
|
|
98
98
|
): this;
|
package/src/v4/core/versions.ts
CHANGED
package/v4/classic/schemas.d.cts
CHANGED
|
@@ -35,7 +35,7 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
|
|
|
35
35
|
safeDecode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.output<this>>;
|
|
36
36
|
safeEncodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.input<this>>>;
|
|
37
37
|
safeDecodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
|
38
|
-
refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | core.$ZodCustomParams): Ch extends (arg: any) => arg is infer R ? core
|
|
38
|
+
refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | core.$ZodCustomParams): Ch extends (arg: any) => arg is infer R ? this & ZodType<R, core.input<this>> : this;
|
|
39
39
|
superRefine(refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>): this;
|
|
40
40
|
overwrite(fn: (x: core.output<this>) => core.output<this>): this;
|
|
41
41
|
optional(): ZodOptional<this>;
|
package/v4/classic/schemas.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
|
|
|
35
35
|
safeDecode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.output<this>>;
|
|
36
36
|
safeEncodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.input<this>>>;
|
|
37
37
|
safeDecodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
|
38
|
-
refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | core.$ZodCustomParams): Ch extends (arg: any) => arg is infer R ? core
|
|
38
|
+
refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | core.$ZodCustomParams): Ch extends (arg: any) => arg is infer R ? this & ZodType<R, core.input<this>> : this;
|
|
39
39
|
superRefine(refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>): this;
|
|
40
40
|
overwrite(fn: (x: core.output<this>) => core.output<this>): this;
|
|
41
41
|
optional(): ZodOptional<this>;
|
package/v4/core/versions.cjs
CHANGED
package/v4/core/versions.js
CHANGED