(schema: T, meta: ParamMeta)
| 36 | const METADATA_STORE = new WeakMap<z.ZodTypeAny, ParamMeta>(); |
| 37 | |
| 38 | export 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 | |
| 44 | export function getParamMeta(schema: z.ZodTypeAny): ParamMeta | undefined { |
| 45 | return METADATA_STORE.get(schema); |
no test coverage detected