forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angulartics.d.ts
38 lines (32 loc) · 1.64 KB
/
angulartics.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Type definitions for Angulartics v0.19.2
// Project: http://luisfarzati.github.io/angulartics/
// Definitions by: Steven Fan <https://github.com/stevenfan>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angulartics {
interface IAngularticsStatic {
waitForVendorApi(objectName:string, delay:number, containsField?:any, registerFn?:any, onTimeout?:boolean): void;
}
interface IAnalyticsService {
eventTrack(eventName: string, properties?: any): any;
pageTrack(path:string, location?:angular.ILocationService): any;
setAlias(alias: string): any;
setUsername(username: string): any;
setUserProperties(properties: any): any;
setSuperProperties(properties: any): any;
}
interface IAnalyticsServiceProvider extends angular.IServiceProvider {
virtualPageviews(value: boolean): void;
firstPageview(value: boolean): void;
withBase(value: boolean): void;
withAutoBase(value: boolean): void;
developerMode(value: boolean): void;
registerPageTrack(callback:(path:string, location?:angular.ILocationService) => any): void;
registerEventTrack(callback: (eventName: string, properties?: any) => any): void;
registerSetAlias(callback: (alias: string) => any): void
registerSetUsername(callback: (username: string) => any): void
registerSetUserProperties(callback: (userProperties: any) => any): void
registerSetSuperProperties(callback: (superProperties: any) => any): void
}
}
declare var angulartics:angulartics.IAngularticsStatic;