From bbab04e64e60dc744d13192e3347be2910aa531d Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 10 Feb 2015 15:03:28 -0800 Subject: [PATCH] Accepting new baselines --- .../baselines/reference/APISample_compile.js | 7 ++- .../reference/APISample_compile.types | 19 +++--- tests/baselines/reference/APISample_linter.js | 7 ++- .../reference/APISample_linter.types | 19 +++--- .../reference/APISample_transform.js | 7 ++- .../reference/APISample_transform.types | 19 +++--- .../baselines/reference/APISample_watcher.js | 7 ++- .../reference/APISample_watcher.types | 19 +++--- ...lisionCodeGenModuleWithAccessorChildren.js | 8 +-- ...ionCodeGenModuleWithConstructorChildren.js | 8 +-- ...lisionCodeGenModuleWithFunctionChildren.js | 8 +-- ...ionCodeGenModuleWithMemberClassConflict.js | 6 +- ...ollisionCodeGenModuleWithMethodChildren.js | 8 +-- ...ollisionCodeGenModuleWithModuleChildren.js | 12 ++-- .../es6ImportNamedImportParsingError.js | 5 +- .../baselines/reference/escapedIdentifiers.js | 4 +- .../isDeclarationVisibleNodeKinds.js | 28 ++++----- ...haresNameWithImportDeclarationInsideIt5.js | 4 +- ...haresNameWithImportDeclarationInsideIt6.js | 4 +- tests/baselines/reference/nameCollision.js | 12 ++-- .../reference/privacyGloImportParseErrors.js | 2 +- .../reference/privacyImportParseErrors.js | 4 +- .../reference/recursiveClassReferenceTest.js | 4 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 61 +++++++++---------- 25 files changed, 153 insertions(+), 131 deletions(-) diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 5c74f2fa688..0186edfdf1d 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -902,8 +902,8 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; @@ -1028,7 +1028,8 @@ declare module "typescript" { enumMemberValue?: number; isIllegalTypeReferenceInConstraint?: boolean; isVisible?: boolean; - localModuleName?: string; + generatedName?: string; + generatedNames?: Map; assignmentChecks?: Map; hasReportedStatementInAmbientContext?: boolean; importOnRightSide?: Symbol; diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index aebe5ea695a..7860dd31c7f 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -2882,14 +2882,15 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration +>ImportDeclaration : ImportDeclaration - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string + getExpressionNameSubstitution(node: Identifier): string; +>getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier @@ -3313,8 +3314,12 @@ declare module "typescript" { isVisible?: boolean; >isVisible : boolean - localModuleName?: string; ->localModuleName : string + generatedName?: string; +>generatedName : string + + generatedNames?: Map; +>generatedNames : Map +>Map : Map assignmentChecks?: Map; >assignmentChecks : Map diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 8b40586e88b..3b4ddd6f77d 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -933,8 +933,8 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; @@ -1059,7 +1059,8 @@ declare module "typescript" { enumMemberValue?: number; isIllegalTypeReferenceInConstraint?: boolean; isVisible?: boolean; - localModuleName?: string; + generatedName?: string; + generatedNames?: Map; assignmentChecks?: Map; hasReportedStatementInAmbientContext?: boolean; importOnRightSide?: Symbol; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 1bada73385f..c3e69a2fb18 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -3026,14 +3026,15 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration +>ImportDeclaration : ImportDeclaration - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string + getExpressionNameSubstitution(node: Identifier): string; +>getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier @@ -3457,8 +3458,12 @@ declare module "typescript" { isVisible?: boolean; >isVisible : boolean - localModuleName?: string; ->localModuleName : string + generatedName?: string; +>generatedName : string + + generatedNames?: Map; +>generatedNames : Map +>Map : Map assignmentChecks?: Map; >assignmentChecks : Map diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 74aba68a76c..af88a03ee5c 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -934,8 +934,8 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; @@ -1060,7 +1060,8 @@ declare module "typescript" { enumMemberValue?: number; isIllegalTypeReferenceInConstraint?: boolean; isVisible?: boolean; - localModuleName?: string; + generatedName?: string; + generatedNames?: Map; assignmentChecks?: Map; hasReportedStatementInAmbientContext?: boolean; importOnRightSide?: Symbol; diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 6be348b4131..288e7f53bd7 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -2978,14 +2978,15 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration +>ImportDeclaration : ImportDeclaration - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string + getExpressionNameSubstitution(node: Identifier): string; +>getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier @@ -3409,8 +3410,12 @@ declare module "typescript" { isVisible?: boolean; >isVisible : boolean - localModuleName?: string; ->localModuleName : string + generatedName?: string; +>generatedName : string + + generatedNames?: Map; +>generatedNames : Map +>Map : Map assignmentChecks?: Map; >assignmentChecks : Map diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index 79e2ac39802..d66c384627c 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -971,8 +971,8 @@ declare module "typescript" { errorModuleName?: string; } interface EmitResolver { - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; + getExpressionNameSubstitution(node: Identifier): string; getExportAssignmentName(node: SourceFile): string; isReferencedImportDeclaration(node: Node): boolean; isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; @@ -1097,7 +1097,8 @@ declare module "typescript" { enumMemberValue?: number; isIllegalTypeReferenceInConstraint?: boolean; isVisible?: boolean; - localModuleName?: string; + generatedName?: string; + generatedNames?: Map; assignmentChecks?: Map; hasReportedStatementInAmbientContext?: boolean; importOnRightSide?: Symbol; diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 429a63daed8..7825898dd56 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -3151,14 +3151,15 @@ declare module "typescript" { interface EmitResolver { >EmitResolver : EmitResolver - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration + getGeneratedNameForNode(node: ModuleDeclaration | EnumDeclaration | ImportDeclaration): string; +>getGeneratedNameForNode : (node: EnumDeclaration | ModuleDeclaration | ImportDeclaration) => string +>node : EnumDeclaration | ModuleDeclaration | ImportDeclaration >ModuleDeclaration : ModuleDeclaration >EnumDeclaration : EnumDeclaration +>ImportDeclaration : ImportDeclaration - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string + getExpressionNameSubstitution(node: Identifier): string; +>getExpressionNameSubstitution : (node: Identifier) => string >node : Identifier >Identifier : Identifier @@ -3582,8 +3583,12 @@ declare module "typescript" { isVisible?: boolean; >isVisible : boolean - localModuleName?: string; ->localModuleName : string + generatedName?: string; +>generatedName : string + + generatedNames?: Map; +>generatedNames : Map +>Map : Map assignmentChecks?: Map; >assignmentChecks : Map diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js index 9db005de9b9..141ef285f03 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.js @@ -63,14 +63,14 @@ var M; })(); })(M || (M = {})); var M; -(function (_M) { +(function (_M_1) { var d = (function () { function d() { } Object.defineProperty(d.prototype, "Z", { set: function (p) { var M = 10; - this.y = _M.x; + this.y = _M_1.x; }, enumerable: true, configurable: true @@ -94,14 +94,14 @@ var M; })(); })(M || (M = {})); var M; -(function (_M) { +(function (_M_2) { var f = (function () { function f() { } Object.defineProperty(f.prototype, "Z", { get: function () { var M = 10; - return _M.x; + return _M_2.x; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js index 33a9f97f6d1..2158a0562ea 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js @@ -35,21 +35,21 @@ var M; })(); })(M || (M = {})); var M; -(function (_M) { +(function (_M_1) { var d = (function () { function d(M, p) { - if (p === void 0) { p = _M.x; } + if (p === void 0) { p = _M_1.x; } this.M = M; } return d; })(); })(M || (M = {})); var M; -(function (_M) { +(function (_M_2) { var d2 = (function () { function d2() { var M = 10; - var p = _M.x; + var p = _M_2.x; } return d2; })(); diff --git a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js index bb1c0e7845b..caaa6a59da5 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js @@ -28,17 +28,17 @@ var M; } })(M || (M = {})); var M; -(function (_M) { +(function (_M_1) { function fn2() { var M; - var p = _M.x; + var p = _M_1.x; } })(M || (M = {})); var M; -(function (_M) { +(function (_M_2) { function fn3() { function M() { - var p = _M.x; + var p = _M_2.x; } } })(M || (M = {})); diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.js b/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.js index 3c75d2e5738..59c2ebf295d 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithMemberClassConflict.js @@ -27,19 +27,19 @@ var m1; })(m1 || (m1 = {})); var foo = new m1.m1(); var m2; -(function (__m2) { +(function (_m2_1) { var m2 = (function () { function m2() { } return m2; })(); - __m2.m2 = m2; + _m2_1.m2 = m2; var _m2 = (function () { function _m2() { } return _m2; })(); - __m2._m2 = _m2; + _m2_1._m2 = _m2; })(m2 || (m2 = {})); var foo = new m2.m2(); var foo = new m2._m2(); diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js index 56efb2dcc02..212364ed30b 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js @@ -46,25 +46,25 @@ var M; })(); })(M || (M = {})); var M; -(function (_M) { +(function (_M_1) { var d = (function () { function d() { } d.prototype.fn2 = function () { var M; - var p = _M.x; + var p = _M_1.x; }; return d; })(); })(M || (M = {})); var M; -(function (_M) { +(function (_M_2) { var e = (function () { function e() { } e.prototype.fn3 = function () { function M() { - var p = _M.x; + var p = _M_2.x; } }; return e; diff --git a/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.js index ecc5fca2e9f..3c8b17deadd 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithModuleChildren.js @@ -53,7 +53,7 @@ var M; })(m1 || (m1 = {})); })(M || (M = {})); var M; -(function (_M) { +(function (_M_1) { var m2; (function (m2) { var M = (function () { @@ -61,17 +61,17 @@ var M; } return M; })(); - var p = _M.x; + var p = _M_1.x; var p2 = new M(); })(m2 || (m2 = {})); })(M || (M = {})); var M; -(function (_M) { +(function (_M_2) { var m3; (function (m3) { function M() { } - var p = _M.x; + var p = _M_2.x; var p2 = M(); })(m3 || (m3 = {})); })(M || (M = {})); @@ -84,12 +84,12 @@ var M; })(m3 || (m3 = {})); })(M || (M = {})); var M; -(function (_M) { +(function (_M_3) { var m4; (function (m4) { var M; (function (M) { - var p = _M.x; + var p = _M_3.x; })(M || (M = {})); })(m4 || (m4 = {})); })(M || (M = {})); diff --git a/tests/baselines/reference/es6ImportNamedImportParsingError.js b/tests/baselines/reference/es6ImportNamedImportParsingError.js index b1f7f2c295b..f9d8e90f707 100644 --- a/tests/baselines/reference/es6ImportNamedImportParsingError.js +++ b/tests/baselines/reference/es6ImportNamedImportParsingError.js @@ -20,10 +20,9 @@ exports.m = exports.a; from; "es6ImportNamedImportParsingError_0"; { - a; + _module_1.a; } from; "es6ImportNamedImportParsingError_0"; -var _a = require(); -var a = _a.a; +var _module_1 = require(); "es6ImportNamedImportParsingError_0"; diff --git a/tests/baselines/reference/escapedIdentifiers.js b/tests/baselines/reference/escapedIdentifiers.js index 5de505e4cb7..7051d8d2433 100644 --- a/tests/baselines/reference/escapedIdentifiers.js +++ b/tests/baselines/reference/escapedIdentifiers.js @@ -143,8 +143,8 @@ var moduleType1; moduleType1.baz1; })(moduleType1 || (moduleType1 = {})); var moduleType\u0032; -(function (moduleType\u0032) { - moduleType\u0032.baz2; +(function (moduleType2) { + moduleType2.baz2; })(moduleType\u0032 || (moduleType\u0032 = {})); moduleType1.baz1 = 3; moduleType\u0031.baz1 = 3; diff --git a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js index 0d1664c7f59..d357922f5bc 100644 --- a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js +++ b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js @@ -80,59 +80,59 @@ var schema; })(schema || (schema = {})); // Constructor types var schema; -(function (_schema) { +(function (_schema_1) { function createValidator2(schema) { return undefined; } - _schema.createValidator2 = createValidator2; + _schema_1.createValidator2 = createValidator2; })(schema || (schema = {})); // union types var schema; -(function (_schema) { +(function (_schema_2) { function createValidator3(schema) { return undefined; } - _schema.createValidator3 = createValidator3; + _schema_2.createValidator3 = createValidator3; })(schema || (schema = {})); // Array types var schema; -(function (_schema) { +(function (_schema_3) { function createValidator4(schema) { return undefined; } - _schema.createValidator4 = createValidator4; + _schema_3.createValidator4 = createValidator4; })(schema || (schema = {})); // TypeLiterals var schema; -(function (_schema) { +(function (_schema_4) { function createValidator5(schema) { return undefined; } - _schema.createValidator5 = createValidator5; + _schema_4.createValidator5 = createValidator5; })(schema || (schema = {})); // Tuple types var schema; -(function (_schema) { +(function (_schema_5) { function createValidator6(schema) { return undefined; } - _schema.createValidator6 = createValidator6; + _schema_5.createValidator6 = createValidator6; })(schema || (schema = {})); // Paren Types var schema; -(function (_schema) { +(function (_schema_6) { function createValidator7(schema) { return undefined; } - _schema.createValidator7 = createValidator7; + _schema_6.createValidator7 = createValidator7; })(schema || (schema = {})); // Type reference var schema; -(function (_schema) { +(function (_schema_7) { function createValidator8(schema) { return undefined; } - _schema.createValidator8 = createValidator8; + _schema_7.createValidator8 = createValidator8; })(schema || (schema = {})); var schema; (function (schema) { diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt5.js b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt5.js index 0995dcbb9c0..0bc314ccc07 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt5.js +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt5.js @@ -30,10 +30,10 @@ var Z; var A; (function (A) { var M; - (function (M) { + (function (_M) { function bar() { } - M.bar = bar; + _M.bar = bar; M.bar(); // Should call Z.M.bar })(M = A.M || (A.M = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.js b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.js index 51b2d4f89f9..4ba0a33c29a 100644 --- a/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.js +++ b/tests/baselines/reference/moduleSharesNameWithImportDeclarationInsideIt6.js @@ -24,9 +24,9 @@ var Z; var A; (function (A) { var M; - (function (M) { + (function (_M) { function bar() { } - M.bar = bar; + _M.bar = bar; })(M = A.M || (A.M = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/nameCollision.js b/tests/baselines/reference/nameCollision.js index 67e6f3afa47..fe7bb3a8919 100644 --- a/tests/baselines/reference/nameCollision.js +++ b/tests/baselines/reference/nameCollision.js @@ -48,7 +48,7 @@ module D { //// [nameCollision.js] var A; -(function (__A) { +(function (_A_1) { // these 2 statements force an underscore before the 'A' // in the generated function call. var A = 12; @@ -83,15 +83,15 @@ var X; })(Y = _X.Y || (_X.Y = {})); })(X || (X = {})); var Y; -(function (_Y) { +(function (_Y_1) { var Y; - (function (_Y) { + (function (_Y_2) { (function (Y) { Y[Y["Red"] = 0] = "Red"; Y[Y["Blue"] = 1] = "Blue"; - })(_Y.Y || (_Y.Y = {})); - var Y = _Y.Y; - })(Y = _Y.Y || (_Y.Y = {})); + })(_Y_2.Y || (_Y_2.Y = {})); + var Y = _Y_2.Y; + })(Y = _Y_1.Y || (_Y_1.Y = {})); })(Y || (Y = {})); // no collision, since interface doesn't // generate code. diff --git a/tests/baselines/reference/privacyGloImportParseErrors.js b/tests/baselines/reference/privacyGloImportParseErrors.js index 27e24a1cf38..3b82d65a07b 100644 --- a/tests/baselines/reference/privacyGloImportParseErrors.js +++ b/tests/baselines/reference/privacyGloImportParseErrors.js @@ -238,7 +238,7 @@ var glo_M1_public; glo_M1_public.v2; })(glo_M1_public || (glo_M1_public = {})); var m2; -(function (m2) { +(function (_m2) { var m4; (function (m4) { var a = 10; diff --git a/tests/baselines/reference/privacyImportParseErrors.js b/tests/baselines/reference/privacyImportParseErrors.js index dd2a0cfe50b..7a875fa12d1 100644 --- a/tests/baselines/reference/privacyImportParseErrors.js +++ b/tests/baselines/reference/privacyImportParseErrors.js @@ -566,14 +566,14 @@ var glo_im4_private_v4_private = glo_im4_private.f1(); exports.glo_im1_public = glo_M1_public; exports.glo_im2_public = glo_M3_private; var m2; -(function (m2) { +(function (_m2) { var m4; (function (m4) { var a = 10; })(m4 || (m4 = {})); })(m2 || (m2 = {})); var m3; -(function (m3) { +(function (_m3) { var m4; (function (m4) { var a = 10; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 661ecb3a0e7..f565f8f23d0 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -116,7 +116,7 @@ var Sample; var Actions; (function (Actions) { var Thing; - (function (_Thing) { + (function (_Thing_1) { var Find; (function (Find) { var StartFindAction = (function () { @@ -131,7 +131,7 @@ var Sample; return StartFindAction; })(); Find.StartFindAction = StartFindAction; - })(Find = _Thing.Find || (_Thing.Find = {})); + })(Find = _Thing_1.Find || (_Thing_1.Find = {})); })(Thing = Actions.Thing || (Actions.Thing = {})); })(Actions = Sample.Actions || (Sample.Actions = {})); })(Sample || (Sample = {})); diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index d2e66a925a8..b2478b7f05c 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAACA,IAAAA,OAAOA,CAUpBA;IAVaA,WAAAA,OAAOA;QAACC,IAAAA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CA,SAAaA,IAAIA;wBAASC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,GAAJA,IAQZA,CAAAA;YACFA,CAACA,EAxB6BD,SAASA,GAATA,mBAASA,KAATA,mBAASA,QAwBtCA;QAADA,CAACA,EAxBmBV,SAASA,GAATA,eAASA,KAATA,eAASA,QAwB5BA;IAADA,CAACA,EAxBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAwBlBA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;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,AAXDD,IAWCA;gBAXYA,eAAKA,GAALA,KAWZA,CAAAA;gBAEDA,IAAaA,IAAIA;oBAASM,UAAbA,IAAIA,UAAqBA;oBAAtCA,SAAaA,IAAIA;wBAASC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,GAAJA,IAQZA,CAAAA;YACFA,CAACA,EAxB6BD,SAASA,GAATA,mBAASA,KAATA,mBAASA,QAwBtCA;QAADA,CAACA,EAxBmBV,SAASA,GAATA,eAASA,KAATA,eAASA,QAwB5BA;IAADA,CAACA,EAxBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAwBlBA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index d7163bf7760..d02743ba296 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -139,7 +139,7 @@ sourceFile:recursiveClassReferenceTest.ts 2 > ^^^^ 3 > ^^^^^ 4 > ^ -5 > ^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^-> 1 >. 2 > 3 > Thing @@ -159,16 +159,16 @@ sourceFile:recursiveClassReferenceTest.ts 3 >Emitted(13, 18) Source(32, 28) + SourceIndex(0) name (Sample.Actions) 4 >Emitted(13, 19) Source(42, 2) + SourceIndex(0) name (Sample.Actions) --- ->>> (function (_Thing) { +>>> (function (_Thing_1) { 1->^^^^^^^^ 2 > ^^^^^^^^^^^ -3 > ^^^^^^ +3 > ^^^^^^^^ 1-> 2 > 3 > Thing 1->Emitted(14, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) 2 >Emitted(14, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(14, 26) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +3 >Emitted(14, 28) Source(32, 28) + SourceIndex(0) name (Sample.Actions) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -377,7 +377,7 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^ 4 > ^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^-> +6 > ^^^^^^^-> 1-> 2 > StartFindAction 3 > @@ -397,17 +397,16 @@ sourceFile:recursiveClassReferenceTest.ts 4 >Emitted(28, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) 5 >Emitted(28, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- ->>> })(Find = _Thing.Find || (_Thing.Find = {})); +>>> })(Find = _Thing_1.Find || (_Thing_1.Find = {})); 1->^^^^^^^^^^^^ 2 > ^ 3 > ^^ 4 > ^^^^ 5 > ^^^ -6 > ^^^^^^^^^^^ -7 > ^^^^^ -8 > ^^^^^^^^^^^ -9 > ^^^^^^^^ -10> ^^-> +6 > ^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } @@ -415,31 +414,31 @@ sourceFile:recursiveClassReferenceTest.ts 4 > Find 5 > 6 > Find -7 > -8 > Find -9 > { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } +7 > +8 > Find +9 > { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } 1->Emitted(29, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) 2 >Emitted(29, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) 3 >Emitted(29, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) 4 >Emitted(29, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) 5 >Emitted(29, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -6 >Emitted(29, 34) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -7 >Emitted(29, 39) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -8 >Emitted(29, 50) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -9 >Emitted(29, 58) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +6 >Emitted(29, 36) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +7 >Emitted(29, 41) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +8 >Emitted(29, 54) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +9 >Emitted(29, 62) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); -1->^^^^^^^^ +1 >^^^^^^^^ 2 > ^ 3 > ^^ 4 > ^^^^^ @@ -449,7 +448,7 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ^^^^^^^^^^^^^ 9 > ^^^^^^^^ 10> ^-> -1-> +1 > 2 > } 3 > 4 > Thing @@ -468,7 +467,7 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(30, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) +1 >Emitted(30, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) 2 >Emitted(30, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) 3 >Emitted(30, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) 4 >Emitted(30, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions)