MCPcopy
hub / github.com/colinhacks/zod / setLimit

Method setLimit

packages/zod/src/v3/types.ts:1482–1495  ·  view source on GitHub ↗
(kind: "min" | "max", value: number, inclusive: boolean, message?: string)

Source from the content-addressed store, hash-verified

1480 }
1481
1482 protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string) {
1483 return new ZodNumber({
1484 ...this._def,
1485 checks: [
1486 ...this._def.checks,
1487 {
1488 kind,
1489 value,
1490 inclusive,
1491 message: errorUtil.toString(message),
1492 },
1493 ],
1494 });
1495 }
1496
1497 _addCheck(check: ZodNumberCheck) {
1498 return new ZodNumber({

Callers 4

gteMethod · 0.95
gtMethod · 0.95
lteMethod · 0.95
ltMethod · 0.95

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected