angular-redux / ng-redux

Angular bindings for Redux
MIT License
1.16k stars 177 forks source link

Fix ES6 export in TypeScript definitions #177

Closed smrq closed 6 years ago

smrq commented 6 years ago

This commit broke importing this module from TypeScript: https://github.com/angular-redux/ng-redux/commit/0f9fe1728fa43b1ab4946ee556d63ca754472421#diff-b52768974e6bc0faccb7d4b75b162c99

The following TypeScript code should work:

import ngRedux from 'ng-redux';

After this commit, which removes the default export from the typings, this fails with the following error:

error TS1192: Module '"/path/to/node_modules/ng-redux/index"' has no default export.
ionutVizitiu commented 6 years ago

Hi,

I think also that the whole commit should be reverted. Is there any reason to keep it like this?

cristianmartinez commented 6 years ago

Same problem here.

AntJanus commented 6 years ago

I'll go ahead and merge that PR in.

ionutVizitiu commented 6 years ago

Thank you @AntJanus . Any idea when you have some time for that?

AntJanus commented 6 years ago

@ionutVizitiu doing 4.0 release tonight.

ionutVizitiu commented 6 years ago

Thank you very much @AntJanus ! I appreciate your work.

I saw you've export default ngRedux;. Unfortunately, this is not enough for typings to work. We still need to remove the namespace too.

ionutVizitiu commented 6 years ago

I've created this PR https://github.com/angular-redux/ng-redux/pull/192