MCPcopy Create free account
hub / github.com/ShipSecAI/studio / withParamMeta

Function withParamMeta

packages/component-sdk/src/param-meta.ts:38–42  ·  view source on GitHub ↗
(schema: T, meta: ParamMeta)

Source from the content-addressed store, hash-verified

36const METADATA_STORE = new WeakMap<z.ZodTypeAny, ParamMeta>();
37
38export function withParamMeta<T extends z.ZodTypeAny>(schema: T, meta: ParamMeta): T {
39 const existing = METADATA_STORE.get(schema);
40 METADATA_STORE.set(schema, mergeParamMeta(existing, meta));
41 return schema;
42}
43
44export function getParamMeta(schema: z.ZodTypeAny): ParamMeta | undefined {
45 return METADATA_STORE.get(schema);

Callers 1

paramFunction · 0.90

Calls 3

mergeParamMetaFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected