Set declarationMap to false in transpileModule. (#59642)

This commit is contained in:
Titian Cernicova-Dragomir
2024-08-16 02:57:37 +03:00
committed by GitHub
parent ca64946dff
commit 52395892e0
6 changed files with 14 additions and 0 deletions

View File

@@ -149,6 +149,7 @@ function transpileWorker(input: string, transpileOptions: TranspileOptions, decl
}
else {
options.declaration = false;
options.declarationMap = false;
}
const newLine = getNewLineCharacter(options);

View File

@@ -294,6 +294,11 @@ var x = 0;`,
testVerbatimModuleSyntax: true,
});
transpilesCorrectly("Supports setting 'declarationMap'", "x;", {
options: { compilerOptions: { declarationMap: true }, fileName: "input.js", reportDiagnostics: true },
testVerbatimModuleSyntax: true,
});
transpilesCorrectly("Supports setting 'declarationDir'", "x;", {
options: { compilerOptions: { declarationDir: "out/declarations" }, fileName: "input.js", reportDiagnostics: true },
testVerbatimModuleSyntax: true,

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