在Typescript项目中,我需要导入一些在自己内部执行module.exports的旧js文件.
正如我导入:
import * as httpConnection from '...path...';
Run Code Online (Sandbox Code Playgroud)
我从编译器得到错误:
Could not find a declaration file for module '...path...'. '...path...' implicitly has an 'any' type.
Run Code Online (Sandbox Code Playgroud)
之后它工作正常,但我需要在控制台中避免此错误.
如何在不创建声明文件的情况下让编译器理解导入有任何类型?
提前感谢您的想法.
typescript ×1