redux-zero / redux-zero

A lightweight state container based on Redux

Home Page:https://matheusml1.gitbooks.io/redux-zero-docs/content/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript error - Cannot find module './devtoolsMidleware'

gcox opened this issue · comments

version 4.15.1

When redux-zero is installed, the devtoolsMidleware.d.ts file is not included which leads to an error since that file imported by devtoolsMiddleware.d.ts

Is there any particular reason the devtools typings were implemented this way? I'm no expert on typings so I'm sure I'm just missing something.

screen shot 2018-12-20 at 9 14 17 am

screen shot 2018-12-20 at 9 14 37 am

It is because there are naming conflicts in sources, devtoolsMiddleware.ts imports devtoolsMiddleware.d.ts, it is bad

@matheusml need to rename devtoolsMiddleware.d.ts to something like devtoolsMiddlewareInterfaces.ts or move all interfaces from devtoolsMiddleware.d.ts into devtoolsMiddleware.ts file or move devtoolsMiddleware.d.ts to interfaces folder

Result after build

screen shot 2019-01-02 at 3 12 23 pm

Thanks for that @gebeto. I would gladly accept this PR.

@matheusml I've add it to #142, can you check that PR?