![]() I struggled a bit with the different locations to use this general 'declare module' strategy (I am very much a beginner) so I think this will work with different options but I am included paths for what worked work me. Then in src/declare_modules.d.ts: declare module "react-portal-tooltip" Īnd in src/App.js: import ToolTip from 'react-portal-tooltip' d.ts files, various npm installs.īut what eventually worked for me was touch src/declare_modules.d.ts I tried many steps first - adding various. Try npm install if it exists or add a new declaration (.d.ts) file containing declare module 'react-portal-tooltip' ts(7016) ![]() ![]() '/node_modules/react-portal-tooltip/lib/index.js' implicitly has an 'any' type. I am making a very basic create-react-app using a specific module react-portal-tooltip, getting similar error:Ĭould not find a declaration file for module 'react-portal-tooltip'. ![]() I had this same problem but not necessarily relating to typescript, so I struggled a bit with these different options. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |