Answer the question
In order to leave comments, you need to log in
How to connect redux-persist to a react typescript project?
I'm trying to import storage from 'redux-persist/lib/storage' (import storage from 'redux-persist/lib/storage'), but I'm getting an error:
Could not find a declaration file for module 'redux-persist/lib/storage'. '.../WebstormProjects/catalog/node_modules/redux-persist/lib/storage/index.js' implicitly has an 'any' type.
Try `npm install @types/redux-persist` if it exists or add a new declaration (.d.ts) file containing `declare module 'redux-persist/lib/storage'
Answer the question
In order to leave comments, you need to log in
Add the following line to the project something.d.ts file (react-app-env.d.ts if you are using create react app):/// <reference types="redux-persist" />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question