Intellij idea typescript导出=模块
我看到几乎所有库的定义都使用表达式Intellij idea typescript导出=模块,intellij-idea,typescript,Intellij Idea,Typescript,我看到几乎所有库的定义都使用表达式export=module。我的IDE intellij理念语法错误。例如,在明示定义中 declare module "express" { function express(): Express; module express { ... ... ... } export = express; } Webstorm/IntelliJ Idea目前只支持TypeScript 0.8.x语法
export=module
。我的IDE intellij理念语法错误。例如,在明示定义中
declare module "express" {
function express(): Express;
module express {
...
...
...
}
export = express;
}
Webstorm/IntelliJ Idea目前只支持TypeScript 0.8.x语法。
export=express代码>语法是在typescript 0.9.0中引入的,这就是为什么会出现语法错误
如果要使用Webstorm设计时功能,可以从DefiniteTyped上的0.8.x分支获取旧定义:
或者,您可以使用Visual studio 2012 IntelliJ 12仅支持TypeScript 0.8
您可以从添加了对TypeScript 0.9功能支持的地方下载IntelliJ的EAP版本