mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'transforms' into transforms-fixMoreSourceMaps
This commit is contained in:
@@ -423,10 +423,10 @@ namespace ts {
|
||||
createVariableDeclarationList([
|
||||
createVariableDeclaration(
|
||||
generatedName,
|
||||
createRequireCall(node),
|
||||
/*location*/ node
|
||||
createRequireCall(node)
|
||||
)
|
||||
])
|
||||
]),
|
||||
/*location*/ node
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -523,10 +523,15 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function addExportImportAssignments(statements: Statement[], node: Node) {
|
||||
const names = reduceEachChild(node, collectExportMembers, []);
|
||||
for (const name of names) {
|
||||
addExportMemberAssignments(statements, name);
|
||||
function addExportImportAssignments(statements: Statement[], node: ImportEqualsDeclaration | ImportDeclaration) {
|
||||
if (isImportEqualsDeclaration(node)) {
|
||||
addExportMemberAssignments(statements, node.name);
|
||||
}
|
||||
else {
|
||||
const names = reduceEachChild(node, collectExportMembers, []);
|
||||
for (const name of names) {
|
||||
addExportMemberAssignments(statements, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -739,9 +744,6 @@ namespace ts {
|
||||
|
||||
addExportMemberAssignments(statements, classDecl.name);
|
||||
|
||||
if (statements.length > 1) {
|
||||
Debug.assert(!!classDecl.decorators, "Expression statements should only have an export member assignment when decorated.")
|
||||
}
|
||||
return statements;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2750,7 +2750,7 @@ namespace ts {
|
||||
*/
|
||||
function isNamedExternalModuleExport(node: Node) {
|
||||
return isExternalModuleExport(node)
|
||||
&& hasModifier(node, ModifierFlags.Default);
|
||||
&& !hasModifier(node, ModifierFlags.Default);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -190,8 +190,9 @@ namespace RWC {
|
||||
if (compilerResult.errors.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Harness.Compiler.getErrorBaseline(inputFiles.concat(otherFiles), compilerResult.errors);
|
||||
// Do not include the library in the baselines to avoid noise
|
||||
const baselineFiles = inputFiles.concat(otherFiles).filter(f => !Harness.isDefaultLibraryFile(f.unitName));
|
||||
return Harness.Compiler.getErrorBaseline(baselineFiles, compilerResult.errors);
|
||||
}, false, baselineOpts);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user