@@ -4,14 +4,16 @@ declare module 'vue-analytics' {
44 import VueRouter , { Route } from 'vue-router' ;
55 import { Store } from 'vuex' ;
66
7+ interface EventPayload {
8+ eventCategory : string ;
9+ eventAction ?: string ;
10+ eventLabel ?: string ;
11+ eventValue ?: number ;
12+ }
13+
714 interface eventFn {
815 ( category : string , action ?: string , label ?: string , value ?: number ) : void ;
9- ( options : {
10- eventCategory : string ,
11- eventAction ?: string ,
12- eventLabel ?: string ,
13- eventValue ?: number
14- } ) : void ;
16+ ( options : EventPayload ) : void ;
1517 }
1618
1719 type pageDetails = {
@@ -36,23 +38,27 @@ declare module 'vue-analytics' {
3638 ( options : Record < string , any > ) : void ;
3739 }
3840
41+ interface SocialPayload {
42+ socialNetwork : string ;
43+ socialAction : string ;
44+ socialTarget : string ;
45+ }
46+
3947 interface socialFn {
4048 ( network : string , action : string , target : string ) : void ;
41- ( options : {
42- socialNetwork : string ,
43- socialAction : string ,
44- socialTarget : string
45- } ) : void ;
49+ ( options : SocialPayload ) : void ;
50+ }
51+
52+ interface TimePayload {
53+ timingCategory : string ;
54+ timingVar : string ;
55+ timingValue : number ;
56+ timingLabel : string ;
4657 }
4758
4859 interface timeFn {
4960 ( category : string , variable : string , value : number , label : string ) : void ;
50- ( options : {
51- timingCategory : string ,
52- timingVar : string ,
53- timingValue : number ,
54- timingLabel : string
55- } ) : void ;
61+ ( options : TimePayload ) : void ;
5662 }
5763
5864 interface EcommerceItem {
@@ -159,12 +165,14 @@ declare module 'vue-analytics' {
159165 send ( ) : void ;
160166 }
161167
168+ interface ScreenViewPayload {
169+ screenName : string ;
170+ [ otherProperties : string ] : any ;
171+ }
172+
162173 interface screenviewFn {
163174 ( screen : string ) :void ;
164- ( option : {
165- screenName : string ;
166- [ otherProperties : string ] : any ;
167- } ) : void ;
175+ ( option : ScreenViewPayload ) : void ;
168176 }
169177
170178 interface requireFn {
0 commit comments