Skip to content

Commit 7aecb61

Browse files
committed
Clean up ZodFunction
1 parent 5ac95df commit 7aecb61

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/zod/src/v4/classic/tests/function.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ test("args method", () => {
6969
const t1 = z.function();
7070
type t1 = (typeof t1)["_input"];
7171
expectTypeOf<t1>().toEqualTypeOf<(...args_1: never[]) => unknown>();
72+
t1._input;
7273

7374
const t2args = z.tuple([z.string()], z.unknown());
7475

packages/zod/src/v4/core/function.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,16 @@ export class $ZodFunction<
4545
Args extends $ZodFunctionIn = $ZodFunctionIn,
4646
Returns extends $ZodFunctionOut = $ZodFunctionOut,
4747
> {
48-
_def: $ZodFunctionDef<Args, Returns>;
48+
// _zod!: {
49+
// def: $ZodFunctionDef<Args, Returns>;
50+
// input: $InferInnerFunctionType<Args, Returns>;
51+
// output: $InferOuterFunctionType<Args, Returns>;
52+
// };
53+
4954
def: $ZodFunctionDef<Args, Returns>;
55+
56+
/** @deprecated */
57+
_def!: $ZodFunctionDef<Args, Returns>;
5058
_input!: $InferInnerFunctionType<Args, Returns>;
5159
_output!: $InferOuterFunctionType<Args, Returns>;
5260

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy