main.ts:12:49 - error TS7016: Could not find a declaration file for module './dir'. 'js.js' implicitly has an 'any' type.
12 import { module } from "./js";
main.ts:16:17 - error TS7016: Could not find a declaration file for module 'js'. 'js.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/js` if it exists or add a new declaration (.d.ts) file containing `declare module 'js';`
16 import module from 'js'
编辑 tsconfig.json文件,配置下面两个选项:
{
"compilerOptions": {
"strict": true,
"noImplicitAny": false
},
}