Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Intellij idea typescript导出=模块_Intellij Idea_Typescript - Fatal编程技术网

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版本