打字稿错误TS1005:';'预期 [英] Typescript error TS1005: ';' expected
本文介绍了打字稿错误TS1005:';'预期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试编译这个打字稿文件:
I am trying compile this typescript file:
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.
我做错了什么?即便如此,我也会遇到相同的错误错误:
What am I doing wrong? Even with this, I am getting the same errors errors:
module "http" {}
module "express" {}
import http = module("http");
import express = module("express");
使用Typescript版本0.9.1
Using Typescript version 0.9.1
推荐答案
0.9.1
中的语法现在是 import mod = require('modname');
这篇关于打字稿错误TS1005:';'预期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文