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

Function describe

packages/zod/src/v4/core/api.ts:1696–1706  ·  view source on GitHub ↗
(description: string)

Source from the content-addressed store, hash-verified

1694
1695// @__NO_SIDE_EFFECTS__
1696export function describe<T>(description: string): checks.$ZodCheck<T> {
1697 const ch = new checks.$ZodCheck({ check: "describe" });
1698 ch._zod.onattach = [
1699 (inst) => {
1700 const existing = registries.globalRegistry.get(inst) ?? {};
1701 registries.globalRegistry.add(inst, { ...existing, description });
1702 },
1703 ];
1704 ch._zod.check = () => {}; // no-op check
1705 return ch;
1706}
1707
1708// @__NO_SIDE_EFFECTS__
1709export function meta<T>(metadata: registries.GlobalMeta): checks.$ZodCheck<T> {

Callers 4

be.test.tsFile · 0.50
ru.test.tsFile · 0.50
he.test.tsFile · 0.50

Calls 2

getMethod · 0.80
addMethod · 0.80

Tested by

no test coverage detected