8000 Fix $strip · colinhacks/zod@b142ea8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b142ea8

Browse files
committed
Fix $strip
1 parent f350a69 commit b142ea8

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

packages/zod/src/v4/classic/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ export interface ZodObject<
10431043
strict(): ZodObject<Shape, core.$strict>;
10441044

10451045
/** This is the default behavior. This method call is likely unnecessary. */
1046-
strip(): ZodObject<Shape, core.$strict>;
1046+
strip(): ZodObject<Shape, core.$strip>;
10471047

10481048
extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(
10491049
shape: U

play.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,4 @@ import { z } from "zod/v4";
22

33
z;
44

5-
// const time = z.iso.datetime();
6-
console.log("z.iso.datetime()");
7-
console.log(z.iso.datetime()._zod.def.pattern);
8-
9-
console.log("z.iso.datetime({local: true})");
10-
console.log(z.iso.datetime({ local: true })._zod.def.pattern);
11-
12-
console.log("z.iso.datetime({offset: true})");
13-
console.log(z.iso.datetime({ offset: true })._zod.def.pattern);
14-
15-
console.log("z.iso.datetime({precision: z.TimePrecision.Minute})");
16-
console.log(z.iso.datetime({ precision: z.TimePrecision.Minute })._zod.def.pattern);
17-
18-
console.log("z.iso.datetime({offset: true, local: true })");
19-
console.log(z.iso.datetime({ offset: true, local: true })._zod.def.pattern);
5+
console.dir(z.iso.datetime({ local: true }).parse("2025-05-21T12:00"), { depth: null });

0 commit comments

Comments
 (0)
0