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