MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / testTypeInference

Function testTypeInference

packages/sdks/web/src/types.debug.ts:69–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67
68// Test autocomplete and type inference
69function testTypeInference() {
70 // TypeScript should infer the correct types
71 const trackCall = window.op.track;
72 // trackCall should be: (name: string, properties?: TrackProperties) => Promise<void>
73
74 const identifyCall = window.op.identify;
75 // identifyCall should be: (payload: IdentifyPayload) => Promise<void>
76
77 // Callable function should accept OpenPanelMethods
78 const callable = window.op;
79 // callable should be callable with OpenPanelMethods
80}
81
82function testExpectedErrors() {
83 // @ts-expect-error - 'invalidMethod' is not a valid method

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected