forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
insight.d.ts
49 lines (40 loc) · 1.14 KB
/
insight.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
39
40
41
42
43
44
45
46
47
48
49
// Type definitions for insight 0.4.3
// Project: https://github.com/yeoman/insight
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module insight {
interface IOptions {
trackingCode:string;
trackingProvider?:string;
packageName:string;
packageVersion?:string;
config?:IConfigstore;
}
interface IConfigstore {
path:string;
all:any;
get(key:string):any;
set(key:string, val:any):void;
del(key:string):void;
}
}
declare module "insight" {
import IOptions = insight.IOptions;
import IConfigstore = insight.IConfigstore;
class Insight {
trackingCode:string;
trackingProvider:string;
packageName:string;
packageVersion:string;
os:string;
nodeVersion:string;
appVersion:string;
config:IConfigstore;
optOut:boolean;
clientId:string;
constructor(options:IOptions);
track(...args:string[]):void;
askPermission(msg?:string, cb?:Function):void;
}
export = Insight;
}