I installed latest Angular from git clone https://github.com/angular/quickstart.git
and
npm i --save redux-logger redux ng2-redux
Here .../node_modules/redux-logger/src/index.js
there's
export { defaults, createLogger, defaultLogger as logger };
Error:TS7016:Could not find a declaration file for module 'redux-logger'. '.../node_modules/redux-logger/dist/redux-logger.js' implicitly has an 'any' type.
import { applyMiddleware, createStore } from 'redux';
import logger from 'redux-logger';
//import { createLogger } from 'redux-logger';
const store = createStore(
rootReducer,
applyMiddleware(logger)
);
//const store = createStore(
// rootReducer,
// applyMiddleware(createLogger())
//);
The same error when using createLogger()
How to fix that?
Thanks.
You must be using typescript. In order to import any javascript library/module, you need its corresponding type declarations which are generally included in DefinitelyTyped.
Do:
The package is here. Then you can import as: