Skip to content

Commit 018e87d

Browse files
committed
Update events metadata type
1 parent f3860e3 commit 018e87d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/esnext/Lib.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface TrackEventOptions {
2222
unique?: boolean;
2323
/** Event-related metadata object with string values. */
2424
meta?: {
25-
[key: string]: string;
25+
[key: string]: string | number | boolean | null | undefined;
2626
};
2727
}
2828
export interface IPageViewPayload {
@@ -37,7 +37,7 @@ export interface IPageViewPayload {
3737
pg?: string | null;
3838
/** Pageview-related metadata object with string values. */
3939
meta?: {
40-
[key: string]: string;
40+
[key: string]: string | number | boolean | null | undefined;
4141
};
4242
}
4343
export interface IErrorEventPayload {
@@ -48,7 +48,7 @@ export interface IErrorEventPayload {
4848
filename?: string | null;
4949
stackTrace?: string | null;
5050
meta?: {
51-
[key: string]: string;
51+
[key: string]: string | number | boolean | null | undefined;
5252
};
5353
}
5454
export interface IInternalErrorEventPayload extends IErrorEventPayload {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swetrix",
3-
"version": "3.7.0",
3+
"version": "3.7.1",
44
"description": "The JavaScript analytics client for Swetrix Analytics",
55
"type": "module",
66
"main": "dist/swetrix.cjs.js",

src/Lib.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface TrackEventOptions {
4343

4444
/** Event-related metadata object with string values. */
4545
meta?: {
46-
[key: string]: string
46+
[key: string]: string | number | boolean | null | undefined
4747
}
4848
}
4949

@@ -61,7 +61,7 @@ export interface IPageViewPayload {
6161

6262
/** Pageview-related metadata object with string values. */
6363
meta?: {
64-
[key: string]: string
64+
[key: string]: string | number | boolean | null | undefined
6565
}
6666
}
6767

@@ -74,7 +74,7 @@ export interface IErrorEventPayload {
7474
filename?: string | null
7575
stackTrace?: string | null
7676
meta?: {
77-
[key: string]: string
77+
[key: string]: string | number | boolean | null | undefined
7878
}
7979
}
8080

0 commit comments

Comments
 (0)