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

Commit 3fd49cf

Browse files
committed
fix(types): update typings set function value argument to be any
allows passing number and booleans, but don't want to narrow it too much
1 parent 7986a44 commit 3fd49cf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

vue-analytics.d.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ declare module 'vue-analytics' {
2626
(route: VueRouter): void;
2727
}
2828

29+
interface SetFieldValue {
30+
field: string;
31+
value: any;
32+
}
33+
2934
interface setFn {
30-
(fieldName: string, fieldValue: string): void;
31-
(options: {
32-
field: string, value: string
33-
}): void;
35+
(fieldName: string, fieldValue: any): void;
36+
(options: Record<string, any>): void;
3437
}
3538

3639
interface socialFn {
@@ -229,7 +232,7 @@ declare module 'vue-analytics' {
229232
disabled?: boolean | (() => boolean) | (() => Promise<boolean>) | Promise<boolean>,
230233
checkDuplicatedScript?: boolean,
231234
disableScriptLoader?: boolean
232-
set?: { field: string, value: string }[],
235+
set?: SetFieldValue[],
233236
commands?: any,
234237
beforeFirstHit?: () => void,
235238
ready?: () => void

0 commit comments

Comments
 (0)