打字稿错误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");
使用Typescript版本0.9.1
0.9.1
的语法现在是import mod = require('modname');
Typescript编译器( https://www.npmjs.org/package/typescript-compiler )命令。
我使用–allowimportmodule
- 在typescript中执行静态代码(扩展静态对象)
- 什么是使用Node.js和TypeScript的正确方法?
- Visual Studio 2013可以在NodeJs Web应用程序中debugging客户端JavaScript
- 模块构build失败:错误:AotPlugin被检测到,但是它是一个错误类的实例
- 奇怪的打字稿错误:“名称g不存在于当前范围”
- 如何使用Intellisense将节点模块导入到TypeScript中?
- testing失败:ReferenceError:SpeechSynthesisUtterance未定义
- 在使用Typescript的Aurelia中使用Jquery
- 如何在TypeScript中正确地要求和声明节点库types?