Skip to content

Commit

Permalink
Merge pull request #85 from byeokim/master
Browse files Browse the repository at this point in the history
Add constructor method type definition
  • Loading branch information
zihejia authored Aug 23, 2021
2 parents 9e740d6 + f0d7f43 commit 8b3ee14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ type MixpanelType = any;
type MixpanelProperties = { [key: string]: MixpanelType };

export class Mixpanel {
constructor(token: string);
static init(token: string, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
init(optOutTrackingDefault?: boolean): Promise<void>;
setServerURL(serverURL: string): void;
Expand Down Expand Up @@ -33,6 +34,7 @@ export class Mixpanel {
}

export class People {
constructor(token: string);
set(prop: string, to: MixpanelType): void;
setOnce(prop: string, to: MixpanelType): void;
increment(prop: string, by: number): void;
Expand All @@ -46,6 +48,7 @@ export class People {
}

export class MixpanelGroup {
constructor(token: string, groupKey: string, groupID: MixpanelType);
set(prop: string, to: MixpanelType): void;
setOnce(prop: string, to: MixpanelType): void;
unset(prop: string): void;
Expand Down

0 comments on commit 8b3ee14

Please sign in to comment.