MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / callPrivate

Function callPrivate

apps/cli/src/agent/__tests__/extension-host.test.ts:70–74  ·  view source on GitHub ↗

* Helper to call private methods for testing * This uses a more permissive type to avoid TypeScript errors with private methods

(host: ExtensionHost, method: string, ...args: unknown[])

Source from the content-addressed store, hash-verified

68 * This uses a more permissive type to avoid TypeScript errors with private methods
69 */
70function callPrivate<T>(host: ExtensionHost, method: string, ...args: unknown[]): T {
71 const fn = (host as unknown as PrivateHost)[method] as ((...a: unknown[]) => T) | undefined
72 if (!fn) throw new Error(`Method ${method} not found`)
73 return fn.apply(host, args)
74}
75
76/**
77 * Helper to spy on private methods

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected