D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
etb1lp46s9ed
/
washeet.softurecs.com
/
node_modules
/
zod
/
src
/
v4
/
classic
/
tests
/
Filename :
prototypes.test.ts
back
Copy
import { expect, test } from "vitest"; import * as z from "zod/v4"; declare module "zod/v4" { interface ZodType { /** @deprecated */ _classic(): string; } } test("prototype extension", () => { z.ZodType.prototype._classic = function () { return "_classic"; }; // should pass const result = z.string()._classic(); expect(result).toBe("_classic"); // expectTypeOf<typeof result>().toEqualTypeOf<string>(); // clean up z.ZodType.prototype._classic = undefined; });