mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-16 05:58:32 -06:00
Merge pull request #7646 from Microsoft/system-transforms
fix a few issues in the emit of System modules
This commit is contained in:
commit
ae0f8a9853
@ -245,7 +245,7 @@ const _super = (function (geti, seti) {
|
||||
currentFileIdentifiers = node.identifiers;
|
||||
sourceMap.setSourceFile(node);
|
||||
comments.setSourceFile(node);
|
||||
emitWorker(node);
|
||||
emitNodeWithNotificationOption(node, emitWorker);
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
@ -23,8 +23,15 @@ namespace ts {
|
||||
const previousExpressionSubstitution = context.expressionSubstitution;
|
||||
context.enableExpressionSubstitution(SyntaxKind.Identifier);
|
||||
context.enableExpressionSubstitution(SyntaxKind.BinaryExpression);
|
||||
context.enableExpressionSubstitution(SyntaxKind.PrefixUnaryExpression);
|
||||
context.enableExpressionSubstitution(SyntaxKind.PostfixUnaryExpression);
|
||||
context.expressionSubstitution = substituteExpression;
|
||||
|
||||
context.enableEmitNotification(SyntaxKind.SourceFile);
|
||||
|
||||
const exportFunctionForFileMap: Identifier[] = [];
|
||||
const previousOnEmitNode = context.onEmitNode;
|
||||
context.onEmitNode = onEmitNode;
|
||||
|
||||
let currentSourceFile: SourceFile;
|
||||
let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[];
|
||||
@ -38,12 +45,19 @@ namespace ts {
|
||||
|
||||
return transformSourceFile;
|
||||
|
||||
function onEmitNode(node: Node, emit: (node: Node) => void): void {
|
||||
exportFunctionForFile = exportFunctionForFileMap[getNodeId(node)];
|
||||
previousOnEmitNode(node, emit);
|
||||
exportFunctionForFile = undefined;
|
||||
}
|
||||
|
||||
function transformSourceFile(node: SourceFile) {
|
||||
if (isExternalModule(node) || compilerOptions.isolatedModules) {
|
||||
currentSourceFile = node;
|
||||
|
||||
// Perform the transformation.
|
||||
const updated = transformSystemModuleWorker(node);
|
||||
aggregateTransformFlags(updated);
|
||||
|
||||
currentSourceFile = undefined;
|
||||
externalImports = undefined;
|
||||
@ -83,56 +97,37 @@ namespace ts {
|
||||
exportFunctionForFile = createUniqueName("exports");
|
||||
contextObjectForFile = createUniqueName("context");
|
||||
|
||||
exportFunctionForFileMap[getNodeId(node)] = exportFunctionForFile;
|
||||
|
||||
const dependencyGroups = collectDependencyGroups(externalImports);
|
||||
|
||||
const statements: Statement[] = [];
|
||||
|
||||
// Add any prologue directives.
|
||||
const statementOffset = addPrologueDirectives(statements, node.statements);
|
||||
// Add the body of the module.
|
||||
addSystemModuleBody(statements, node, dependencyGroups);
|
||||
|
||||
// var __moduleName = context_1 && context_1.id;
|
||||
addNode(statements,
|
||||
createVariableStatement(
|
||||
/*modifiers*/ undefined,
|
||||
createVariableDeclarationList([
|
||||
createVariableDeclaration(
|
||||
"__moduleName",
|
||||
createLogicalAnd(
|
||||
contextObjectForFile,
|
||||
createPropertyAccess(contextObjectForFile, "id")
|
||||
)
|
||||
)
|
||||
])
|
||||
const dependencies = createArrayLiteral(map(dependencyGroups, getNameOfDependencyGroup));
|
||||
const body = createFunctionExpression(
|
||||
/*asteriskToken*/ undefined,
|
||||
/*name*/ undefined,
|
||||
[
|
||||
createParameter(exportFunctionForFile),
|
||||
createParameter(contextObjectForFile)
|
||||
],
|
||||
setNodeEmitFlags(
|
||||
createBlock(statements, /*location*/ undefined, /*multiLine*/ true),
|
||||
NodeEmitFlags.EmitEmitHelpers
|
||||
)
|
||||
);
|
||||
|
||||
// Add the body of the module.
|
||||
addSystemModuleBody(statements, node, dependencyGroups, statementOffset);
|
||||
|
||||
// Write the call to `System.register`
|
||||
return updateSourceFile(node, [
|
||||
createStatement(
|
||||
createCall(
|
||||
createPropertyAccess(createIdentifier("System"), "register"),
|
||||
[
|
||||
node.moduleName ? createLiteral(node.moduleName) : undefined,
|
||||
createArrayLiteral(map(dependencyGroups, getNameOfDependencyGroup)),
|
||||
createFunctionExpression(
|
||||
/*asteriskToken*/ undefined,
|
||||
/*name*/ undefined,
|
||||
[
|
||||
createParameter(exportFunctionForFile),
|
||||
createParameter(contextObjectForFile)
|
||||
],
|
||||
setNodeEmitFlags(
|
||||
setMultiLine(
|
||||
createBlock(statements),
|
||||
/*multiLine*/ true
|
||||
),
|
||||
NodeEmitFlags.EmitEmitHelpers
|
||||
)
|
||||
)
|
||||
]
|
||||
node.moduleName
|
||||
? [createLiteral(node.moduleName), dependencies, body]
|
||||
: [dependencies, body]
|
||||
)
|
||||
)
|
||||
]);
|
||||
@ -145,7 +140,7 @@ namespace ts {
|
||||
* @param node The source file for the module.
|
||||
* @param statementOffset The offset at which to begin visiting the statements of the SourceFile.
|
||||
*/
|
||||
function addSystemModuleBody(statements: Statement[], node: SourceFile, dependencyGroups: DependencyGroup[], statementOffset: number) {
|
||||
function addSystemModuleBody(statements: Statement[], node: SourceFile, dependencyGroups: DependencyGroup[]) {
|
||||
// Shape of the body in system modules:
|
||||
//
|
||||
// function (exports) {
|
||||
@ -193,6 +188,25 @@ namespace ts {
|
||||
// only in the outer module body and not in the inner one.
|
||||
startLexicalEnvironment();
|
||||
|
||||
// Add any prologue directives.
|
||||
const statementOffset = addPrologueDirectives(statements, node.statements, !compilerOptions.noImplicitUseStrict);
|
||||
|
||||
// var __moduleName = context_1 && context_1.id;
|
||||
addNode(statements,
|
||||
createVariableStatement(
|
||||
/*modifiers*/ undefined,
|
||||
createVariableDeclarationList([
|
||||
createVariableDeclaration(
|
||||
"__moduleName",
|
||||
createLogicalAnd(
|
||||
contextObjectForFile,
|
||||
createPropertyAccess(contextObjectForFile, "id")
|
||||
)
|
||||
)
|
||||
])
|
||||
)
|
||||
);
|
||||
|
||||
// Visit the statements of the source file, emitting any transformations into
|
||||
// the `executeStatements` array. We do this *before* we fill the `setters` array
|
||||
// as we both emit transformations as well as aggregate some data used when creating
|
||||
@ -222,11 +236,13 @@ namespace ts {
|
||||
),
|
||||
createPropertyAssignment("execute",
|
||||
createFunctionExpression(
|
||||
/*asteriskToken*/ node,
|
||||
/*asteriskToken*/ undefined,
|
||||
/*name*/ undefined,
|
||||
[],
|
||||
createBlock(
|
||||
executeStatements
|
||||
executeStatements,
|
||||
/*location*/ undefined,
|
||||
/*multiLine*/ true
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -238,6 +254,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function addExportStarIfNeeded(statements: Statement[]) {
|
||||
if (!hasExportStars) {
|
||||
return;
|
||||
}
|
||||
// when resolving exports local exported entries/indirect exported entries in the module
|
||||
// should always win over entries with similar names that were added via star exports
|
||||
// to support this we store names of local/indirect exported entries in a set.
|
||||
@ -303,7 +322,7 @@ namespace ts {
|
||||
createVariableDeclarationList([
|
||||
createVariableDeclaration(
|
||||
exportedNamesStorageRef,
|
||||
createObjectLiteral(exportedNames)
|
||||
createObjectLiteral(exportedNames, /*location*/ undefined, /*multiline*/ true)
|
||||
)
|
||||
])
|
||||
)
|
||||
@ -371,7 +390,7 @@ namespace ts {
|
||||
createStatement(
|
||||
createCall(
|
||||
exportFunctionForFile,
|
||||
[createObjectLiteral(properties)]
|
||||
[createObjectLiteral(properties, /*location*/ undefined, /*multiline*/ true)]
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -400,12 +419,12 @@ namespace ts {
|
||||
/*asteriskToken*/ undefined,
|
||||
/*name*/ undefined,
|
||||
[createParameter(parameterName)],
|
||||
createBlock(statements)
|
||||
createBlock(statements, /*location*/ undefined, /*multiLine*/ true)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return createArrayLiteral(setters);
|
||||
return createArrayLiteral(setters, /*location*/ undefined, /*multiLine*/ true);
|
||||
}
|
||||
|
||||
function visitSourceElement(node: Node): VisitResult<Node> {
|
||||
@ -480,6 +499,9 @@ namespace ts {
|
||||
case SyntaxKind.Block:
|
||||
return visitBlock(<Block>node);
|
||||
|
||||
case SyntaxKind.ExpressionStatement:
|
||||
return visitExpressionStatement(<ExpressionStatement>node);
|
||||
|
||||
default:
|
||||
return node;
|
||||
}
|
||||
@ -590,7 +612,7 @@ namespace ts {
|
||||
if (hasModifier(node, ModifierFlags.Export)) {
|
||||
// If the function is exported, ensure it has a name and rewrite the function without any export flags.
|
||||
const name = node.name || getGeneratedNameForNode(node);
|
||||
node = createFunctionDeclaration(
|
||||
const newNode = createFunctionDeclaration(
|
||||
/*modifiers*/ undefined,
|
||||
node.asteriskToken,
|
||||
name,
|
||||
@ -604,6 +626,8 @@ namespace ts {
|
||||
if (!hasModifier(node, ModifierFlags.Default)) {
|
||||
recordExportName(name);
|
||||
}
|
||||
|
||||
node = newNode;
|
||||
}
|
||||
|
||||
// Hoist the function declaration to the outer module body function.
|
||||
@ -611,6 +635,18 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function visitExpressionStatement(node: ExpressionStatement): VisitResult<Statement> {
|
||||
const originalNode = getOriginalNode(node);
|
||||
if ((originalNode.kind === SyntaxKind.ModuleDeclaration || originalNode.kind === SyntaxKind.EnumDeclaration) && hasModifier(originalNode, ModifierFlags.Export)) {
|
||||
const name = getDeclarationName(<ModuleDeclaration | EnumDeclaration>originalNode);
|
||||
return [
|
||||
node,
|
||||
createExportStatement(name, name)
|
||||
]
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits a ClassDeclaration, hoisting its name to the outer module body function.
|
||||
*
|
||||
@ -893,8 +929,9 @@ namespace ts {
|
||||
return substituteExpressionIdentifier(<Identifier>node);
|
||||
case SyntaxKind.BinaryExpression:
|
||||
return substituteBinaryExpression(<BinaryExpression>node);
|
||||
case SyntaxKind.PrefixUnaryExpression:
|
||||
case SyntaxKind.PostfixUnaryExpression:
|
||||
return substitutePostfixUnaryExpression(<PostfixUnaryExpression>node);
|
||||
return substituteUnaryExpression(<PrefixUnaryExpression | PostfixUnaryExpression>node);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
@ -905,7 +942,10 @@ namespace ts {
|
||||
function substituteExpressionIdentifier(node: Identifier): Expression {
|
||||
const importDeclaration = resolver.getReferencedImportDeclaration(node);
|
||||
if (importDeclaration) {
|
||||
return createImportBinding(importDeclaration);
|
||||
const importBinding = createImportBinding(importDeclaration);
|
||||
if (importBinding) {
|
||||
return importBinding;
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
@ -925,7 +965,8 @@ namespace ts {
|
||||
const left = node.left;
|
||||
switch (left.kind) {
|
||||
case SyntaxKind.Identifier:
|
||||
const exportDeclaration = resolver.getReferencedExportContainer(<Identifier>left);
|
||||
const originalNode = getOriginalNode(left);
|
||||
const exportDeclaration = resolver.getReferencedExportContainer(<Identifier>originalNode);
|
||||
if (exportDeclaration) {
|
||||
return createExportExpression(<Identifier>left, node);
|
||||
}
|
||||
@ -1029,19 +1070,30 @@ namespace ts {
|
||||
return flattenDestructuringAssignment(context, node, /*needsValue*/ true, hoistVariableDeclaration);
|
||||
}
|
||||
|
||||
function substitutePostfixUnaryExpression(node: PostfixUnaryExpression): Expression {
|
||||
function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression {
|
||||
const operand = node.operand;
|
||||
if (isIdentifier(operand)) {
|
||||
const exportDeclaration = resolver.getReferencedExportContainer(operand);
|
||||
if (exportDeclaration) {
|
||||
const exportCall = createExportExpression(
|
||||
operand,
|
||||
createPrefix(node.operator, operand, node)
|
||||
);
|
||||
const operator = node.operator;
|
||||
const substitute =
|
||||
isIdentifier(operand) &&
|
||||
(
|
||||
node.kind === SyntaxKind.PostfixUnaryExpression ||
|
||||
(node.kind === SyntaxKind.PrefixUnaryExpression && (operator === SyntaxKind.PlusPlusToken || operator === SyntaxKind.MinusMinusToken))
|
||||
);
|
||||
|
||||
return node.operator === SyntaxKind.PlusPlusToken
|
||||
? createSubtract(exportCall, createLiteral(1))
|
||||
: createAdd(exportCall, createLiteral(1));
|
||||
if (substitute) {
|
||||
const exportDeclaration = resolver.getReferencedExportContainer(<Identifier>operand);
|
||||
if (exportDeclaration) {
|
||||
const expr = createPostfix(operand, node.operator, node);
|
||||
setNodeEmitFlags(expr, NodeEmitFlags.NoSubstitution);
|
||||
const call = createExportExpression(<Identifier>operand, expr);
|
||||
if (node.kind === SyntaxKind.PrefixUnaryExpression) {
|
||||
return call;
|
||||
}
|
||||
else {
|
||||
return operator === SyntaxKind.PlusPlusToken
|
||||
? createSubtract(call, createLiteral(1))
|
||||
: createAdd(call, createLiteral(1))
|
||||
}
|
||||
}
|
||||
}
|
||||
return node;
|
||||
@ -1147,7 +1199,9 @@ namespace ts {
|
||||
[exports]
|
||||
)
|
||||
)
|
||||
])
|
||||
],
|
||||
/*location*/ undefined,
|
||||
/*multiline*/ true)
|
||||
)
|
||||
);
|
||||
|
||||
@ -1195,6 +1249,9 @@ namespace ts {
|
||||
importAlias = getGeneratedNameForNode(importDeclaration.parent.parent.parent);
|
||||
name = importDeclaration.propertyName || importDeclaration.name;
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (name.originalKeywordKind && languageVersion === ScriptTarget.ES3) {
|
||||
return createElementAccess(importAlias, createLiteral(name.text));
|
||||
|
||||
@ -2129,25 +2129,27 @@ namespace ts {
|
||||
// ...
|
||||
// })(x || (x = {}));
|
||||
statements.push(
|
||||
createStatement(
|
||||
createCall(
|
||||
createParen(
|
||||
createFunctionExpression(
|
||||
setOriginalNode(
|
||||
createStatement(
|
||||
createCall(
|
||||
createParen(
|
||||
createFunctionExpression(
|
||||
/*asteriskToken*/ undefined,
|
||||
/*name*/ undefined,
|
||||
[createParameter(currentNamespaceLocalName)],
|
||||
transformEnumBody(node)
|
||||
)
|
||||
),
|
||||
[createLogicalOr(
|
||||
name,
|
||||
createAssignment(
|
||||
[createParameter(currentNamespaceLocalName)],
|
||||
transformEnumBody(node)
|
||||
)
|
||||
),
|
||||
[createLogicalOr(
|
||||
name,
|
||||
createObjectLiteral()
|
||||
)
|
||||
)]
|
||||
),
|
||||
location
|
||||
createAssignment(
|
||||
name,
|
||||
createObjectLiteral()
|
||||
)
|
||||
)]
|
||||
),
|
||||
location
|
||||
), node
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -17,17 +17,17 @@ module M {
|
||||
|
||||
|
||||
//// [aliasesInSystemModule1.js]
|
||||
System.register(['foo'], function(exports_1, context_1) {
|
||||
System.register(["foo"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var alias;
|
||||
var cls, cls2, x, y, z, M;
|
||||
var alias, cls, cls2, x, y, z, M;
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (alias_1) {
|
||||
alias = alias_1;
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
cls = alias.Class;
|
||||
exports_1("cls2", cls2 = alias.Class);
|
||||
x = new alias.Class();
|
||||
@ -40,5 +40,5 @@ System.register(['foo'], function(exports_1, context_1) {
|
||||
var z = new cls2();
|
||||
})(M || (M = {}));
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -16,17 +16,17 @@ module M {
|
||||
}
|
||||
|
||||
//// [aliasesInSystemModule2.js]
|
||||
System.register(["foo"], function(exports_1, context_1) {
|
||||
System.register(["foo"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var foo_1;
|
||||
var cls, cls2, x, y, z, M;
|
||||
var foo_1, cls, cls2, x, y, z, M;
|
||||
return {
|
||||
setters:[
|
||||
function (foo_1_1) {
|
||||
foo_1 = foo_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
setters: [
|
||||
function (_1) {
|
||||
foo_1 = _1;
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
cls = foo_1.alias.Class;
|
||||
exports_1("cls2", cls2 = foo_1.alias.Class);
|
||||
x = new foo_1.alias.Class();
|
||||
@ -39,5 +39,5 @@ System.register(["foo"], function(exports_1, context_1) {
|
||||
var z = new cls2();
|
||||
})(M || (M = {}));
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -10,12 +10,12 @@ import * as a from "a";
|
||||
|
||||
|
||||
//// [b.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -10,24 +10,24 @@ import * as a from "a";
|
||||
|
||||
|
||||
//// [a.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var a;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
a = 10;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [b.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -12,12 +12,12 @@ import * as a from "a";
|
||||
|
||||
|
||||
//// [b.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -3,14 +3,14 @@
|
||||
export var x = 1;
|
||||
|
||||
//// [systemModule1.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("x", x = 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -10,19 +10,20 @@ export {n2}
|
||||
export {n2 as n3}
|
||||
|
||||
//// [systemModule10.js]
|
||||
System.register(['file1', 'file2'], function(exports_1, context_1) {
|
||||
System.register(["file1", "file2"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var file1_1, n2;
|
||||
return {
|
||||
setters:[
|
||||
function (file1_1_1) {
|
||||
file1_1 = file1_1_1;
|
||||
setters: [
|
||||
function (_1) {
|
||||
file1_1 = _1;
|
||||
},
|
||||
function (n2_1) {
|
||||
n2 = n2_1;
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("x", file1_1.x);
|
||||
exports_1("y", file1_1.x);
|
||||
exports_1("n", file1_1["default"]);
|
||||
@ -30,5 +31,5 @@ System.register(['file1', 'file2'], function(exports_1, context_1) {
|
||||
exports_1("n2", n2);
|
||||
exports_1("n3", n2);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -10,19 +10,20 @@ export {n2}
|
||||
export {n2 as n3}
|
||||
|
||||
//// [systemModule10_ES5.js]
|
||||
System.register(['file1', 'file2'], function(exports_1, context_1) {
|
||||
System.register(["file1", "file2"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var file1_1, n2;
|
||||
return {
|
||||
setters:[
|
||||
function (file1_1_1) {
|
||||
file1_1 = file1_1_1;
|
||||
setters: [
|
||||
function (_1) {
|
||||
file1_1 = _1;
|
||||
},
|
||||
function (n2_1) {
|
||||
n2 = n2_1;
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("x", file1_1.x);
|
||||
exports_1("y", file1_1.x);
|
||||
exports_1("n", file1_1.default);
|
||||
@ -30,5 +31,5 @@ System.register(['file1', 'file2'], function(exports_1, context_1) {
|
||||
exports_1("n2", n2);
|
||||
exports_1("n3", n2);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -5,12 +5,12 @@ import n from 'file1'
|
||||
|
||||
|
||||
//// [systemModule12.js]
|
||||
System.register("NamedModule", [], function(exports_1, context_1) {
|
||||
System.register("NamedModule", [], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -5,19 +5,18 @@ export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}};
|
||||
for ([x] of [[1]]) {}
|
||||
|
||||
//// [systemModule13.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x, y, z, z0, z1;
|
||||
var x, y, z, _a, z0, z1, _b;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_a = [1, 2, 3], exports_1("x", x = _a[0]), exports_1("y", y = _a[1]), exports_1("z", z = _a[2]);
|
||||
_b = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _b.a), exports_1("z1", z1 = _b.b.c);
|
||||
for (var _i = 0, _c = [[1]]; _i < _c.length; _i++) {
|
||||
exports_1("x", x = _c[_i][0]);
|
||||
for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) {
|
||||
exports_1("x", x = _a[_i][0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
var _a, _b;
|
||||
};
|
||||
});
|
||||
|
||||
@ -11,23 +11,23 @@ var x = 1;
|
||||
export {foo as b}
|
||||
|
||||
//// [systemModule14.js]
|
||||
System.register(["foo"], function(exports_1, context_1) {
|
||||
System.register(["foo"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var foo_1;
|
||||
var x;
|
||||
function foo() {
|
||||
return foo_1.a;
|
||||
}
|
||||
var foo_1, x;
|
||||
return {
|
||||
setters:[
|
||||
function (foo_1_1) {
|
||||
foo_1 = foo_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
setters: [
|
||||
function (_1) {
|
||||
foo_1 = _1;
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("foo", foo);
|
||||
x = 1;
|
||||
exports_1("b", foo);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -34,63 +34,65 @@ export default value;
|
||||
export var value2 = "v";
|
||||
|
||||
//// [file3.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var value;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("value", value = "youpi");
|
||||
exports_1("default",value);
|
||||
exports_1("default", value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file4.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var value2;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("value2", value2 = "v");
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file2.js]
|
||||
System.register(["./file3"], function(exports_1, context_1) {
|
||||
System.register(["./file3"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var moduleCStar, file3_1, file3_2;
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (moduleCStar_1) {
|
||||
moduleCStar = moduleCStar_1;
|
||||
file3_1 = moduleCStar_1;
|
||||
file3_2 = moduleCStar_1;
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("moduleCStar", moduleCStar);
|
||||
exports_1("moduleC", file3_1["default"]);
|
||||
exports_1("value", file3_2.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file1.js]
|
||||
System.register(["./file2"], function(exports_1, context_1) {
|
||||
System.register(["./file2"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var moduleB;
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (moduleB_1) {
|
||||
moduleB = moduleB_1;
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
use(moduleB.value);
|
||||
use(moduleB.moduleC);
|
||||
use(moduleB.moduleCStar);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -13,26 +13,27 @@ x,y,a1,b1,d1;
|
||||
|
||||
|
||||
//// [systemModule16.js]
|
||||
System.register(["foo", "bar"], function(exports_1, context_1) {
|
||||
System.register(["foo", "bar"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x, y, foo_1;
|
||||
var exportedNames_1 = {
|
||||
'x': true,
|
||||
'y': true,
|
||||
'a2': true,
|
||||
'b2': true,
|
||||
'd2': true
|
||||
"x": true,
|
||||
"y": true,
|
||||
"a2": true,
|
||||
"b2": true,
|
||||
"d2": true
|
||||
};
|
||||
function exportStar_1(m) {
|
||||
var exports = {};
|
||||
for(var n in m) {
|
||||
if (n !== "default"&& !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n];
|
||||
for (var n in m) {
|
||||
if (n !== "default" && !exportedNames_1.hasOwnProperty(n))
|
||||
exports[n] = m[n];
|
||||
}
|
||||
exports_1(exports);
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (x_1) {
|
||||
x = x_1;
|
||||
exportStar_1(x_1);
|
||||
@ -46,11 +47,12 @@ System.register(["foo", "bar"], function(exports_1, context_1) {
|
||||
"b2": y_1["b2"],
|
||||
"d2": y_1["c2"]
|
||||
});
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("x", x);
|
||||
exports_1("y", y);
|
||||
x, y, foo_1.a1, foo_1.b1, foo_1.c1;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -42,13 +42,13 @@ export {II};
|
||||
export {II as II1};
|
||||
|
||||
//// [f1.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var A;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
A = (function () {
|
||||
function A() {
|
||||
}
|
||||
@ -56,20 +56,20 @@ System.register([], function(exports_1, context_1) {
|
||||
}());
|
||||
exports_1("A", A);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [f2.js]
|
||||
System.register(["f1"], function(exports_1, context_1) {
|
||||
System.register(["f1"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var f1_1;
|
||||
var x, N, IX;
|
||||
var x, N, IX, f1_1;
|
||||
return {
|
||||
setters:[
|
||||
function (f1_1_1) {
|
||||
f1_1 = f1_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
setters: [
|
||||
function (_1) {
|
||||
f1_1 = _1;
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
x = 1;
|
||||
(function (N) {
|
||||
N.x = 1;
|
||||
@ -84,5 +84,5 @@ System.register(["f1"], function(exports_1, context_1) {
|
||||
exports_1("IX", IX);
|
||||
exports_1("IX1", IX);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -4,14 +4,14 @@ var x = 1;
|
||||
export = x;
|
||||
|
||||
//// [systemModule2.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
x = 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -18,37 +18,37 @@ export default class C {}
|
||||
export default class {}
|
||||
|
||||
//// [file1.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function default_1() { }
|
||||
exports_1("default", default_1);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file2.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function f() { }
|
||||
exports_1("default", f);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file3.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var C;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
C = (function () {
|
||||
function C() {
|
||||
}
|
||||
@ -56,22 +56,22 @@ System.register([], function(exports_1, context_1) {
|
||||
}());
|
||||
exports_1("default", C);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file4.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var default_1;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
default_1 = (function () {
|
||||
function default_1() {
|
||||
function class_1() {
|
||||
}
|
||||
return default_1;
|
||||
return class_1;
|
||||
}());
|
||||
exports_1("default", default_1);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -4,14 +4,14 @@ export var x = 1;
|
||||
export var y;
|
||||
|
||||
//// [systemModule4.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x, y;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("x", x = 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -4,14 +4,14 @@ export function foo() {}
|
||||
|
||||
|
||||
//// [systemModule5.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function foo() { }
|
||||
exports_1("foo", foo);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -7,16 +7,16 @@ function foo() {
|
||||
|
||||
|
||||
//// [systemModule6.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var C;
|
||||
function foo() {
|
||||
new C();
|
||||
}
|
||||
var C;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
C = (function () {
|
||||
function C() {
|
||||
}
|
||||
@ -24,5 +24,5 @@ System.register([], function(exports_1, context_1) {
|
||||
}());
|
||||
exports_1("C", C);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -11,18 +11,18 @@ export module M {
|
||||
}
|
||||
|
||||
//// [systemModule7.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var M;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
// filename: instantiatedModule.ts
|
||||
(function (M) {
|
||||
var x = 1;
|
||||
})(M = M || (M = {}));
|
||||
exports_1("M", M);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -31,21 +31,21 @@ export const {a: z0, b: {c: z1}} = {a: true, b: {c: "123"}};
|
||||
for ([x] of [[1]]) {}
|
||||
|
||||
//// [systemModule8.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x, y, z0, z1;
|
||||
function foo() {
|
||||
exports_1("x", x = 100);
|
||||
}
|
||||
var x, x, y, z0, z1, _a;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
exports_1("x", x = 1);
|
||||
(exports_1("x", ++x) - 1);
|
||||
(exports_1("x", --x) + 1);
|
||||
exports_1("x", ++x);
|
||||
exports_1("x", --x);
|
||||
exports_1("x", x++) - 1;
|
||||
exports_1("x", x--) + 1;
|
||||
exports_1("x", x++);
|
||||
exports_1("x", x--);
|
||||
exports_1("x", x += 1);
|
||||
exports_1("x", x -= 1);
|
||||
exports_1("x", x *= 1);
|
||||
@ -56,17 +56,16 @@ System.register([], function(exports_1, context_1) {
|
||||
x - 1;
|
||||
x & 1;
|
||||
x | 1;
|
||||
for (exports_1("x", x = 5);; (exports_1("x", ++x) - 1)) { }
|
||||
for (exports_1("x", x = 8);; (exports_1("x", --x) + 1)) { }
|
||||
for (exports_1("x", x = 15);; exports_1("x", ++x)) { }
|
||||
for (exports_1("x", x = 18);; exports_1("x", --x)) { }
|
||||
for (var x_1 = 50;;) { }
|
||||
for (exports_1("x", x = 5);; exports_1("x", x++) - 1) { }
|
||||
for (exports_1("x", x = 8);; exports_1("x", x--) + 1) { }
|
||||
for (exports_1("x", x = 15);; exports_1("x", x++)) { }
|
||||
for (exports_1("x", x = 18);; exports_1("x", x--)) { }
|
||||
for (x = 50;;) { }
|
||||
exports_1("y", y = [1][0]);
|
||||
_a = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _a.a), exports_1("z1", z1 = _a.b.c);
|
||||
for (var _i = 0, _b = [[1]]; _i < _b.length; _i++) {
|
||||
exports_1("x", x = _b[_i][0]);
|
||||
for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) {
|
||||
exports_1("x", x = _a[_i][0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
var _a;
|
||||
};
|
||||
});
|
||||
|
||||
@ -22,44 +22,46 @@ export {x};
|
||||
export {y as z};
|
||||
|
||||
//// [systemModule9.js]
|
||||
System.register(['file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7'], function(exports_1, context_1) {
|
||||
System.register(["file1", "file2", "file3", "file4", "file5", "file6", "file7"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var ns, file2_1, file3_1, file5_1, ns3;
|
||||
var x, y;
|
||||
var ns, file2_1, file3_1, file5_1, ns3, x, y;
|
||||
var exportedNames_1 = {
|
||||
'x': true,
|
||||
'z': true
|
||||
"x": true,
|
||||
"z": true
|
||||
};
|
||||
function exportStar_1(m) {
|
||||
var exports = {};
|
||||
for(var n in m) {
|
||||
if (n !== "default"&& !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n];
|
||||
for (var n in m) {
|
||||
if (n !== "default" && !exportedNames_1.hasOwnProperty(n))
|
||||
exports[n] = m[n];
|
||||
}
|
||||
exports_1(exports);
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (ns_1) {
|
||||
ns = ns_1;
|
||||
},
|
||||
function (file2_1_1) {
|
||||
file2_1 = file2_1_1;
|
||||
function (_1) {
|
||||
file2_1 = _1;
|
||||
},
|
||||
function (file3_1_1) {
|
||||
file3_1 = file3_1_1;
|
||||
function (_2) {
|
||||
file3_1 = _2;
|
||||
},
|
||||
function (_1) {},
|
||||
function (file5_1_1) {
|
||||
file5_1 = file5_1_1;
|
||||
function (_3) {
|
||||
},
|
||||
function (_4) {
|
||||
file5_1 = _4;
|
||||
},
|
||||
function (ns3_1) {
|
||||
ns3 = ns3_1;
|
||||
},
|
||||
function (file7_1_1) {
|
||||
exportStar_1(file7_1_1);
|
||||
}],
|
||||
execute: function() {
|
||||
function (_5) {
|
||||
exportStar_1(_5);
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
ns.f();
|
||||
file2_1.a();
|
||||
file2_1.b();
|
||||
@ -71,5 +73,5 @@ System.register(['file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7'],
|
||||
exports_1("x", x);
|
||||
exports_1("z", y);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -29,68 +29,63 @@ export declare module M { var v: number; }
|
||||
|
||||
|
||||
//// [file1.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var promise, foo, c, e;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
;
|
||||
exports_1("promise", promise = Promise);
|
||||
exports_1("foo", foo = Foo);
|
||||
exports_1("c", c = C);
|
||||
exports_1("e", e = E);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file2.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file3.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file4.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file5.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file6.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
System.register([], function (exports_1, context_1) {
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -13,7 +13,7 @@ module M {
|
||||
}
|
||||
|
||||
//// [systemModuleConstEnums.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function foo() {
|
||||
@ -22,8 +22,8 @@ System.register([], function(exports_1, context_1) {
|
||||
}
|
||||
exports_1("foo", foo);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -13,18 +13,18 @@ module M {
|
||||
}
|
||||
|
||||
//// [systemModuleConstEnumsSeparateCompilation.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var TopLevelConstEnum, M;
|
||||
function foo() {
|
||||
use(TopLevelConstEnum.X);
|
||||
use(M.NonTopLevelConstEnum.X);
|
||||
}
|
||||
var TopLevelConstEnum, M;
|
||||
exports_1("foo", foo);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
(function (TopLevelConstEnum) {
|
||||
TopLevelConstEnum[TopLevelConstEnum["X"] = 0] = "X";
|
||||
})(TopLevelConstEnum || (TopLevelConstEnum = {}));
|
||||
@ -35,5 +35,5 @@ System.register([], function(exports_1, context_1) {
|
||||
var NonTopLevelConstEnum = M.NonTopLevelConstEnum;
|
||||
})(M || (M = {}));
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -16,54 +16,54 @@ export default class C {}
|
||||
|
||||
|
||||
//// [file1.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function default_1() { }
|
||||
exports_1("default", default_1);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file2.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function foo() { }
|
||||
exports_1("default", foo);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file3.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var default_1;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
default_1 = (function () {
|
||||
function default_1() {
|
||||
function class_1() {
|
||||
}
|
||||
return default_1;
|
||||
return class_1;
|
||||
}());
|
||||
exports_1("default", default_1);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file4.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var C;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
C = (function () {
|
||||
function C() {
|
||||
}
|
||||
@ -71,5 +71,5 @@ System.register([], function(exports_1, context_1) {
|
||||
}());
|
||||
exports_1("default", C);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@ -13,15 +13,15 @@ export module TopLevelModule2 {
|
||||
}
|
||||
|
||||
//// [systemModuleNonTopLevelModuleMembers.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2;
|
||||
function TopLevelFunction() { }
|
||||
var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2;
|
||||
exports_1("TopLevelFunction", TopLevelFunction);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
TopLevelClass = (function () {
|
||||
function TopLevelClass() {
|
||||
}
|
||||
@ -56,5 +56,5 @@ System.register([], function(exports_1, context_1) {
|
||||
})(TopLevelModule2 = TopLevelModule2 || (TopLevelModule2 = {}));
|
||||
exports_1("TopLevelModule2", TopLevelModule2);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user