How to solve the “Could not find a declaration file for module” error using my own declaration file?
问题 I have a test project in which I'm testing type definition files. The project has one file called index.ts which looks like this: import i18nFu = require("gettext.js"); The gettext.js package was installed using Node.js like this: npm install gettext.js VS Code displays the following error message for the line above: Could not find a declaration file for module 'gettext.js'. 'SOME_PATH/gettext.js' implicitly has an 'any' type. Try 'npm install @types/gettext.js' if it exists or add a new