Skip to content

Commit 4dd1818

Browse files
committed
rm type argument in the plugin methods.
1 parent 372e3ac commit 4dd1818

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

express-zod-api/src/zod-plugin.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ const deprecationSetter = function (this: z.ZodType) {
7272
});
7373
};
7474

75-
const labelSetter = function (
76-
this: z.ZodDefault<z.ZodTypeAny>,
77-
defaultLabel: string,
78-
) {
75+
const labelSetter = function (this: z.ZodDefault, defaultLabel: string) {
7976
const { [metaSymbol]: internal = { examples: [] }, ...rest } =
8077
this.meta() || {};
8178
return this.meta({
@@ -165,9 +162,9 @@ if (!(metaSymbol in globalThis)) {
165162

166163
Object.defineProperty(
167164
z.ZodDefault.prototype,
168-
"label" satisfies keyof z.ZodDefault<z.ZodTypeAny>,
165+
"label" satisfies keyof z.ZodDefault,
169166
{
170-
get(): z.ZodDefault<z.ZodTypeAny>["label"] {
167+
get(): z.ZodDefault["label"] {
171168
return labelSetter.bind(this);
172169
},
173170
},

0 commit comments

Comments
 (0)