Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 44f7c76

Browse files
committed
fix: extend the PageView type to allow arbitrary keys
1 parent 65c4cf6 commit 44f7c76

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/store/pageview.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ViewStore {
4141
): void {
4242
if (!features || Object.keys(features).length < 1) return;
4343
const ts = timeStampInSecs();
44-
const pageView = {
44+
const pageView: PageView = {
4545
ts,
4646
features,
4747
...metadata,

types/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ export type PageFeatureResult = {
55
value: number[];
66
};
77

8-
export interface PageView {
8+
export type PageView = {
99
ts: number;
1010
features: Record<string, PageFeatureResult>;
11-
}
11+
[key: string]: any;
12+
};
1213

1314
// Audience definition interfaces
1415

0 commit comments

Comments
 (0)