[英]Typescript error TS1005: ';' expected. TS v1.8.10
I am receiving the following error when trying to compile a typescript file. 尝试编译打字稿文件时收到以下错误。 This is more first time playing with typescript so honestly I have no idea on what I am doing wrong... 这是第一次使用打字稿,所以说实话,我不知道我在做什么错...
Running "ts:default" (ts) task
Compiling...
### Fast Compile >>src/FileProcessor.ts
Using tsc v1.8.10
src/FileProcessor.ts(1,21): error TS1005: ';' expected.
I am compiling it with "grunt-ts" using the following grunt task... 我正在使用以下grunt任务使用“ grunt-ts”进行编译...
ts: {
default: {
src: ['src/**/*.ts'],
outDir: 'lib/',
options: {
module: 'commonjs'
}
}
},
Below is my typescript file 以下是我的打字稿文件
import path = module('path');
console.log(path.join('test', 'test2'));
Switch 开关
import path = module('path');
to 至
import path = require('path');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.