UNPKG

1.28 kBTypeScriptView Raw
1export declare type InitializeOptions = {
2 androidWriteKey?: string;
3 iosWriteKey?: string;
4};
5export declare type CommonOptions = {
6 [key: string]: any;
7} | null;
8export declare function initialize(options: InitializeOptions): void;
9export declare function identify(userId: string): void;
10export declare function identifyWithTraits(userId: string, traits: {
11 [key: string]: any;
12}, options?: CommonOptions): void;
13export declare function group(groupId: string): void;
14export declare function groupWithTraits(groupId: string, traits: {
15 [key: string]: any;
16}, options?: CommonOptions): void;
17export declare function alias(newId: string, options?: CommonOptions): Promise<boolean>;
18export declare function reset(): void;
19export declare function track(event: string): void;
20export declare function trackWithProperties(event: string, properties: {
21 [key: string]: any;
22}, options?: CommonOptions): void;
23export declare function screen(screenName: string): void;
24export declare function screenWithProperties(event: string, properties: {
25 [key: string]: any;
26}, options?: CommonOptions): void;
27export declare function flush(): void;
28export declare function getEnabledAsync(): Promise<boolean>;
29export declare function setEnabledAsync(enabled: boolean): Promise<void>;