2013-08-17 66 views
10

我试图编译该打字稿文件:Typescript错误TS1005:';'预计

import http = module("http"); 
import express = module("express"); 

使用这些参数:

C:/nodejs/tsc.cmd --sourcemap cheese.ts --module commonjs 
C:/User/Node/ExpressProject/cheese.ts(5,21): error TS1005: ';' expected. 
C:/User/Node/ExpressProject/cheese.ts(6,24): error TS1005: ';' expected. 

我在做什么错?即使如此,我收到了同样的错误错误:

module "http" {} 
module "express" {} 

import http = module("http"); 
import express = module("express"); 

使用打字稿版本0.9.1

+1

这非常俗气。 – iConnor

+1

@Connor:你能重现错误吗?是的,我把我所有的foo文件都命名为奶酪。它是一个习惯,真的! :P –

回答

14

0.9.1语法是现在import mod = require('modname');

+5

让我们来听听更多着名的TypeScript有用错误! –