diff --git a/index.d.ts b/index.d.ts index 0e00dd3..5cae626 100644 --- a/index.d.ts +++ b/index.d.ts @@ -15,4 +15,4 @@ declare const Emitter: { new (obj?: object): Emitter; }; -export = Emitter; +export default Emitter; diff --git a/index.js b/index.js index 6d7ed0a..6c1dfc0 100644 --- a/index.js +++ b/index.js @@ -17,6 +17,9 @@ function Emitter(obj) { if (obj) return mixin(obj); }; +// allow default import +Emitter.default = Emitter; + /** * Mixin the emitter properties. *