forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calq.d.ts
34 lines (28 loc) · 902 Bytes
/
calq.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
// Type definitions for calq
// Project: https://calq.io/docs/client/javascript/reference
// Definitions by: Eirik Hoem <https://github.com/eirikhm>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Calq
{
action:Calq.Action;
user:Calq.User;
init(writeKey:string, options?:{[index:string]:any}):void;
}
declare module Calq
{
interface Action
{
track(action:string, params?:{[index:string]:any}):void;
trackSale(action:string, params:{[index:string]:any}, currency:string, amount:number):void;
trackHTMLLink(action:string, params?:{[index:string]:any}):void;
trackPageView(action?:string):void;
setGlobalProperty(name:string,value:any):void;
}
interface User
{
identify(userId:string):void;
clear():void;
profile(params:{[index:string]:any}):void;
}
}
declare var calq:Calq;