rt2zz / redux-action-buffer

Buffer Redux Actions
MIT License
79 stars 6 forks source link

TypeScript complains about missing default export #5

Open unindented opened 7 years ago

unindented commented 7 years ago

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?

rt2zz commented 7 years ago

sounds sensible, I am good with either of those options