Closed ghost closed 7 years ago
If I put this in my gulpfile.js
gulp.task("build", function () { gulp.src(paths.ts) .pipe(typescript({ target: "es5", sourceMap: true, experimentalDecorators: true, lib: ["es2015", "dom"], noImplicitAny: true })) .pipe(gulp.dest('temp/')) });
This gets put into the file passed to tsc.
"--lib" "dom" "--lib" "es2015"
Passing in two --lib options is not good. Only the last one get processed.
I changed the code to this to get it working.
if (this.options.lib && versionCompare(version, "1.8") >= 0) { var param = ""; for (let libName of this.options.lib) { param += libName + ", "; } if(param.length > 0){ param = param.substring(0, param.length - 2); args.push('--lib', param); } }
Now I get this in the file and tsc likes it.
"--lib" "dom, es2015"
@markm11 Fixed in 1.3.2
OK thanks. I just saw you just checked in those changes today and republished it.
If I put this in my gulpfile.js
gulp.task("build", function () { gulp.src(paths.ts) .pipe(typescript({ target: "es5", sourceMap: true, experimentalDecorators: true, lib: ["es2015", "dom"], noImplicitAny: true })) .pipe(gulp.dest('temp/')) });
This gets put into the file passed to tsc.
"--lib" "dom" "--lib" "es2015"
Passing in two --lib options is not good. Only the last one get processed.
I changed the code to this to get it working.
if (this.options.lib && versionCompare(version, "1.8") >= 0) { var param = ""; for (let libName of this.options.lib) { param += libName + ", "; } if(param.length > 0){ param = param.substring(0, param.length - 2); args.push('--lib', param); } }
Now I get this in the file and tsc likes it.
"--lib" "dom, es2015"