MCPcopy Create free account
hub / github.com/github/copilot-sdk / isZodSchema

Function isZodSchema

nodejs/src/client.ts:93–100  ·  view source on GitHub ↗

* Check if value is a Zod schema (has toJSONSchema method)

(value: unknown)

Source from the content-addressed store, hash-verified

91 * Check if value is a Zod schema (has toJSONSchema method)
92 */
93function 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
102async function withTimeout<T>(promise: Promise<T>, timeoutMs: number, message: string): Promise<T> {
103 let timeout: ReturnType<typeof setTimeout> | undefined;

Callers 1

toJsonSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…