Skip to content

Commit

Permalink
Set declarationMap to false in transpileModule. (#59642)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirtitian authored Aug 15, 2024
1 parent ca64946 commit 5239589
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/services/transpile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function transpileWorker(input: string, transpileOptions: TranspileOptions, decl
}
else {
options.declaration = false;
options.declarationMap = false;
}

const newLine = getNewLineCharacter(options);
Expand Down
5 changes: 5 additions & 0 deletions src/testRunner/unittests/services/transpile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5239589

Please sign in to comment.