Fix transpiling when options specify incremental or tsbuildinfofile

Fixes #33184
This commit is contained in:
Sheetal Nandi 2019-09-03 13:13:06 -07:00
parent f41472b427
commit 5de0303728
8 changed files with 26 additions and 0 deletions

View file

@ -57,6 +57,8 @@ namespace ts {
options.rootDirs = undefined;
options.declaration = undefined;
options.composite = undefined;
options.incremental = undefined;
options.tsBuildInfoFile = undefined;
options.declarationDir = undefined;
options.out = undefined;
options.outFile = undefined;

View file

@ -416,6 +416,18 @@ var x = 0;`, {
options: { compilerOptions: { typeRoots: ["./folder"] }, fileName: "input.js", reportDiagnostics: true }
});
transpilesCorrectly("Supports setting 'incremental'", "x;", {
options: { compilerOptions: { incremental: true }, fileName: "input.js", reportDiagnostics: true }
});
transpilesCorrectly("Supports setting 'composite'", "x;", {
options: { compilerOptions: { composite: true }, fileName: "input.js", reportDiagnostics: true }
});
transpilesCorrectly("Supports setting 'tsbuildinfo'", "x;", {
options: { compilerOptions: { incremental: true, tsBuildInfoFile: "./folder/config.tsbuildinfo" }, fileName: "input.js", reportDiagnostics: true }
});
transpilesCorrectly("Correctly serialize metadata when transpile with CommonJS option",
`import * as ng from "angular2/core";` +
`declare function foo(...args: any[]);` +

View file

@ -0,0 +1,2 @@
x;
//# sourceMappingURL=input.js.map

View file

@ -0,0 +1,2 @@
x;
//# sourceMappingURL=input.js.map

View file

@ -0,0 +1,2 @@
x;
//# sourceMappingURL=input.js.map

View file

@ -0,0 +1,2 @@
x;
//# sourceMappingURL=input.js.map

View file

@ -0,0 +1,2 @@
x;
//# sourceMappingURL=input.js.map

View file

@ -0,0 +1,2 @@
x;
//# sourceMappingURL=input.js.map