The language used in the project is TypeScript . When I introduced js into the project, I found an error:
the prompt message was: the declaration file xxx of the module "xxx.js" could not be found, which implicitly has the "any" type
The introduction of js in typeScript cannot be introduced directly in this way. The following are two solutions I know:
1. The first method: use require
the traditional import instead of import:
const waterMark = require("@/utils/waterMark");
2. The second method: create a new xxx.d.ts file in the project: actively declare the imported module in the file:
declare module '@/utils/waterMark.js'
declare module '@/config/api.js'