redux-action-buffer icon indicating copy to clipboard operation
redux-action-buffer copied to clipboard

TypeScript complains about missing default export

Open unindented opened this issue 9 years ago • 1 comments

In the docs you show the following:

import createActionBuffer from 'redux-action-buffer'

createActionBuffer is not a default export though (it is exported directly through module.exports), so TypeScript complains. Babel copes with it as it seems to be more permissive.

We could either introduce a transpiler, or mimic what Babel does with default exports currently:

Object.defineProperty(exports, "__esModule", {
  value: true
});

exports.default = createActionBuffer;

function createActionBuffer() {
  // ...
}

What do you think?

unindented avatar Dec 05 '16 10:12 unindented

sounds sensible, I am good with either of those options

rt2zz avatar Dec 11 '16 00:12 rt2zz