mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
// Type definitions for insight 0.4.3
|
|
// Project: https://github.com/yeoman/insight
|
|
// Definitions by: vvakame <http://github.com/vvakame>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace 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;
|
|
}
|
|
}
|
|
|
|
|
|
import IOptions = insight.IOptions;
|
|
import IConfigstore = insight.IConfigstore;
|
|
|
|
declare 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;
|
|
|