@@ -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 = {
@@ -33,23 +35,27 @@ declare module 'vue-analytics' {
3335 } ) : void ;
3436 }
3537
38+ interface SocialPayload {
39+ socialNetwork : string ;
40+ socialAction : string ;
41+ socialTarget : string ;
42+ }
43+
3644 interface socialFn {
3745 ( network : string , action : string , target : string ) : void ;
38- ( options : {
39- socialNetwork : string ,
40- socialAction : string ,
41- socialTarget : string
42- } ) : void ;
46+ ( options : SocialPayload ) : void ;
47+ }
48+
49+ interface TimePayload {
50+ timingCategory : string ;
51+ timingVar : string ;
52+ timingValue : number ;
53+ timingLabel : string ;
4354 }
4455
4556 interface timeFn {
4657 ( category : string , variable : string , value : number , label : string ) : void ;
47- ( options : {
48- timingCategory : string ,
49- timingVar : string ,
50- timingValue : number ,
51- timingLabel : string
52- } ) : void ;
58+ ( options : TimePayload ) : void ;
5359 }
5460
5561 interface EcommerceItem {
@@ -156,12 +162,14 @@ declare module 'vue-analytics' {
156162 send ( ) : void ;
157163 }
158164
165+ interface ScreenViewPayload {
166+ screenName : string ;
167+ [ otherProperties : string ] : any ;
168+ }
169+
159170 interface screenviewFn {
160171 ( screen : string ) :void ;
161- ( option : {
162- screenName : string ;
163- [ otherProperties : string ] : any ;
164- } ) : void ;
172+ ( option : ScreenViewPayload ) : void ;
165173 }
166174
167175 interface requireFn {
0 commit comments