joanllenas / ngx-remotedata

💥 Synchronize data fetching and UI state
BSD 3-Clause "New" or "Revised" License
32 stars 6 forks source link

fix(linting): Export state interfaces #26

Closed Elecash closed 2 years ago

Elecash commented 3 years ago

In some cases Typescript compiler fails in reducers because it throws the next error:

TS4076: Parameter 'state' of exported function has or is using name 'Success' from external module ".../node_modules/ngx-remotedata/lib/remote-data" but cannot be named.

The error is gone when the state interfaces are exported because Typescript can resolve all type names.

linting-errors