Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

added missing `TrackProperties` import on web and updated OpenPanelMethods to fix type errors (#149)

Pablo Lopez4adebf40acf2
diff --git a/packages/sdks/web/src/types.d.ts b/packages/sdks/web/src/types.d.ts
index d89d955c2..4c83e168f 100644
--- a/packages/sdks/web/src/types.d.ts
+++ b/packages/sdks/web/src/types.d.ts
@@ -1,4 +1,7 @@
import type { OpenPanel, OpenPanelOptions } from './';
+import type {
+ TrackProperties,
+} from '@openpanel/sdk';
type ExposedMethodsNames =
| 'track'
@@ -19,7 +22,7 @@ export type OpenPanelMethodNames = ExposedMethodsNames | 'init' | 'screenView';
export type OpenPanelMethods =
| ExposedMethods
| ['init', OpenPanelOptions]
- | ['screenView', string | TrackProperties, TrackProperties];
+ | ['screenView', string | TrackProperties | undefined, TrackProperties | undefined];
declare global {
interface Window {