* Check if value is a Zod schema (has toJSONSchema method)
(value: unknown)
| 91 | * Check if value is a Zod schema (has toJSONSchema method) |
| 92 | */ |
| 93 | function isZodSchema(value: unknown): value is { toJSONSchema(): Record<string, unknown> } { |
| 94 | return ( |
| 95 | value != null && |
| 96 | typeof value === "object" && |
| 97 | "toJSONSchema" in value && |
| 98 | typeof (value as { toJSONSchema: unknown }).toJSONSchema === "function" |
| 99 | ); |
| 100 | } |
| 101 | |
| 102 | async function withTimeout<T>(promise: Promise<T>, timeoutMs: number, message: string): Promise<T> { |
| 103 | let timeout: ReturnType<typeof setTimeout> | undefined; |
no outgoing calls
no test coverage detected
searching dependent graphs…