()
| 67 | |
| 68 | // Test autocomplete and type inference |
| 69 | function 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 | |
| 82 | function testExpectedErrors() { |
| 83 | // @ts-expect-error - 'invalidMethod' is not a valid method |
nothing calls this directly
no outgoing calls
no test coverage detected