mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-13 22:40:50 +08:00
Merge pull request #2827 from pspi/mixpanel
Last two arguments to init() are optional.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/// <reference path="mixpanel.d.ts" />
|
||||
function mixpanel_base()
|
||||
{
|
||||
mixpanel.init("new token");
|
||||
mixpanel.init("new token", { your: "config" });
|
||||
mixpanel.init("new token", { your: "config" }, "library_name");
|
||||
|
||||
mixpanel.push(['register', { a: 'b' }]);
|
||||
|
||||
2
mixpanel/mixpanel.d.ts
vendored
2
mixpanel/mixpanel.d.ts
vendored
@@ -8,7 +8,7 @@ interface Mixpanel
|
||||
{
|
||||
people:Mixpanel.People;
|
||||
|
||||
init(token:string, config:{[index:string]:any}, libraryName:string):Mixpanel;
|
||||
init(token:string, config?:{[index:string]:any}, libraryName?:string):Mixpanel;
|
||||
|
||||
push(item:any[]):void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user