【发布时间】:2023-03-20 20:29:01
【问题描述】:
Typescript 编译器能否忽略导入表达式中的cannot find module 'x' 错误,例如:
//How to tell the compiler that this module does exists
import sql = require('sql');
有多个 npm 库,例如 node sql,它们没有现有的类型
除了用declare module x ... 创建一个新的定义文件之外,有没有办法告诉编译器忽略这个错误?
【问题讨论】:
标签: import module typescript