Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
fix(types): update typings set function value argument to be any
Browse files Browse the repository at this point in the history
allows passing number and booleans, but don't want to narrow it too much
  • Loading branch information
romansp committed Dec 16, 2019
1 parent 7986a44 commit 3fd49cf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions vue-analytics.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ declare module 'vue-analytics' {
(route: VueRouter): void;
}

interface SetFieldValue {
field: string;
value: any;
}

interface setFn {
(fieldName: string, fieldValue: string): void;
(options: {
field: string, value: string
}): void;
(fieldName: string, fieldValue: any): void;
(options: Record<string, any>): void;
}

interface socialFn {
Expand Down Expand Up @@ -229,7 +232,7 @@ declare module 'vue-analytics' {
disabled?: boolean | (() => boolean) | (() => Promise<boolean>) | Promise<boolean>,
checkDuplicatedScript?: boolean,
disableScriptLoader?: boolean
set?: { field: string, value: string }[],
set?: SetFieldValue[],
commands?: any,
beforeFirstHit?: () => void,
ready?: () => void
Expand Down

0 comments on commit 3fd49cf

Please sign in to comment.