MCPcopy Create free account
hub / github.com/Noumena-Network/code / lazySchema

Function lazySchema

src/utils/lazySchema.ts:5–8  ·  view source on GitHub ↗
(factory: () => T)

Source from the content-addressed store, hash-verified

3 * Used to defer Zod schema construction from module init time to first access.
4 */
5export function lazySchema<T>(factory: () => T): () => T {
6 let cached: T | undefined
7 return () => (cached ??= factory())
8}

Callers 15

PowerShellTool.tsxFile · 0.85
GlobTool.tsFile · 0.85
TeamDeleteTool.tsFile · 0.85
SkillTool.tsFile · 0.85
McpAuthTool.tsFile · 0.85
ConfigTool.tsFile · 0.85
TaskCreateTool.tsFile · 0.85
TaskGetTool.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected