(...chks)
| 254 | // shared underlying function references across all instances. |
| 255 | _installLazyMethods(inst, "ZodType", { |
| 256 | check(...chks) { |
| 257 | const def = this.def; |
| 258 | return this.clone( |
| 259 | util.mergeDefs(def, { |
| 260 | checks: [ |
| 261 | ...(def.checks ?? []), |
| 262 | ...chks.map((ch) => |
| 263 | typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch |
| 264 | ), |
| 265 | ], |
| 266 | }), |
| 267 | { parent: true } |
| 268 | ); |
| 269 | }, |
| 270 | with(...chks) { |
| 271 | return this.check(...chks); |
| 272 | }, |