Skip to content

Commit 8b3ee14

Browse files
authored
Merge pull request #85 from byeokim/master
Add constructor method type definition
2 parents 9e740d6 + f0d7f43 commit 8b3ee14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ type MixpanelType = any;
22
type MixpanelProperties = { [key: string]: MixpanelType };
33

44
export class Mixpanel {
5+
constructor(token: string);
56
static init(token: string, optOutTrackingDefault?: boolean): Promise<Mixpanel>;
67
init(optOutTrackingDefault?: boolean): Promise<void>;
78
setServerURL(serverURL: string): void;
@@ -33,6 +34,7 @@ export class Mixpanel {
3334
}
3435

3536
export class People {
37+
constructor(token: string);
3638
set(prop: string, to: MixpanelType): void;
3739
setOnce(prop: string, to: MixpanelType): void;
3840
increment(prop: string, by: number): void;
@@ -46,6 +48,7 @@ export class People {
4648
}
4749

4850
export class MixpanelGroup {
51+
constructor(token: string, groupKey: string, groupID: MixpanelType);
4952
set(prop: string, to: MixpanelType): void;
5053
setOnce(prop: string, to: MixpanelType): void;
5154
unset(prop: string): void;

0 commit comments

Comments
 (0)