mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-25 05:29:07 -05:00
isolatedModules does not imply every file is a module (#54218)
This commit is contained in:
@@ -130,7 +130,7 @@ var x = 0;`, {
|
||||
testVerbatimModuleSyntax: true
|
||||
});
|
||||
|
||||
transpilesCorrectly("Generates module output", `var x = 0;`, {
|
||||
transpilesCorrectly("Generates module output", `var x = 0; export {};`, {
|
||||
options: { compilerOptions: { module: ts.ModuleKind.AMD } }
|
||||
});
|
||||
|
||||
@@ -139,7 +139,7 @@ var x = 0;`, {
|
||||
testVerbatimModuleSyntax: true
|
||||
});
|
||||
|
||||
transpilesCorrectly("Sets module name", "var x = 1;", {
|
||||
transpilesCorrectly("Sets module name", "var x = 1; export {};", {
|
||||
options: { compilerOptions: { module: ts.ModuleKind.System, newLine: ts.NewLineKind.LineFeed }, moduleName: "NamedModule" }
|
||||
});
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ describe("unittests:: TransformAPI", () => {
|
||||
target: ts.ScriptTarget.ES5,
|
||||
module: ts.ModuleKind.System,
|
||||
newLine: ts.NewLineKind.CarriageReturnLineFeed,
|
||||
moduleDetection: ts.ModuleDetectionKind.Force,
|
||||
}
|
||||
}).outputText;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user