[TypeScript] Error: Could not find a declaration file for module XYZ
While importing a module called Busboy as like this:
import * as Busboy from “busboy”;
The Error was like this:
Could not find a declaration file for module ‘busboy’. ‘f:/firebase-cloud-functions/functions/node_modules/busboy/lib/main.js’ implicitly has an ‘any’ type.
Try `npm install @types/busboy` if it exists or add a new declaration (.d.ts) file containing `declare module ‘busboy’;`
Solution: All you have to do is edit your TypeScript Config file (tsconfig.json) and add a new key value pair as
Some claps will be appreciated!