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

Method get

packages/zod/src/v4/core/registries.ts:60–72  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

58 }
59
60 get<S extends Schema>(schema: S): $replace<Meta, S> | undefined {
61 // return this._map.get(schema) as any;
62
63 // inherit metadata
64 const p = schema._zod.parent as Schema;
65 if (p) {
66 const pm: any = { ...(this.get(p) ?? {}) };
67 delete pm.id; // do not inherit id
68 const f = { ...pm, ...this._map.get(schema) } as any;
69 return Object.keys(f).length ? f : undefined;
70 }
71 return this._map.get(schema) as any;
72 }
73
74 has(schema: Schema): boolean {
75 return this._map.has(schema);

Callers 15

handleScrollFunction · 0.80
_og.tsxFile · 0.80
GETFunction · 0.80
GETFunction · 0.80
fetchStarsFunction · 0.80
getFunction · 0.80
_parseMethod · 0.80
map.test.tsFile · 0.80
convertBaseSchemaFunction · 0.80
_installLazyMethodsFunction · 0.80
metaFunction · 0.80
getFunction · 0.80

Calls

no outgoing calls

Tested by 1

describeFunction · 0.64