zod 3.25.42 → 3.25.43-beta.0
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/dist/types/v4/classic/schemas.d.ts +2 -2
- package/dist/types/v4/core/function.d.ts +5 -4
- package/dist/types/v4/mini/schemas.d.ts +1 -1
- package/package.json +1 -1
- package/v3/index.d.ts +1 -1
- package/v4/core/index.d.ts +1 -1
- package/v4/index.d.ts +3 -1
- package/v4/locales/index.d.ts +1 -1
- package/v4-mini/index.d.ts +1 -1
|
@@ -23,7 +23,7 @@ export interface ZodType<out Output = unknown, out Input = unknown> extends core
|
|
|
23
23
|
spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
|
24
24
|
refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
|
|
25
25
|
/** @deprecated Use `.check()` instead. */
|
|
26
|
-
superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<this
|
|
26
|
+
superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>): this;
|
|
27
27
|
overwrite(fn: (x: core.output<this>) => core.output<this>): this;
|
|
28
28
|
optional(): ZodOptional<this>;
|
|
29
29
|
nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
|
|
@@ -39,7 +39,7 @@ export interface ZodType<out Output = unknown, out Input = unknown> extends core
|
|
|
39
39
|
transform<NewOut>(transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
|
|
40
40
|
catch(def: core.output<this>): ZodCatch<this>;
|
|
41
41
|
catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
|
|
42
|
-
pipe<T extends core.$ZodType<any, this
|
|
42
|
+
pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
|
|
43
43
|
readonly(): ZodReadonly<this>;
|
|
44
44
|
/** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
|
|
45
45
|
describe(description: string): this;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as core from "./core.js";
|
|
1
2
|
import * as schemas from "./schemas.js";
|
|
2
3
|
import { $ZodTuple } from "./schemas.js";
|
|
3
4
|
import type * as util from "./util.js";
|
|
@@ -9,10 +10,10 @@ export interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out
|
|
|
9
10
|
export type $ZodFunctionArgs = schemas.$ZodType<unknown[], unknown[]>;
|
|
10
11
|
export type $ZodFunctionIn = $ZodFunctionArgs;
|
|
11
12
|
export type $ZodFunctionOut = schemas.$ZodType;
|
|
12
|
-
export type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : Args
|
|
13
|
-
export type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : Args
|
|
14
|
-
export type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : Args
|
|
15
|
-
export type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : Args
|
|
13
|
+
export type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.output<Args>) => core.input<Returns>;
|
|
14
|
+
export type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.output<Args>) => util.MaybeAsync<core.input<Returns>>;
|
|
15
|
+
export type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.input<Args>) => core.output<Returns>;
|
|
16
|
+
export type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.input<Args>) => util.MaybeAsync<core.output<Returns>>;
|
|
16
17
|
export declare class $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> {
|
|
17
18
|
def: $ZodFunctionDef<Args, Returns>;
|
|
18
19
|
/** @deprecated */
|
|
@@ -2,7 +2,7 @@ import * as core from "zod/v4/core";
|
|
|
2
2
|
import { util } from "zod/v4/core";
|
|
3
3
|
type SomeType = core.$ZodType;
|
|
4
4
|
export interface ZodMiniType<out Output = unknown, out Input = unknown> extends core.$ZodType<Output, Input> {
|
|
5
|
-
check(...checks: (core.CheckFn<this
|
|
5
|
+
check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
|
|
6
6
|
clone(def?: this["_zod"]["def"], params?: {
|
|
7
7
|
parent: boolean;
|
|
8
8
|
}): this;
|
package/package.json
CHANGED
package/v3/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../dist/types/v3/index.
|
|
1
|
+
export * from "../dist/types/v3/index.js";
|
package/v4/core/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../dist/types/v4/core/index.
|
|
1
|
+
export * from "../../dist/types/v4/core/index.js";
|
package/v4/index.d.ts
CHANGED
package/v4/locales/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../dist/types/v4/locales/index.
|
|
1
|
+
export * from "../../dist/types/v4/locales/index.js";
|
package/v4-mini/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../dist/types/v4/mini/index.
|
|
1
|
+
export * from "../dist/types/v4/mini/index.js";
|