UNPKG

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