diff --git a/Jakefile.js b/Jakefile.js index d1821b5b5e0..7b9c4806e0a 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -223,7 +223,6 @@ function concatenateFiles(destinationFile, sourceFiles) { var useDebugMode = true; var useTransforms = process.env.USE_TRANSFORMS || false; -var useTransformCompat = false; var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node"); var compilerFilename = "tsc.js"; var LKGCompiler = path.join(LKGDirectory, compilerFilename); @@ -286,9 +285,6 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu if (useBuiltCompiler && useTransforms) { options += " --experimentalTransforms" } - else if (useBuiltCompiler && useTransformCompat) { - options += " --transformCompatibleEmit" - } var cmd = host + " " + compilerPath + " " + options + " "; cmd = cmd + sources.join(" "); @@ -417,10 +413,6 @@ task("setTransforms", function() { useTransforms = true; }); -task("setTransformCompat", function() { - useTransformCompat = true; -}); - task("configure-nightly", [configureNightlyJs], function() { var cmd = host + " " + configureNightlyJs + " " + packageJson + " " + programTs; console.log(cmd); diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 307bb5d5403..cc2806f93c1 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -327,13 +327,6 @@ namespace ts { name: "experimentalTransforms", type: "boolean", experimental: true - }, - { - // this option will be removed when this is merged with master and exists solely - // to enable the tree transforming emitter side-by-side with the existing emitter. - name: "transformCompatibleEmit", - type: "boolean", - experimental: true } ]; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 357fec7f0fd..a3c27d8d817 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1915,9 +1915,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge if (multiLine) { decreaseIndent(); - if (!compilerOptions.transformCompatibleEmit) { - writeLine(); - } } write(")"); @@ -2237,7 +2234,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge return forEach(elements, e => e.kind === SyntaxKind.SpreadElementExpression); } - function skipParentheses(node: Expression): Expression { + function skipParenthesesAndAssertions(node: Expression): Expression { while (node.kind === SyntaxKind.ParenthesizedExpression || node.kind === SyntaxKind.TypeAssertionExpression || node.kind === SyntaxKind.AsExpression) { node = (node).expression; } @@ -2268,7 +2265,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge function emitCallWithSpread(node: CallExpression) { let target: Expression; - const expr = skipParentheses(node.expression); + const expr = skipParenthesesAndAssertions(node.expression); if (expr.kind === SyntaxKind.PropertyAccessExpression) { // Target will be emitted as "this" argument target = emitCallTarget((expr).expression); @@ -4334,9 +4331,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge writeLine(); emitStart(restParam); emitNodeWithCommentsAndWithoutSourcemap(restParam.name); - write(restIndex > 0 || !compilerOptions.transformCompatibleEmit - ? `[${tempName} - ${restIndex}] = arguments[${tempName}];` - : `[${tempName}] = arguments[${tempName}];`); + write(`[${tempName} - ${restIndex}] = arguments[${tempName}];`); emitEnd(restParam); decreaseIndent(); writeLine(); @@ -5356,7 +5351,7 @@ const _super = (function (geti, seti) { const isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === SyntaxKind.ClassExpression; let tempVariable: Identifier; - if (isClassExpressionWithStaticProperties && compilerOptions.transformCompatibleEmit) { + if (isClassExpressionWithStaticProperties) { tempVariable = createAndRecordTempVariable(TempFlags.Auto); write("("); increaseIndent(); @@ -5393,11 +5388,6 @@ const _super = (function (geti, seti) { writeLine(); emitConstructor(node, baseTypeNode); emitMemberFunctionsForES5AndLower(node); - if (!compilerOptions.transformCompatibleEmit) { - emitPropertyDeclarations(node, staticProperties); - writeLine(); - emitDecoratorsOfClass(node, /*decoratedClassAlias*/ undefined); - } writeLine(); emitToken(SyntaxKind.CloseBraceToken, node.members.end, () => { write("return "); @@ -5424,13 +5414,10 @@ const _super = (function (geti, seti) { write("))"); if (node.kind === SyntaxKind.ClassDeclaration) { write(";"); - if (compilerOptions.transformCompatibleEmit) { - emitPropertyDeclarations(node, staticProperties); - writeLine(); - emitDecoratorsOfClass(node, /*decoratedClassAlias*/ undefined); - } + emitPropertyDeclarations(node, staticProperties); + emitDecoratorsOfClass(node, /*decoratedClassAlias*/ undefined); } - else if (isClassExpressionWithStaticProperties && compilerOptions.transformCompatibleEmit) { + else if (isClassExpressionWithStaticProperties) { for (const property of staticProperties) { write(","); writeLine(); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index fb5ab0c3609..07d1daec669 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2473,7 +2473,6 @@ namespace ts { allowJs?: boolean; /* @internal */ stripInternal?: boolean; /* @internal */ experimentalTransforms?: boolean; - /* @internal */ transformCompatibleEmit?: boolean; // Skip checking lib.d.ts to help speed up tests. /* @internal */ skipDefaultLibCheck?: boolean; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js index a0cb50e7382..63d3739846b 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js @@ -28,9 +28,9 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; return Point; }()); +Point.Origin = { x: 0, y: 0 }; var Point; (function (Point) { Point.Origin = ""; //expected duplicate identifier error @@ -42,9 +42,9 @@ var A; this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; return Point; }()); + Point.Origin = { x: 0, y: 0 }; A.Point = Point; var Point; (function (Point) { diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js index 3bbf3b98d6e..3921546a21c 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js @@ -28,9 +28,9 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; return Point; }()); +Point.Origin = { x: 0, y: 0 }; var Point; (function (Point) { var Origin = ""; // not an error, since not exported @@ -42,9 +42,9 @@ var A; this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; return Point; }()); + Point.Origin = { x: 0, y: 0 }; A.Point = Point; var Point; (function (Point) { diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js index d5c3b3d63f4..7633955b227 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js @@ -7,6 +7,6 @@ class AtomicNumbers { var AtomicNumbers = (function () { function AtomicNumbers() { } - AtomicNumbers.H = 1; return AtomicNumbers; }()); +AtomicNumbers.H = 1; diff --git a/tests/baselines/reference/ES5SymbolProperty1.js b/tests/baselines/reference/ES5SymbolProperty1.js index 1073a33163d..ab3f420c95c 100644 --- a/tests/baselines/reference/ES5SymbolProperty1.js +++ b/tests/baselines/reference/ES5SymbolProperty1.js @@ -14,7 +14,6 @@ obj[Symbol.foo]; var Symbol; var obj = (_a = {}, _a[Symbol.foo] = 0, - _a -); + _a); obj[Symbol.foo]; var _a; diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index beb91191bc0..0739792fddd 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -38,9 +38,9 @@ define(["require", "exports"], function (require, exports) { function C1() { this.m1 = 42; } - C1.s1 = true; return C1; }()); + C1.s1 = true; exports.C1 = C1; (function (E1) { E1[E1["A"] = 0] = "A"; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 8ee1f397d43..e6790021f63 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -37,9 +37,9 @@ var Point = (function () { Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; - Point.origin = new Point(0, 0); return Point; }()); +Point.origin = new Point(0, 0); var Point3D = (function (_super) { __extends(Point3D, _super); function Point3D(x, y, z, m) { diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js index 06eaa9916e3..0197d919fef 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -163,31 +163,35 @@ function foo8() { var x; } function foo9() { - var y = (function () { - function class_3() { - } - class_3.a = x; - return class_3; - }()); + var y = (_a = (function () { + function class_3() { + } + return class_3; + }()), + _a.a = x, + _a); var x; + var _a; } function foo10() { var A = (function () { function A() { } - A.a = x; return A; }()); + A.a = x; var x; } function foo11() { function f() { - var y = (function () { - function class_4() { - } - class_4.a = x; - return class_4; - }()); + var y = (_a = (function () { + function class_4() { + } + return class_4; + }()), + _a.a = x, + _a); + var _a; } var x; } diff --git a/tests/baselines/reference/class2.js b/tests/baselines/reference/class2.js index 6ef78ed46ee..91ac89da109 100644 --- a/tests/baselines/reference/class2.js +++ b/tests/baselines/reference/class2.js @@ -5,6 +5,6 @@ class foo { constructor() { static f = 3; } } var foo = (function () { function foo() { } - foo.f = 3; return foo; }()); +foo.f = 3; diff --git a/tests/baselines/reference/classExpressionWithDecorator1.js b/tests/baselines/reference/classExpressionWithDecorator1.js index e051e05251b..9b52891b559 100644 --- a/tests/baselines/reference/classExpressionWithDecorator1.js +++ b/tests/baselines/reference/classExpressionWithDecorator1.js @@ -12,10 +12,10 @@ var v = ; var C = (function () { function C() { } - C.p = 1; - C = __decorate([ - decorate - ], C); return C; }()); +C.p = 1; +C = __decorate([ + decorate +], C); ; diff --git a/tests/baselines/reference/classExpressionWithStaticProperties1.js b/tests/baselines/reference/classExpressionWithStaticProperties1.js index cfe85d97a71..23d18d76766 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties1.js +++ b/tests/baselines/reference/classExpressionWithStaticProperties1.js @@ -2,10 +2,12 @@ var v = class C { static a = 1; static b = 2 }; //// [classExpressionWithStaticProperties1.js] -var v = (function () { - function C() { - } - C.a = 1; - C.b = 2; - return C; -}()); +var v = (_a = (function () { + function C() { + } + return C; + }()), + _a.a = 1, + _a.b = 2, + _a); +var _a; diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2.js b/tests/baselines/reference/classExpressionWithStaticProperties2.js index 134441e0ad9..b9fc0345591 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties2.js +++ b/tests/baselines/reference/classExpressionWithStaticProperties2.js @@ -2,9 +2,11 @@ var v = class C { static a = 1; static b }; //// [classExpressionWithStaticProperties2.js] -var v = (function () { - function C() { - } - C.a = 1; - return C; -}()); +var v = (_a = (function () { + function C() { + } + return C; + }()), + _a.a = 1, + _a); +var _a; diff --git a/tests/baselines/reference/classMemberInitializerScoping.js b/tests/baselines/reference/classMemberInitializerScoping.js index 8f78cfb9ac6..52bbaee8945 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.js +++ b/tests/baselines/reference/classMemberInitializerScoping.js @@ -27,9 +27,9 @@ var CCC = (function () { this.y = aaa; this.y = ''; // was: error, cannot assign string to number } - CCC.staticY = aaa; // This shouldnt be error return CCC; }()); +CCC.staticY = aaa; // This shouldnt be error // above is equivalent to this: var aaaa = 1; var CCCC = (function () { diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js index 752220a4cbc..c5b661831a2 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js @@ -40,12 +40,12 @@ var Test = (function () { console.log(field); // Using field here shouldnt be error }; } - Test.staticMessageHandler = function () { - var field = Test.field; - console.log(field); // Using field here shouldnt be error - }; return Test; }()); +Test.staticMessageHandler = function () { + var field = Test.field; + console.log(field); // Using field here shouldnt be error +}; var field1; var Test1 = (function () { function Test1(field1) { @@ -56,8 +56,8 @@ var Test1 = (function () { // it would resolve to private field1 and thats not what user intended here. }; } - Test1.staticMessageHandler = function () { - console.log(field1); // This shouldnt be error as its a static property - }; return Test1; }()); +Test1.staticMessageHandler = function () { + console.log(field1); // This shouldnt be error as its a static property +}; diff --git a/tests/baselines/reference/classWithPrivateProperty.js b/tests/baselines/reference/classWithPrivateProperty.js index 6e75797523f..c94f1d8ed80 100644 --- a/tests/baselines/reference/classWithPrivateProperty.js +++ b/tests/baselines/reference/classWithPrivateProperty.js @@ -32,9 +32,9 @@ var C = (function () { } C.prototype.c = function () { return ''; }; C.f = function () { return ''; }; - C.g = function () { return ''; }; return C; }()); +C.g = function () { return ''; }; var c = new C(); var r1 = c.x; var r2 = c.a; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 75eadaf4010..2b2e01e59df 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -42,9 +42,9 @@ var C = (function () { } C.prototype.c = function () { return ''; }; C.f = function () { return ''; }; - C.g = function () { return ''; }; return C; }()); +C.g = function () { return ''; }; var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/classWithPublicProperty.js b/tests/baselines/reference/classWithPublicProperty.js index 054713264bd..47708b7aff3 100644 --- a/tests/baselines/reference/classWithPublicProperty.js +++ b/tests/baselines/reference/classWithPublicProperty.js @@ -30,9 +30,9 @@ var C = (function () { } C.prototype.c = function () { return ''; }; C.f = function () { return ''; }; - C.g = function () { return ''; }; return C; }()); +C.g = function () { return ''; }; // all of these are valid var c = new C(); var r1 = c.x; diff --git a/tests/baselines/reference/cloduleStaticMembers.js b/tests/baselines/reference/cloduleStaticMembers.js index 6095442b629..868b9305bdf 100644 --- a/tests/baselines/reference/cloduleStaticMembers.js +++ b/tests/baselines/reference/cloduleStaticMembers.js @@ -16,10 +16,10 @@ module Clod { var Clod = (function () { function Clod() { } - Clod.x = 10; - Clod.y = 10; return Clod; }()); +Clod.x = 10; +Clod.y = 10; var Clod; (function (Clod) { var p = Clod.x; diff --git a/tests/baselines/reference/commentsOnStaticMembers.js b/tests/baselines/reference/commentsOnStaticMembers.js index 51ed906841d..851f9025be3 100644 --- a/tests/baselines/reference/commentsOnStaticMembers.js +++ b/tests/baselines/reference/commentsOnStaticMembers.js @@ -24,13 +24,13 @@ class test { var test = (function () { function test() { } - /** - * p1 comment appears in output - */ - test.p1 = ""; - /** - * p3 comment appears in output - */ - test.p3 = ""; return test; }()); +/** + * p1 comment appears in output + */ +test.p1 = ""; +/** + * p3 comment appears in output + */ +test.p3 = ""; diff --git a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js index 3f49588c103..b8cf42ea762 100644 --- a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js @@ -19,9 +19,9 @@ var C1 = (function () { function C1() { this.m1 = 42; } - C1.s1 = true; return C1; }()); +C1.s1 = true; exports.C1 = C1; //// [foo_1.js] "use strict"; diff --git a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js index 720554f7e32..34d5c343b3c 100644 --- a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js @@ -37,9 +37,9 @@ var C1 = (function () { function C1() { this.m1 = 42; } - C1.s1 = true; return C1; }()); +C1.s1 = true; exports.C1 = C1; (function (E1) { E1[E1["A"] = 0] = "A"; diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.js b/tests/baselines/reference/computedPropertyNames10_ES5.js index 14d9235b12b..302f9355be8 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.js +++ b/tests/baselines/reference/computedPropertyNames10_ES5.js @@ -32,6 +32,5 @@ var v = (_a = {}, _a[true] = function () { }, _a["hello bye"] = function () { }, _a["hello " + a + " bye"] = function () { }, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.js b/tests/baselines/reference/computedPropertyNames11_ES5.js index 0917f824770..4fc74b30cbe 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.js +++ b/tests/baselines/reference/computedPropertyNames11_ES5.js @@ -68,6 +68,5 @@ var v = (_a = {}, enumerable: true, configurable: true }), - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames12_ES5.js b/tests/baselines/reference/computedPropertyNames12_ES5.js index 2aec8856286..10427b5dc13 100644 --- a/tests/baselines/reference/computedPropertyNames12_ES5.js +++ b/tests/baselines/reference/computedPropertyNames12_ES5.js @@ -26,6 +26,6 @@ var C = (function () { this[s + n] = 2; this["hello bye"] = 0; } - C["hello " + a + " bye"] = 0; return C; }()); +C["hello " + a + " bye"] = 0; diff --git a/tests/baselines/reference/computedPropertyNames18_ES5.js b/tests/baselines/reference/computedPropertyNames18_ES5.js index b65c7fd4f7d..a62af506531 100644 --- a/tests/baselines/reference/computedPropertyNames18_ES5.js +++ b/tests/baselines/reference/computedPropertyNames18_ES5.js @@ -9,7 +9,6 @@ function foo() { function foo() { var obj = (_a = {}, _a[this.bar] = 0, - _a - ); + _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames19_ES5.js b/tests/baselines/reference/computedPropertyNames19_ES5.js index 36f3e66c7c2..bda3e01bbed 100644 --- a/tests/baselines/reference/computedPropertyNames19_ES5.js +++ b/tests/baselines/reference/computedPropertyNames19_ES5.js @@ -10,7 +10,6 @@ var M; (function (M) { var obj = (_a = {}, _a[this.bar] = 0, - _a - ); + _a); var _a; })(M || (M = {})); diff --git a/tests/baselines/reference/computedPropertyNames1_ES5.js b/tests/baselines/reference/computedPropertyNames1_ES5.js index 4fdec28c7aa..75bbe909927 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES5.js +++ b/tests/baselines/reference/computedPropertyNames1_ES5.js @@ -17,6 +17,5 @@ var v = (_a = {}, enumerable: true, configurable: true }), - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames20_ES5.js b/tests/baselines/reference/computedPropertyNames20_ES5.js index 65acd7fa08f..1eec0a7bcdb 100644 --- a/tests/baselines/reference/computedPropertyNames20_ES5.js +++ b/tests/baselines/reference/computedPropertyNames20_ES5.js @@ -6,6 +6,5 @@ var obj = { //// [computedPropertyNames20_ES5.js] var obj = (_a = {}, _a[this.bar] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames22_ES5.js b/tests/baselines/reference/computedPropertyNames22_ES5.js index 5448f4dcf8d..721418ee930 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES5.js +++ b/tests/baselines/reference/computedPropertyNames22_ES5.js @@ -15,8 +15,7 @@ var C = (function () { C.prototype.bar = function () { var obj = (_a = {}, _a[this.bar()] = function () { }, - _a - ); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index f38ac0b2e0d..b03dd285ced 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -35,8 +35,7 @@ var C = (function (_super) { C.prototype.foo = function () { var obj = (_a = {}, _a[_super.prototype.bar.call(this)] = function () { }, - _a - ); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index b5b1fdf77aa..ed15bbf0145 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -27,8 +27,7 @@ var C = (function (_super) { _super.call(this); var obj = (_a = {}, _a[(_super.call(this), "prop")] = function () { }, - _a - ); + _a); var _a; } return C; diff --git a/tests/baselines/reference/computedPropertyNames29_ES5.js b/tests/baselines/reference/computedPropertyNames29_ES5.js index 46ba529d7a5..af6f93c8ad9 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES5.js +++ b/tests/baselines/reference/computedPropertyNames29_ES5.js @@ -19,8 +19,7 @@ var C = (function () { (function () { var obj = (_a = {}, _a[_this.bar()] = function () { }, - _a - ); + _a); var _a; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index e787689d393..a900fd44c67 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -36,8 +36,7 @@ var C = (function (_super) { // illegal, and not capturing this is consistent with //treatment of other similar violations. _a[(_super.call(this), "prop")] = function () { }, - _a - ); + _a); var _a; }); } diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 8417f103fb7..86fb6655a27 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -39,8 +39,7 @@ var C = (function (_super) { (function () { var obj = (_a = {}, _a[_super.prototype.bar.call(_this)] = function () { }, - _a - ); + _a); var _a; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames33_ES5.js b/tests/baselines/reference/computedPropertyNames33_ES5.js index 8db62818e22..e6d46b03c10 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES5.js +++ b/tests/baselines/reference/computedPropertyNames33_ES5.js @@ -17,8 +17,7 @@ var C = (function () { C.prototype.bar = function () { var obj = (_a = {}, _a[foo()] = function () { }, - _a - ); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames34_ES5.js b/tests/baselines/reference/computedPropertyNames34_ES5.js index fa0af2897f7..3109c400422 100644 --- a/tests/baselines/reference/computedPropertyNames34_ES5.js +++ b/tests/baselines/reference/computedPropertyNames34_ES5.js @@ -17,8 +17,7 @@ var C = (function () { C.bar = function () { var obj = (_a = {}, _a[foo()] = function () { }, - _a - ); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames46_ES5.js b/tests/baselines/reference/computedPropertyNames46_ES5.js index 307dadcbe91..815f5769f3b 100644 --- a/tests/baselines/reference/computedPropertyNames46_ES5.js +++ b/tests/baselines/reference/computedPropertyNames46_ES5.js @@ -6,6 +6,5 @@ var o = { //// [computedPropertyNames46_ES5.js] var o = (_a = {}, _a["" || 0] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames47_ES5.js b/tests/baselines/reference/computedPropertyNames47_ES5.js index d03b614b29b..a2fff2110b4 100644 --- a/tests/baselines/reference/computedPropertyNames47_ES5.js +++ b/tests/baselines/reference/computedPropertyNames47_ES5.js @@ -16,6 +16,5 @@ var E2; })(E2 || (E2 = {})); var o = (_a = {}, _a[E1.x || E2.x] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames48_ES5.js b/tests/baselines/reference/computedPropertyNames48_ES5.js index 15123a98f30..55b08ef8301 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES5.js +++ b/tests/baselines/reference/computedPropertyNames48_ES5.js @@ -25,14 +25,11 @@ var E; var a; extractIndexer((_a = {}, _a[a] = "", - _a -)); // Should return string + _a)); // Should return string extractIndexer((_b = {}, _b[E.x] = "", - _b -)); // Should return string + _b)); // Should return string extractIndexer((_c = {}, _c["" || 0] = "", - _c -)); // Should return any (widened form of undefined) + _c)); // Should return any (widened form of undefined) var _a, _b, _c; diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.js b/tests/baselines/reference/computedPropertyNames49_ES5.js index 3427ea665a0..12c3430fbe9 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.js +++ b/tests/baselines/reference/computedPropertyNames49_ES5.js @@ -62,6 +62,5 @@ var x = (_a = { }), , _a.p2 = 20, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames4_ES5.js b/tests/baselines/reference/computedPropertyNames4_ES5.js index f91476c79c1..ac0fa8ec937 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES5.js +++ b/tests/baselines/reference/computedPropertyNames4_ES5.js @@ -32,6 +32,5 @@ var v = (_a = {}, _a[true] = 0, _a["hello bye"] = 0, _a["hello " + a + " bye"] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.js b/tests/baselines/reference/computedPropertyNames50_ES5.js index a74561295be..db9a03578df 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.js +++ b/tests/baselines/reference/computedPropertyNames50_ES5.js @@ -58,6 +58,5 @@ var x = (_a = { }), , _a.p2 = 20, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames5_ES5.js b/tests/baselines/reference/computedPropertyNames5_ES5.js index 58c5af2efa3..3367faa2c20 100644 --- a/tests/baselines/reference/computedPropertyNames5_ES5.js +++ b/tests/baselines/reference/computedPropertyNames5_ES5.js @@ -18,6 +18,5 @@ var v = (_a = {}, _a[{}] = 0, _a[undefined] = undefined, _a[null] = null, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames6_ES5.js b/tests/baselines/reference/computedPropertyNames6_ES5.js index 7e9c6202940..29d035bfcbf 100644 --- a/tests/baselines/reference/computedPropertyNames6_ES5.js +++ b/tests/baselines/reference/computedPropertyNames6_ES5.js @@ -16,6 +16,5 @@ var v = (_a = {}, _a[p1] = 0, _a[p2] = 1, _a[p3] = 2, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames7_ES5.js b/tests/baselines/reference/computedPropertyNames7_ES5.js index 3311ec7e092..01cf2efc030 100644 --- a/tests/baselines/reference/computedPropertyNames7_ES5.js +++ b/tests/baselines/reference/computedPropertyNames7_ES5.js @@ -13,6 +13,5 @@ var E; })(E || (E = {})); var v = (_a = {}, _a[E.member] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames8_ES5.js b/tests/baselines/reference/computedPropertyNames8_ES5.js index 6eceee81adb..82d262c7e4e 100644 --- a/tests/baselines/reference/computedPropertyNames8_ES5.js +++ b/tests/baselines/reference/computedPropertyNames8_ES5.js @@ -15,7 +15,6 @@ function f() { var v = (_a = {}, _a[t] = 0, _a[u] = 1, - _a - ); + _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames9_ES5.js b/tests/baselines/reference/computedPropertyNames9_ES5.js index 6c1d7bcb4d0..b1ac6c9e3b6 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES5.js +++ b/tests/baselines/reference/computedPropertyNames9_ES5.js @@ -16,6 +16,5 @@ var v = (_a = {}, _a[f("")] = 0, _a[f(0)] = 0, _a[f(true)] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js index 1f7a3ae123e..d8a33951d4a 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js @@ -12,6 +12,5 @@ var o: I = { var o = (_a = {}, _a[+"foo"] = "", _a[+"bar"] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js index c4bfde03531..1ee88351154 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js @@ -13,6 +13,5 @@ var o: I = { var o = (_a = {}, _a["" + 0] = function (y) { return y.length; }, _a["" + 1] = function (y) { return y.length; }, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js index 945475f8533..6be09e4bef3 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js @@ -13,6 +13,5 @@ var o: I = { var o = (_a = {}, _a[+"foo"] = function (y) { return y.length; }, _a[+"bar"] = function (y) { return y.length; }, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js index 98042f201e3..b510cda2916 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js @@ -12,6 +12,5 @@ var o: I = { var o = (_a = {}, _a[+"foo"] = function (y) { return y.length; }, _a[+"bar"] = function (y) { return y.length; }, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js index b17f91be38b..0c319a526f4 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js @@ -13,6 +13,5 @@ var o: I = { var o = (_a = {}, _a["" + "foo"] = "", _a["" + "bar"] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js index c7a728e5ef8..51d78be59d4 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js @@ -13,6 +13,5 @@ var o: I = { var o = (_a = {}, _a[+"foo"] = "", _a[+"bar"] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js index c97b7c5b1f8..c6ef45d7fab 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js @@ -21,6 +21,5 @@ foo((_a = { _a["hi" + "bye"] = true, _a[0 + 1] = 0, _a[+"hi"] = [0], - _a -)); + _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js index 9ca7e826aa7..9caf5f2aebf 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js @@ -21,6 +21,5 @@ foo((_a = { _a["hi" + "bye"] = true, _a[0 + 1] = 0, _a[+"hi"] = [0], - _a -)); + _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js index 419ea906550..24f6218864c 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js @@ -13,6 +13,5 @@ var o: I = { var o = (_a = {}, _a["" + "foo"] = "", _a["" + "bar"] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js index d3beb8b8deb..340802da2af 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js @@ -13,6 +13,5 @@ var o: I = { var o = (_a = {}, _a[+"foo"] = "", _a[+"bar"] = 0, - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js index e77eb79dc70..c903b864829 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js @@ -20,8 +20,7 @@ var v = (_a = {}, enumerable: true, configurable: true }), - _a -); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js index 39e393c46cc..972aaf9b52f 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js @@ -10,7 +10,6 @@ var v = (_a = {}, _a["hello"] = function () { debugger; }, - _a -); + _a); var _a; //# sourceMappingURL=computedPropertyNamesSourceMap2_ES5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map index baf1e998efd..bdc21497651 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map @@ -1,2 +1,2 @@ //// [computedPropertyNamesSourceMap2_ES5.js.map] -{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,GAAC,OAAO,CAAC,GAAT;QACI,QAAQ,CAAC;IACb,CAAC;;CACJ,CAAA"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG;IACJ,GAAC,OAAO,CAAC,GAAT;QACI,QAAQ,CAAC;IACb,CAAC;OACJ,CAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt index f6501777985..0535196f923 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt @@ -56,23 +56,21 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts >>> }, 1 >^^^^ 2 > ^ -3 > ^^-> +3 > ^^^^-> 1 > > 2 > } 1 >Emitted(4, 5) Source(4, 5) + SourceIndex(0) 2 >Emitted(4, 6) Source(4, 6) + SourceIndex(0) --- ->>> _a ->>>); -1->^ -2 > ^ -3 > ^^^^^^-> +>>> _a); +1->^^^^^^^ +2 > ^ 1-> >} -2 > -1->Emitted(6, 2) Source(5, 2) + SourceIndex(0) -2 >Emitted(6, 3) Source(5, 2) + SourceIndex(0) +2 > +1->Emitted(5, 8) Source(5, 2) + SourceIndex(0) +2 >Emitted(5, 9) Source(5, 2) + SourceIndex(0) --- >>>var _a; >>>//# sourceMappingURL=computedPropertyNamesSourceMap2_ES5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.js b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.js index 11081be4fb3..2c8efdd424a 100644 --- a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.js +++ b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.js @@ -61,28 +61,32 @@ function getFoo1() { }()); } function getFoo2() { - return (function () { - function class_2() { - } - class_2.method1 = function (arg) { + return (_a = (function () { + function class_2() { + } + return class_2; + }()), + _a.method1 = function (arg) { arg.numProp = 10; - }; - class_2.method2 = function (arg) { + }, + _a.method2 = function (arg) { arg.strProp = "hello"; - }; - return class_2; - }()); + }, + _a); + var _a; } function getFoo3() { - return (function () { - function class_3() { - } - class_3.method1 = function (arg) { + return (_a = (function () { + function class_3() { + } + return class_3; + }()), + _a.method1 = function (arg) { arg.numProp = 10; - }; - class_3.method2 = function (arg) { + }, + _a.method2 = function (arg) { arg.strProp = "hello"; - }; - return class_3; - }()); + }, + _a); + var _a; } diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index 30cd85444cf..fb24bea7660 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -40,10 +40,10 @@ var C = (function () { enumerable: true, configurable: true }); - C.x = 1; - C.y = 1; return C; }()); +C.x = 1; +C.y = 1; //// [declFilePrivateStatic.d.ts] diff --git a/tests/baselines/reference/decoratorCallGeneric.js b/tests/baselines/reference/decoratorCallGeneric.js index acc9c48297d..a1d470b7063 100644 --- a/tests/baselines/reference/decoratorCallGeneric.js +++ b/tests/baselines/reference/decoratorCallGeneric.js @@ -24,8 +24,8 @@ var C = (function () { function C() { } C.m = function () { }; - C = __decorate([ - dec - ], C); return C; }()); +C = __decorate([ + dec +], C); diff --git a/tests/baselines/reference/decoratorChecksFunctionBodies.js b/tests/baselines/reference/decoratorChecksFunctionBodies.js index d70c4a33460..68dbe6bd1ef 100644 --- a/tests/baselines/reference/decoratorChecksFunctionBodies.js +++ b/tests/baselines/reference/decoratorChecksFunctionBodies.js @@ -30,12 +30,12 @@ var A = (function () { } A.prototype.m = function () { }; - __decorate([ - (function (x, p) { - var a = 3; - func(a); - return x; - }) - ], A.prototype, "m", null); return A; }()); +__decorate([ + (function (x, p) { + var a = 3; + func(a); + return x; + }) +], A.prototype, "m", null); diff --git a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js index 92dcc1f836c..28b620a3e8c 100644 --- a/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js +++ b/tests/baselines/reference/decoratorInstantiateModulesInFunctionBodies.js @@ -45,8 +45,8 @@ var Wat = (function () { Wat.whatever = function () { // ... }; - __decorate([ - filter(function () { return a_1.test == 'abc'; }) - ], Wat, "whatever", null); return Wat; }()); +__decorate([ + filter(function () { return a_1.test == 'abc'; }) +], Wat, "whatever", null); diff --git a/tests/baselines/reference/decoratorMetadata.js b/tests/baselines/reference/decoratorMetadata.js index 2f360df0618..d95658c7f18 100644 --- a/tests/baselines/reference/decoratorMetadata.js +++ b/tests/baselines/reference/decoratorMetadata.js @@ -45,15 +45,15 @@ var MyComponent = (function () { } MyComponent.prototype.method = function (x) { }; - __decorate([ - decorator, - __metadata('design:type', Function), - __metadata('design:paramtypes', [Object]), - __metadata('design:returntype', void 0) - ], MyComponent.prototype, "method", null); - MyComponent = __decorate([ - decorator, - __metadata('design:paramtypes', [service_1.default]) - ], MyComponent); return MyComponent; }()); +__decorate([ + decorator, + __metadata('design:type', Function), + __metadata('design:paramtypes', [Object]), + __metadata('design:returntype', void 0) +], MyComponent.prototype, "method", null); +MyComponent = __decorate([ + decorator, + __metadata('design:paramtypes', [service_1.default]) +], MyComponent); diff --git a/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js b/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js index f5048ead631..e5127987d53 100644 --- a/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js +++ b/tests/baselines/reference/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js @@ -20,11 +20,11 @@ var MyClass = (function () { } MyClass.prototype.doSomething = function () { }; - __decorate([ - decorator, - __metadata('design:type', Function), - __metadata('design:paramtypes', []), - __metadata('design:returntype', void 0) - ], MyClass.prototype, "doSomething", null); return MyClass; }()); +__decorate([ + decorator, + __metadata('design:type', Function), + __metadata('design:paramtypes', []), + __metadata('design:returntype', void 0) +], MyClass.prototype, "doSomething", null); diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType.js b/tests/baselines/reference/decoratorMetadataOnInferredType.js index 5a39a6ce42c..47b6c45e806 100644 --- a/tests/baselines/reference/decoratorMetadataOnInferredType.js +++ b/tests/baselines/reference/decoratorMetadataOnInferredType.js @@ -31,10 +31,10 @@ var B = (function () { function B() { this.x = new A(); } - __decorate([ - decorator, - __metadata('design:type', Object) - ], B.prototype, "x", void 0); return B; }()); +__decorate([ + decorator, + __metadata('design:type', Object) +], B.prototype, "x", void 0); exports.B = B; diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType.js b/tests/baselines/reference/decoratorMetadataWithConstructorType.js index 39e8d1811aa..0559e62754c 100644 --- a/tests/baselines/reference/decoratorMetadataWithConstructorType.js +++ b/tests/baselines/reference/decoratorMetadataWithConstructorType.js @@ -31,10 +31,10 @@ var B = (function () { function B() { this.x = new A(); } - __decorate([ - decorator, - __metadata('design:type', A) - ], B.prototype, "x", void 0); return B; }()); +__decorate([ + decorator, + __metadata('design:type', A) +], B.prototype, "x", void 0); exports.B = B; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js index b549d28c7f1..a0bc68bd8d8 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision.js @@ -44,10 +44,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [db_1.db]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [db_1.db]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js index acd86e78d76..49a2983ce70 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision2.js @@ -44,10 +44,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [db_1.db]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [db_1.db]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js index 2acd829c107..f3c1d1b5da5 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision3.js @@ -44,10 +44,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [db.db]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [db.db]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js index 4af0beeddcb..3448352eaaf 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.js @@ -44,10 +44,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [Object]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [Object]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js index f1537e3b447..8eae92ec4d1 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision5.js @@ -45,10 +45,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [db_1.default]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [db_1.default]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js index 7ef2c288810..26e714c16a1 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision6.js @@ -45,10 +45,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [db_1.default]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [db_1.default]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js index f8469cdd6a4..1d3b8a92349 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision7.js @@ -45,10 +45,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [Object]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [Object]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js index f1885ccfaec..910008b9c27 100644 --- a/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js +++ b/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision8.js @@ -44,10 +44,10 @@ var MyClass = (function () { this.db = db; this.db.doSomething(); } - MyClass = __decorate([ - someDecorator, - __metadata('design:paramtypes', [database.db]) - ], MyClass); return MyClass; }()); +MyClass = __decorate([ + someDecorator, + __metadata('design:paramtypes', [database.db]) +], MyClass); exports.MyClass = MyClass; diff --git a/tests/baselines/reference/decoratorOnClass1.js b/tests/baselines/reference/decoratorOnClass1.js index 7ea46b4698f..5cff4c2649c 100644 --- a/tests/baselines/reference/decoratorOnClass1.js +++ b/tests/baselines/reference/decoratorOnClass1.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - C = __decorate([ - dec - ], C); return C; }()); +C = __decorate([ + dec +], C); diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index 3f24c7ae55b..4d9c2007ad0 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -16,9 +16,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - C = __decorate([ - dec - ], C); return C; }()); +C = __decorate([ + dec +], C); exports.C = C; diff --git a/tests/baselines/reference/decoratorOnClass3.js b/tests/baselines/reference/decoratorOnClass3.js index 5a3601fc1f3..fd09a6d8de5 100644 --- a/tests/baselines/reference/decoratorOnClass3.js +++ b/tests/baselines/reference/decoratorOnClass3.js @@ -16,8 +16,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - C = __decorate([ - dec - ], C); return C; }()); +C = __decorate([ + dec +], C); diff --git a/tests/baselines/reference/decoratorOnClass4.js b/tests/baselines/reference/decoratorOnClass4.js index adbe30db662..daf19e20327 100644 --- a/tests/baselines/reference/decoratorOnClass4.js +++ b/tests/baselines/reference/decoratorOnClass4.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - C = __decorate([ - dec() - ], C); return C; }()); +C = __decorate([ + dec() +], C); diff --git a/tests/baselines/reference/decoratorOnClass5.js b/tests/baselines/reference/decoratorOnClass5.js index 6741b26373b..70fc5515140 100644 --- a/tests/baselines/reference/decoratorOnClass5.js +++ b/tests/baselines/reference/decoratorOnClass5.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - C = __decorate([ - dec() - ], C); return C; }()); +C = __decorate([ + dec() +], C); diff --git a/tests/baselines/reference/decoratorOnClass8.js b/tests/baselines/reference/decoratorOnClass8.js index e5cd8812ea7..ae50ab75ab8 100644 --- a/tests/baselines/reference/decoratorOnClass8.js +++ b/tests/baselines/reference/decoratorOnClass8.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - C = __decorate([ - dec() - ], C); return C; }()); +C = __decorate([ + dec() +], C); diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index cf989705b79..27966350fae 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -20,8 +20,8 @@ var C = (function () { enumerable: true, configurable: true }); - __decorate([ - dec - ], C.prototype, "accessor", null); return C; }()); +__decorate([ + dec +], C.prototype, "accessor", null); diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index 9e9455b4380..57cb3b50461 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -20,8 +20,8 @@ var C = (function () { enumerable: true, configurable: true }); - __decorate([ - dec - ], C.prototype, "accessor", null); return C; }()); +__decorate([ + dec +], C.prototype, "accessor", null); diff --git a/tests/baselines/reference/decoratorOnClassAccessor3.js b/tests/baselines/reference/decoratorOnClassAccessor3.js index 8a27914e0c8..c02f984e70a 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor3.js +++ b/tests/baselines/reference/decoratorOnClassAccessor3.js @@ -20,8 +20,8 @@ var C = (function () { enumerable: true, configurable: true }); - __decorate([ - dec - ], C.prototype, "accessor", null); return C; }()); +__decorate([ + dec +], C.prototype, "accessor", null); diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 85b35e95cef..0e0af58f526 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -20,8 +20,8 @@ var C = (function () { enumerable: true, configurable: true }); - __decorate([ - dec - ], C.prototype, "accessor", null); return C; }()); +__decorate([ + dec +], C.prototype, "accessor", null); diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index 12ec7a08adc..c7d5d109cc0 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -20,8 +20,8 @@ var C = (function () { enumerable: true, configurable: true }); - __decorate([ - dec - ], C.prototype, "accessor", null); return C; }()); +__decorate([ + dec +], C.prototype, "accessor", null); diff --git a/tests/baselines/reference/decoratorOnClassAccessor6.js b/tests/baselines/reference/decoratorOnClassAccessor6.js index d5477deb5af..8ac40e72299 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor6.js +++ b/tests/baselines/reference/decoratorOnClassAccessor6.js @@ -20,8 +20,8 @@ var C = (function () { enumerable: true, configurable: true }); - __decorate([ - dec - ], C.prototype, "accessor", null); return C; }()); +__decorate([ + dec +], C.prototype, "accessor", null); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js index fe04f569e30..176e2309ae0 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js @@ -18,8 +18,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { var C = (function () { function C(p) { } - C = __decorate([ - __param(0, dec) - ], C); return C; }()); +C = __decorate([ + __param(0, dec) +], C); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js index 8d02bd467d6..e14f0358808 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js @@ -18,8 +18,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) { var C = (function () { function C(public, p) { } - C = __decorate([ - __param(1, dec) - ], C); return C; }()); +C = __decorate([ + __param(1, dec) +], C); diff --git a/tests/baselines/reference/decoratorOnClassMethod1.js b/tests/baselines/reference/decoratorOnClassMethod1.js index ef029b84543..b93d7f88771 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.js @@ -16,8 +16,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassMethod10.js b/tests/baselines/reference/decoratorOnClassMethod10.js index f90251d6196..bfa57f0aeb7 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.js +++ b/tests/baselines/reference/decoratorOnClassMethod10.js @@ -16,8 +16,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassMethod11.js b/tests/baselines/reference/decoratorOnClassMethod11.js index f1589a39286..c703459b88d 100644 --- a/tests/baselines/reference/decoratorOnClassMethod11.js +++ b/tests/baselines/reference/decoratorOnClassMethod11.js @@ -22,9 +22,9 @@ var M; } C.prototype.decorator = function (target, key) { }; C.prototype.method = function () { }; - __decorate([ - this.decorator - ], C.prototype, "method", null); return C; }()); + __decorate([ + this.decorator + ], C.prototype, "method", null); })(M || (M = {})); diff --git a/tests/baselines/reference/decoratorOnClassMethod12.js b/tests/baselines/reference/decoratorOnClassMethod12.js index 0650f1d00ee..6e9b9763a3a 100644 --- a/tests/baselines/reference/decoratorOnClassMethod12.js +++ b/tests/baselines/reference/decoratorOnClassMethod12.js @@ -35,9 +35,9 @@ var M; _super.apply(this, arguments); } C.prototype.method = function () { }; - __decorate([ - _super.decorator - ], C.prototype, "method", null); return C; }(S)); + __decorate([ + _super.decorator + ], C.prototype, "method", null); })(M || (M = {})); diff --git a/tests/baselines/reference/decoratorOnClassMethod2.js b/tests/baselines/reference/decoratorOnClassMethod2.js index 5db2922ed71..98ad8ad43ad 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.js +++ b/tests/baselines/reference/decoratorOnClassMethod2.js @@ -16,8 +16,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassMethod3.js b/tests/baselines/reference/decoratorOnClassMethod3.js index 30f527368f2..4a5943681d4 100644 --- a/tests/baselines/reference/decoratorOnClassMethod3.js +++ b/tests/baselines/reference/decoratorOnClassMethod3.js @@ -16,8 +16,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassMethod8.js b/tests/baselines/reference/decoratorOnClassMethod8.js index bf8c06d9b90..c1ad826cab0 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.js +++ b/tests/baselines/reference/decoratorOnClassMethod8.js @@ -16,8 +16,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassMethodOverload2.js b/tests/baselines/reference/decoratorOnClassMethodOverload2.js index eafa5da7110..db077dd7b51 100644 --- a/tests/baselines/reference/decoratorOnClassMethodOverload2.js +++ b/tests/baselines/reference/decoratorOnClassMethodOverload2.js @@ -18,8 +18,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.js index efb1e4abff2..d5d8599d7a8 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.js @@ -19,8 +19,8 @@ var C = (function () { function C() { } C.prototype.method = function (p) { }; - __decorate([ - __param(0, dec) - ], C.prototype, "method", null); return C; }()); +__decorate([ + __param(0, dec) +], C.prototype, "method", null); diff --git a/tests/baselines/reference/decoratorOnClassProperty1.js b/tests/baselines/reference/decoratorOnClassProperty1.js index 65a399332f1..6547e0bdb18 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/decoratorOnClassProperty10.js b/tests/baselines/reference/decoratorOnClassProperty10.js index 9df40eaf83a..174f26a315a 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10.js +++ b/tests/baselines/reference/decoratorOnClassProperty10.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec() - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec() +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/decoratorOnClassProperty11.js b/tests/baselines/reference/decoratorOnClassProperty11.js index 8b771caf8b5..c901637402d 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.js +++ b/tests/baselines/reference/decoratorOnClassProperty11.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/decoratorOnClassProperty2.js b/tests/baselines/reference/decoratorOnClassProperty2.js index 3ab2b515e3c..ceaf43caa59 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2.js +++ b/tests/baselines/reference/decoratorOnClassProperty2.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/decoratorOnClassProperty3.js b/tests/baselines/reference/decoratorOnClassProperty3.js index 9c0d3f90e42..8436be93968 100644 --- a/tests/baselines/reference/decoratorOnClassProperty3.js +++ b/tests/baselines/reference/decoratorOnClassProperty3.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/decoratorOnClassProperty6.js b/tests/baselines/reference/decoratorOnClassProperty6.js index 823a652af24..c7f5490c648 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6.js +++ b/tests/baselines/reference/decoratorOnClassProperty6.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/decoratorOnClassProperty7.js b/tests/baselines/reference/decoratorOnClassProperty7.js index 134f35022e0..828d548ff6b 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7.js +++ b/tests/baselines/reference/decoratorOnClassProperty7.js @@ -15,8 +15,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var C = (function () { function C() { } - __decorate([ - dec - ], C.prototype, "prop", void 0); return C; }()); +__decorate([ + dec +], C.prototype, "prop", void 0); diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index e043ee8a5c5..50408d3bee7 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -77,6 +77,6 @@ var Derived = (function (_super) { enumerable: true, configurable: true }); - Derived.a = _super.call(this); return Derived; }(Base)); +Derived.a = _super.call(this); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 4cc6a4d968f..097b16b3024 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -119,10 +119,10 @@ var NoBase = (function () { enumerable: true, configurable: true }); - //super call in static class member initializer with no base type - NoBase.k = _super.call(this); return NoBase; }()); +//super call in static class member initializer with no base type +NoBase.k = _super.call(this); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index cf6ed2598ea..dbfbdb46940 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -175,10 +175,10 @@ var SomeBase = (function () { SomeBase.prototype.publicFunc = function () { }; SomeBase.privateStaticFunc = function () { }; SomeBase.publicStaticFunc = function () { }; - SomeBase.privateStaticMember = 0; - SomeBase.publicStaticMember = 0; return SomeBase; }()); +SomeBase.privateStaticMember = 0; +SomeBase.publicStaticMember = 0; //super.publicInstanceMemberNotFunction in constructor of derived class //super.publicInstanceMemberNotFunction in instance member function of derived class //super.publicInstanceMemberNotFunction in instance member accessor(get and set) of derived class diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.js b/tests/baselines/reference/es3defaultAliasIsQuoted.js index ac6a0bd24da..89fd0c47a7e 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.js +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.js @@ -19,9 +19,9 @@ assert(Foo.CONSTANT === "Foo"); var Foo = (function () { function Foo() { } - Foo.CONSTANT = "Foo"; return Foo; }()); +Foo.CONSTANT = "Foo"; exports.Foo = Foo; function assert(value) { if (!value) diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 365e91321a4..a722cce1670 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -113,9 +113,9 @@ var Foo = (function (_super) { } Foo.prototype.bar = function () { return 0; }; Foo.prototype.boo = function (x) { return x; }; - Foo.statVal = 0; return Foo; }(Bar)); +Foo.statVal = 0; var f = new Foo(); //class GetSetMonster { // // attack(target) { diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 86ff00121cf..1881e6b8c87 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -283,9 +283,9 @@ var Statics = (function () { Statics.baz = function () { return ""; }; - Statics.foo = 1; return Statics; }()); +Statics.foo = 1; var stat = new Statics(); var ImplementsInterface = (function () { function ImplementsInterface() { diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 8093c8bec41..e5488121d34 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -612,219 +612,219 @@ var x48 = (function () { var x49 = (function () { function x49() { } - x49.member = function () { return [d1, d2]; }; return x49; }()); +x49.member = function () { return [d1, d2]; }; var x50 = (function () { function x50() { } - x50.member = function () { return [d1, d2]; }; return x50; }()); +x50.member = function () { return [d1, d2]; }; var x51 = (function () { function x51() { } - x51.member = function named() { return [d1, d2]; }; return x51; }()); +x51.member = function named() { return [d1, d2]; }; var x52 = (function () { function x52() { } - x52.member = function () { return [d1, d2]; }; return x52; }()); +x52.member = function () { return [d1, d2]; }; var x53 = (function () { function x53() { } - x53.member = function () { return [d1, d2]; }; return x53; }()); +x53.member = function () { return [d1, d2]; }; var x54 = (function () { function x54() { } - x54.member = function named() { return [d1, d2]; }; return x54; }()); +x54.member = function named() { return [d1, d2]; }; var x55 = (function () { function x55() { } - x55.member = [d1, d2]; return x55; }()); +x55.member = [d1, d2]; var x56 = (function () { function x56() { } - x56.member = [d1, d2]; return x56; }()); +x56.member = [d1, d2]; var x57 = (function () { function x57() { } - x57.member = [d1, d2]; return x57; }()); +x57.member = [d1, d2]; var x58 = (function () { function x58() { } - x58.member = { n: [d1, d2] }; return x58; }()); +x58.member = { n: [d1, d2] }; var x59 = (function () { function x59() { } - x59.member = function (n) { var n; return null; }; return x59; }()); +x59.member = function (n) { var n; return null; }; var x60 = (function () { function x60() { } - x60.member = { func: function (n) { return [d1, d2]; } }; return x60; }()); +x60.member = { func: function (n) { return [d1, d2]; } }; var x61 = (function () { function x61() { } - x61.member = function () { return [d1, d2]; }; return x61; }()); +x61.member = function () { return [d1, d2]; }; var x62 = (function () { function x62() { } - x62.member = function () { return [d1, d2]; }; return x62; }()); +x62.member = function () { return [d1, d2]; }; var x63 = (function () { function x63() { } - x63.member = function named() { return [d1, d2]; }; return x63; }()); +x63.member = function named() { return [d1, d2]; }; var x64 = (function () { function x64() { } - x64.member = function () { return [d1, d2]; }; return x64; }()); +x64.member = function () { return [d1, d2]; }; var x65 = (function () { function x65() { } - x65.member = function () { return [d1, d2]; }; return x65; }()); +x65.member = function () { return [d1, d2]; }; var x66 = (function () { function x66() { } - x66.member = function named() { return [d1, d2]; }; return x66; }()); +x66.member = function named() { return [d1, d2]; }; var x67 = (function () { function x67() { } - x67.member = [d1, d2]; return x67; }()); +x67.member = [d1, d2]; var x68 = (function () { function x68() { } - x68.member = [d1, d2]; return x68; }()); +x68.member = [d1, d2]; var x69 = (function () { function x69() { } - x69.member = [d1, d2]; return x69; }()); +x69.member = [d1, d2]; var x70 = (function () { function x70() { } - x70.member = { n: [d1, d2] }; return x70; }()); +x70.member = { n: [d1, d2] }; var x71 = (function () { function x71() { } - x71.member = function (n) { var n; return null; }; return x71; }()); +x71.member = function (n) { var n; return null; }; var x72 = (function () { function x72() { } - x72.member = { func: function (n) { return [d1, d2]; } }; return x72; }()); +x72.member = { func: function (n) { return [d1, d2]; } }; var x73 = (function () { function x73() { } - x73.member = function () { return [d1, d2]; }; return x73; }()); +x73.member = function () { return [d1, d2]; }; var x74 = (function () { function x74() { } - x74.member = function () { return [d1, d2]; }; return x74; }()); +x74.member = function () { return [d1, d2]; }; var x75 = (function () { function x75() { } - x75.member = function named() { return [d1, d2]; }; return x75; }()); +x75.member = function named() { return [d1, d2]; }; var x76 = (function () { function x76() { } - x76.member = function () { return [d1, d2]; }; return x76; }()); +x76.member = function () { return [d1, d2]; }; var x77 = (function () { function x77() { } - x77.member = function () { return [d1, d2]; }; return x77; }()); +x77.member = function () { return [d1, d2]; }; var x78 = (function () { function x78() { } - x78.member = function named() { return [d1, d2]; }; return x78; }()); +x78.member = function named() { return [d1, d2]; }; var x79 = (function () { function x79() { } - x79.member = [d1, d2]; return x79; }()); +x79.member = [d1, d2]; var x80 = (function () { function x80() { } - x80.member = [d1, d2]; return x80; }()); +x80.member = [d1, d2]; var x81 = (function () { function x81() { } - x81.member = [d1, d2]; return x81; }()); +x81.member = [d1, d2]; var x82 = (function () { function x82() { } - x82.member = { n: [d1, d2] }; return x82; }()); +x82.member = { n: [d1, d2] }; var x83 = (function () { function x83() { } - x83.member = function (n) { var n; return null; }; return x83; }()); +x83.member = function (n) { var n; return null; }; var x84 = (function () { function x84() { } - x84.member = { func: function (n) { return [d1, d2]; } }; return x84; }()); +x84.member = { func: function (n) { return [d1, d2]; } }; var x85 = (function () { function x85(parm) { if (parm === void 0) { parm = function () { return [d1, d2]; }; } diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js index 2039e459572..053fa785ee0 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js @@ -25,9 +25,9 @@ var Foo = (function () { Foo.f = function (xs) { return xs.reverse(); }; - Foo.a = function (n) { }; - Foo.c = []; - Foo.d = false || (function (x) { return x || undefined; })(null); - Foo.e = function (x) { return null; }; return Foo; }()); +Foo.a = function (n) { }; +Foo.c = []; +Foo.d = false || (function (x) { return x || undefined; })(null); +Foo.e = function (x) { return null; }; diff --git a/tests/baselines/reference/gettersAndSetters.js b/tests/baselines/reference/gettersAndSetters.js index 16d66c7dc71..265a1210b16 100644 --- a/tests/baselines/reference/gettersAndSetters.js +++ b/tests/baselines/reference/gettersAndSetters.js @@ -65,9 +65,9 @@ var C = (function () { enumerable: true, configurable: true }); - C.barBack = ""; return C; }()); +C.barBack = ""; var c = new C(); var foo = c.Foo; c.Foo = "foov"; diff --git a/tests/baselines/reference/importImportOnlyModule.js b/tests/baselines/reference/importImportOnlyModule.js index 7b41e4400c5..013999321f9 100644 --- a/tests/baselines/reference/importImportOnlyModule.js +++ b/tests/baselines/reference/importImportOnlyModule.js @@ -22,9 +22,9 @@ define(["require", "exports"], function (require, exports) { function C1() { this.m1 = 42; } - C1.s1 = true; return C1; }()); + C1.s1 = true; exports.C1 = C1; }); //// [foo_1.js] diff --git a/tests/baselines/reference/instanceAndStaticDeclarations1.js b/tests/baselines/reference/instanceAndStaticDeclarations1.js index 093e9c15cc8..bf9b6963bb2 100644 --- a/tests/baselines/reference/instanceAndStaticDeclarations1.js +++ b/tests/baselines/reference/instanceAndStaticDeclarations1.js @@ -25,6 +25,6 @@ var Point = (function () { return Math.sqrt(dx * dx + dy * dy); }; Point.distance = function (p1, p2) { return p1.distance(p2); }; - Point.origin = new Point(0, 0); return Point; }()); +Point.origin = new Point(0, 0); diff --git a/tests/baselines/reference/invalidStaticField.js b/tests/baselines/reference/invalidStaticField.js index dc582e830c7..08a06d5ee27 100644 --- a/tests/baselines/reference/invalidStaticField.js +++ b/tests/baselines/reference/invalidStaticField.js @@ -12,6 +12,6 @@ var A = (function () { var B = (function () { function B() { } - B.NOT_NULL = new B(); return B; }()); +B.NOT_NULL = new B(); diff --git a/tests/baselines/reference/literalsInComputedProperties1.js b/tests/baselines/reference/literalsInComputedProperties1.js index 82a6367e5d2..4c28a5e9083 100644 --- a/tests/baselines/reference/literalsInComputedProperties1.js +++ b/tests/baselines/reference/literalsInComputedProperties1.js @@ -58,8 +58,7 @@ var x = (_a = { _a[2] = 1, _a["3"] = 1, _a["4"] = 1, - _a -); + _a); x[1].toExponential(); x[2].toExponential(); x[3].toExponential(); diff --git a/tests/baselines/reference/missingDecoratorType.js b/tests/baselines/reference/missingDecoratorType.js index 7356be39798..1dcbb3febc5 100644 --- a/tests/baselines/reference/missingDecoratorType.js +++ b/tests/baselines/reference/missingDecoratorType.js @@ -33,8 +33,8 @@ var C = (function () { function C() { } C.prototype.method = function () { }; - __decorate([ - dec - ], C.prototype, "method", null); return C; }()); +__decorate([ + dec +], C.prototype, "method", null); diff --git a/tests/baselines/reference/modifierOnClassExpressionMemberInFunction.js b/tests/baselines/reference/modifierOnClassExpressionMemberInFunction.js index 70eea5b2c5c..211c80bcce8 100644 --- a/tests/baselines/reference/modifierOnClassExpressionMemberInFunction.js +++ b/tests/baselines/reference/modifierOnClassExpressionMemberInFunction.js @@ -10,14 +10,16 @@ function g() { //// [modifierOnClassExpressionMemberInFunction.js] function g() { - var x = (function () { - function C() { - this.prop1 = 1; - } - C.prototype.foo = function () { }; - C.prop2 = 43; - return C; - }()); + var x = (_a = (function () { + function C() { + this.prop1 = 1; + } + C.prototype.foo = function () { }; + return C; + }()), + _a.prop2 = 43, + _a); + var _a; } diff --git a/tests/baselines/reference/noEmitHelpers2.js b/tests/baselines/reference/noEmitHelpers2.js index f3bbfe54896..fc4baf334c3 100644 --- a/tests/baselines/reference/noEmitHelpers2.js +++ b/tests/baselines/reference/noEmitHelpers2.js @@ -12,10 +12,10 @@ class A { var A = (function () { function A(a, b) { } - A = __decorate([ - decorator, - __param(1, decorator), - __metadata('design:paramtypes', [Number, String]) - ], A); return A; }()); +A = __decorate([ + decorator, + __param(1, decorator), + __metadata('design:paramtypes', [Number, String]) +], A); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic3.js b/tests/baselines/reference/parserAccessibilityAfterStatic3.js index 7a9ae06e439..38202bc5dc8 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic3.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic3.js @@ -9,6 +9,6 @@ static public = 1; var Outer = (function () { function Outer() { } - Outer.public = 1; return Outer; }()); +Outer.public = 1; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js index 9bb4395e556..57d0536e975 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js @@ -41,10 +41,10 @@ var Shapes; } // Instance member Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; - // Static member - Point.origin = new Point(0, 0); return Point; }()); + // Static member + Point.origin = new Point(0, 0); Shapes.Point = Point; })(Shapes || (Shapes = {})); // Local variables diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js index 0ee73b8b1e5..2bb08a14e35 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js @@ -42,10 +42,10 @@ var Shapes; } // Instance member Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; - // Static member - Point.origin = new Point(0, 0); return Point; }()); + // Static member + Point.origin = new Point(0, 0); Shapes.Point = Point; })(Shapes || (Shapes = {})); // Local variables diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 6b38a8c9e4c..1a525c49d19 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2371,11 +2371,11 @@ var Harness; errorHandlerStack[errorHandlerStack.length - 1](e); } }; - // The current stack of Runnable objects - Runnable.currentStack = []; - Runnable.errorHandlerStack = []; return Runnable; }()); + // The current stack of Runnable objects + Runnable.currentStack = []; + Runnable.errorHandlerStack = []; Harness.Runnable = Runnable; var TestCase = (function (_super) { __extends(TestCase, _super); diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index 6c2dcf304cf..c139b6279fd 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -159,12 +159,12 @@ var publicClassWithWithPrivatePropertyTypes = (function () { this.myPublicProperty1 = exporter.createExportedWidget3(); // Error this.myPrivateProperty1 = exporter.createExportedWidget3(); } - publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); // Error - publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1(); - publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error - publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3(); return publicClassWithWithPrivatePropertyTypes; }()); +publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); // Error +publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1(); +publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error +publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3(); exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes; var privateClassWithWithPrivatePropertyTypes = (function () { function privateClassWithWithPrivatePropertyTypes() { @@ -173,12 +173,12 @@ var privateClassWithWithPrivatePropertyTypes = (function () { this.myPublicProperty1 = exporter.createExportedWidget3(); this.myPrivateProperty1 = exporter.createExportedWidget3(); } - privateClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); - privateClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1(); - privateClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); - privateClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3(); return privateClassWithWithPrivatePropertyTypes; }()); +privateClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); +privateClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1(); +privateClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); +privateClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3(); exports.publicVarWithPrivatePropertyTypes = exporter.createExportedWidget1(); // Error var privateVarWithPrivatePropertyTypes = exporter.createExportedWidget1(); exports.publicVarWithPrivatePropertyTypes1 = exporter.createExportedWidget3(); // Error @@ -188,10 +188,10 @@ var publicClassWithPrivateModulePropertyTypes = (function () { this.myPublicProperty = exporter.createExportedWidget2(); // Error this.myPublicProperty1 = exporter.createExportedWidget4(); // Error } - publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); // Error - publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error return publicClassWithPrivateModulePropertyTypes; }()); +publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); // Error +publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes; exports.publicVarWithPrivateModulePropertyTypes = exporter.createExportedWidget2(); // Error exports.publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error @@ -200,10 +200,10 @@ var privateClassWithPrivateModulePropertyTypes = (function () { this.myPublicProperty = exporter.createExportedWidget2(); this.myPublicProperty1 = exporter.createExportedWidget4(); } - privateClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); - privateClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); return privateClassWithPrivateModulePropertyTypes; }()); +privateClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); +privateClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); var privateVarWithPrivateModulePropertyTypes = exporter.createExportedWidget2(); var privateVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); diff --git a/tests/baselines/reference/privateIndexer2.js b/tests/baselines/reference/privateIndexer2.js index 1268c6e4c25..a90e03a5bc2 100644 --- a/tests/baselines/reference/privateIndexer2.js +++ b/tests/baselines/reference/privateIndexer2.js @@ -14,7 +14,6 @@ var y: { var x = (_a = {}, _a[x] = string, _a.string = , - _a -); + _a); var y; var _a; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 2074e5aa864..352256ac9bd 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -25,6 +25,6 @@ var Derived = (function (_super) { _super.apply(this, arguments); this.bing = function () { return Base.foo; }; // error } - Derived.bar = Base.foo; // error return Derived; }(Base)); +Derived.bar = Base.foo; // error diff --git a/tests/baselines/reference/propertyAccessibility2.js b/tests/baselines/reference/propertyAccessibility2.js index afce6c4c24a..3618b86fcc5 100644 --- a/tests/baselines/reference/propertyAccessibility2.js +++ b/tests/baselines/reference/propertyAccessibility2.js @@ -9,7 +9,7 @@ var c = C.x; var C = (function () { function C() { } - C.x = 1; return C; }()); +C.x = 1; var c = C.x; diff --git a/tests/baselines/reference/quotedPropertyName2.js b/tests/baselines/reference/quotedPropertyName2.js index 1c4d85076ea..550e5299702 100644 --- a/tests/baselines/reference/quotedPropertyName2.js +++ b/tests/baselines/reference/quotedPropertyName2.js @@ -7,6 +7,6 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1["prop1"] = 0; return Test1; }()); +Test1["prop1"] = 0; diff --git a/tests/baselines/reference/reassignStaticProp.js b/tests/baselines/reference/reassignStaticProp.js index 2bf2bafa128..d9c37c29ad5 100644 --- a/tests/baselines/reference/reassignStaticProp.js +++ b/tests/baselines/reference/reassignStaticProp.js @@ -15,6 +15,6 @@ class foo { var foo = (function () { function foo() { } - foo.bar = 1; return foo; }()); +foo.bar = 1; diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js b/tests/baselines/reference/sourceMap-FileWithComments.js index 9bb18dba33d..dd2131889af 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.js +++ b/tests/baselines/reference/sourceMap-FileWithComments.js @@ -49,10 +49,10 @@ var Shapes; } // Instance member Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; - // Static member - Point.origin = new Point(0, 0); return Point; }()); + // Static member + Point.origin = new Point(0, 0); Shapes.Point = Point; // Variable comment after class var a = 10; diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js.map b/tests/baselines/reference/sourceMap-FileWithComments.js.map index f3e9674336d..80437501d33 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.js.map +++ b/tests/baselines/reference/sourceMap-FileWithComments.js.map @@ -1,2 +1,2 @@ //// [sourceMap-FileWithComments.js.map] -{"version":3,"file":"sourceMap-FileWithComments.js","sourceRoot":"","sources":["sourceMap-FileWithComments.ts"],"names":[],"mappings":"AAMA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAEX,QAAQ;IACR;QACI,cAAc;QACd,eAAmB,CAAS,EAAS,CAAS;YAA3B,MAAC,GAAD,CAAC,CAAQ;YAAS,MAAC,GAAD,CAAC,CAAQ;QAAI,CAAC;QAEnD,kBAAkB;QAClB,uBAAO,GAAP,cAAY,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAElE,gBAAgB;QACT,YAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,YAAC;IAAD,CAAC,AATD,IASC;IATY,YAAK,QASjB,CAAA;IAED,+BAA+B;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;IAEX;IACA,CAAC;IADe,UAAG,MAClB,CAAA;IAED;;MAEE;IACF,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAED,qBAAqB;AACrB,IAAI,CAAC,GAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMap-FileWithComments.js","sourceRoot":"","sources":["sourceMap-FileWithComments.ts"],"names":[],"mappings":"AAMA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAEX,QAAQ;IACR;QACI,cAAc;QACd,eAAmB,CAAS,EAAS,CAAS;YAA3B,MAAC,GAAD,CAAC,CAAQ;YAAS,MAAC,GAAD,CAAC,CAAQ;QAAI,CAAC;QAEnD,kBAAkB;QAClB,uBAAO,GAAP,cAAY,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAItE,YAAC;IAAD,CAAC,AATD;IAOI,gBAAgB;IACT,YAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAClC;IATY,YAAK,QASjB,CAAA;IAED,+BAA+B;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;IAEX;IACA,CAAC;IADe,UAAG,MAClB,CAAA;IAED;;MAEE;IACF,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAED,qBAAqB;AACrB,IAAI,CAAC,GAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt index 3bcf2634507..2abfabff566 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt @@ -271,93 +271,90 @@ sourceFile:sourceMap-FileWithComments.ts 28>Emitted(12, 102) Source(16, 74) + SourceIndex(0) 29>Emitted(12, 103) Source(16, 75) + SourceIndex(0) --- ->>> // Static member -1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^-> -1 > - > - > -2 > // Static member -1 >Emitted(13, 9) Source(18, 9) + SourceIndex(0) -2 >Emitted(13, 25) Source(18, 25) + SourceIndex(0) ---- ->>> Point.origin = new Point(0, 0); -1->^^^^^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^ -4 > ^^^^ -5 > ^^^^^ -6 > ^ -7 > ^ -8 > ^^ -9 > ^ -10> ^ -11> ^ -1-> - > static -2 > origin -3 > = -4 > new -5 > Point -6 > ( -7 > 0 -8 > , -9 > 0 -10> ) -11> ; -1->Emitted(14, 9) Source(19, 16) + SourceIndex(0) -2 >Emitted(14, 21) Source(19, 22) + SourceIndex(0) -3 >Emitted(14, 24) Source(19, 25) + SourceIndex(0) -4 >Emitted(14, 28) Source(19, 29) + SourceIndex(0) -5 >Emitted(14, 33) Source(19, 34) + SourceIndex(0) -6 >Emitted(14, 34) Source(19, 35) + SourceIndex(0) -7 >Emitted(14, 35) Source(19, 36) + SourceIndex(0) -8 >Emitted(14, 37) Source(19, 38) + SourceIndex(0) -9 >Emitted(14, 38) Source(19, 39) + SourceIndex(0) -10>Emitted(14, 39) Source(19, 40) + SourceIndex(0) -11>Emitted(14, 40) Source(19, 41) + SourceIndex(0) ---- >>> return Point; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^ 1 > + > + > // Static member + > static origin = new Point(0, 0); > 2 > } -1 >Emitted(15, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(15, 21) Source(20, 6) + SourceIndex(0) +1 >Emitted(13, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(13, 21) Source(20, 6) + SourceIndex(0) --- >>> }()); 1 >^^^^ 2 > ^ 3 > -4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^-> 1 > 2 > } 3 > -4 > export class Point implements IPoint { - > // Constructor - > constructor(public x: number, public y: number) { } - > - > // Instance member - > getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } - > - > // Static member - > static origin = new Point(0, 0); - > } -1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) -2 >Emitted(16, 6) Source(20, 6) + SourceIndex(0) -3 >Emitted(16, 6) Source(11, 5) + SourceIndex(0) -4 >Emitted(16, 10) Source(20, 6) + SourceIndex(0) +1 >Emitted(14, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(14, 6) Source(20, 6) + SourceIndex(0) +3 >Emitted(14, 6) Source(11, 5) + SourceIndex(0) +--- +>>> // Static member +1->^^^^ +2 > ^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^-> +1->export class Point implements IPoint { + > // Constructor + > constructor(public x: number, public y: number) { } + > + > // Instance member + > getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } + > + > +2 > // Static member +1->Emitted(15, 5) Source(18, 9) + SourceIndex(0) +2 >Emitted(15, 21) Source(18, 25) + SourceIndex(0) +--- +>>> Point.origin = new Point(0, 0); +1->^^^^ +2 > ^^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^ +5 > ^^^^^ +6 > ^ +7 > ^ +8 > ^^ +9 > ^ +10> ^ +11> ^ +1-> + > static +2 > origin +3 > = +4 > new +5 > Point +6 > ( +7 > 0 +8 > , +9 > 0 +10> ) +11> ; + > } +1->Emitted(16, 5) Source(19, 16) + SourceIndex(0) +2 >Emitted(16, 17) Source(19, 22) + SourceIndex(0) +3 >Emitted(16, 20) Source(19, 25) + SourceIndex(0) +4 >Emitted(16, 24) Source(19, 29) + SourceIndex(0) +5 >Emitted(16, 29) Source(19, 34) + SourceIndex(0) +6 >Emitted(16, 30) Source(19, 35) + SourceIndex(0) +7 >Emitted(16, 31) Source(19, 36) + SourceIndex(0) +8 >Emitted(16, 33) Source(19, 38) + SourceIndex(0) +9 >Emitted(16, 34) Source(19, 39) + SourceIndex(0) +10>Emitted(16, 35) Source(19, 40) + SourceIndex(0) +11>Emitted(16, 36) Source(20, 6) + SourceIndex(0) --- >>> Shapes.Point = Point; -1->^^^^ +1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^ 4 > ^ 5 > ^^^^^^^^^^^-> -1-> +1 > 2 > Point 3 > implements IPoint { > // Constructor @@ -370,7 +367,7 @@ sourceFile:sourceMap-FileWithComments.ts > static origin = new Point(0, 0); > } 4 > -1->Emitted(17, 5) Source(11, 18) + SourceIndex(0) +1 >Emitted(17, 5) Source(11, 18) + SourceIndex(0) 2 >Emitted(17, 17) Source(11, 23) + SourceIndex(0) 3 >Emitted(17, 25) Source(20, 6) + SourceIndex(0) 4 >Emitted(17, 26) Source(20, 6) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index c3bb5cd7225..63cdb25900c 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -88,37 +88,37 @@ var Greeter = (function () { enumerable: true, configurable: true }); - Greeter.x1 = 10; - __decorate([ - PropertyDecorator1, - PropertyDecorator2(40) - ], Greeter.prototype, "greet", null); - __decorate([ - PropertyDecorator1, - PropertyDecorator2(50) - ], Greeter.prototype, "x", void 0); - __decorate([ - __param(0, ParameterDecorator1), - __param(0, ParameterDecorator2(70)) - ], Greeter.prototype, "fn", null); - __decorate([ - PropertyDecorator1, - PropertyDecorator2(80), - __param(0, ParameterDecorator1), - __param(0, ParameterDecorator2(90)) - ], Greeter.prototype, "greetings", null); - __decorate([ - PropertyDecorator1, - PropertyDecorator2(60) - ], Greeter, "x1", void 0); - Greeter = __decorate([ - ClassDecorator1, - ClassDecorator2(10), - __param(0, ParameterDecorator1), - __param(0, ParameterDecorator2(20)), - __param(1, ParameterDecorator1), - __param(1, ParameterDecorator2(30)) - ], Greeter); return Greeter; }()); +Greeter.x1 = 10; +__decorate([ + PropertyDecorator1, + PropertyDecorator2(40) +], Greeter.prototype, "greet", null); +__decorate([ + PropertyDecorator1, + PropertyDecorator2(50) +], Greeter.prototype, "x", void 0); +__decorate([ + __param(0, ParameterDecorator1), + __param(0, ParameterDecorator2(70)) +], Greeter.prototype, "fn", null); +__decorate([ + PropertyDecorator1, + PropertyDecorator2(80), + __param(0, ParameterDecorator1), + __param(0, ParameterDecorator2(90)) +], Greeter.prototype, "greetings", null); +__decorate([ + PropertyDecorator1, + PropertyDecorator2(60) +], Greeter, "x1", void 0); +Greeter = __decorate([ + ClassDecorator1, + ClassDecorator2(10), + __param(0, ParameterDecorator1), + __param(0, ParameterDecorator2(20)), + __param(1, ParameterDecorator1), + __param(1, ParameterDecorator2(30)) +], Greeter); //# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 0a6b45eb383..18b24ddf37e 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAIvB,WAAc;aAAd,WAAc,CAAd,sBAAc,CAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAbc,UAAE,GAAW,EAAE,CAAC;IAZ/B;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;wCAAA;IAKvB;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;sCAAA;IAQrB;mBAAC,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;qCAAA;IAK1B;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;mBAMpB,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;4CAPH;IAZvB;QAAC,kBAAkB;QAClB,kBAAkB,CAAC,EAAE,CAAC;6BAAA;IAxB3B;QAAC,eAAe;QACf,eAAe,CAAC,EAAE,CAAC;mBAGb,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;mBAGvB,mBAAmB;mBACnB,mBAAmB,CAAC,EAAE,CAAC;eARV;IA6CpB,cAAC;AAAD,CAAC,AA5CD,IA4CC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAIvB,WAAc;aAAd,WAAc,CAAd,sBAAc,CAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAQL,cAAC;AAAD,CAAC,AA5CD;AAuBmB,UAAE,GAAW,EAAE,CAAC;AAZ/B;IAAC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;oCAAA;AAKvB;IAAC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;kCAAA;AAQrB;eAAC,mBAAmB;eACnB,mBAAmB,CAAC,EAAE,CAAC;iCAAA;AAK1B;IAAC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;eAMpB,mBAAmB;eACnB,mBAAmB,CAAC,EAAE,CAAC;wCAPH;AAZvB;IAAC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;yBAAA;AAxB3B;IAAC,eAAe;IACf,eAAe,CAAC,EAAE,CAAC;eAGb,mBAAmB;eACnB,mBAAmB,CAAC,EAAE,CAAC;eAGvB,mBAAmB;eACnB,mBAAmB,CAAC,EAAE,CAAC;WARV;AA6CnB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index 16820428856..58b5eaefc7c 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -356,113 +356,164 @@ sourceFile:sourceMapValidationDecorators.ts >>> configurable: true >>> }); 1->^^^^^^^ -2 > ^^^^^^^^^^^^^^-> +2 > ^^^^^^^^^^^^^-> 1-> 1->Emitted(33, 8) Source(46, 6) + SourceIndex(0) --- ->>> Greeter.x1 = 10; +>>> return Greeter; 1->^^^^ -2 > ^^^^^^^^^^ -3 > ^^^ -4 > ^^ -5 > ^ -1-> -2 > x1 -3 > : number = -4 > 10 -5 > ; -1->Emitted(34, 5) Source(33, 20) + SourceIndex(0) -2 >Emitted(34, 15) Source(33, 22) + SourceIndex(0) -3 >Emitted(34, 18) Source(33, 33) + SourceIndex(0) -4 >Emitted(34, 20) Source(33, 35) + SourceIndex(0) -5 >Emitted(34, 21) Source(33, 36) + SourceIndex(0) +2 > ^^^^^^^^^^^^^^ +1-> + > + > set greetings( + > @ParameterDecorator1 + > @ParameterDecorator2(90) + > greetings: string) { + > this.greeting = greetings; + > } + > +2 > } +1->Emitted(34, 5) Source(54, 1) + SourceIndex(0) +2 >Emitted(34, 19) Source(54, 2) + SourceIndex(0) --- ->>> __decorate([ -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +>>>}()); 1 > -1 >Emitted(35, 5) Source(21, 5) + SourceIndex(0) +2 >^ +3 > +4 > ^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +1 >Emitted(35, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(54, 2) + SourceIndex(0) +3 >Emitted(35, 2) Source(10, 1) + SourceIndex(0) --- ->>> PropertyDecorator1, -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^-> +>>>Greeter.x1 = 10; +1-> +2 >^^^^^^^^^^ +3 > ^^^ +4 > ^^ +5 > ^ +1->class Greeter { + > constructor( + > @ParameterDecorator1 + > @ParameterDecorator2(20) + > public greeting: string, + > + > @ParameterDecorator1 + > @ParameterDecorator2(30) + > ...b: string[]) { + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(40) + > greet() { + > return "

" + this.greeting + "

"; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(50) + > private x: string; + > + > @PropertyDecorator1 + > @PropertyDecorator2(60) + > private static +2 >x1 +3 > : number = +4 > 10 +5 > ; +1->Emitted(36, 1) Source(33, 20) + SourceIndex(0) +2 >Emitted(36, 11) Source(33, 22) + SourceIndex(0) +3 >Emitted(36, 14) Source(33, 33) + SourceIndex(0) +4 >Emitted(36, 16) Source(33, 35) + SourceIndex(0) +5 >Emitted(36, 17) Source(33, 36) + SourceIndex(0) +--- +>>>__decorate([ +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +1 >Emitted(37, 1) Source(21, 5) + SourceIndex(0) +--- +>>> PropertyDecorator1, +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^-> 1->@ -2 > PropertyDecorator1 -1->Emitted(36, 9) Source(21, 6) + SourceIndex(0) -2 >Emitted(36, 27) Source(21, 24) + SourceIndex(0) +2 > PropertyDecorator1 +1->Emitted(38, 5) Source(21, 6) + SourceIndex(0) +2 >Emitted(38, 23) Source(21, 24) + SourceIndex(0) --- ->>> PropertyDecorator2(40) -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^-> +>>> PropertyDecorator2(40) +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^^^-> 1-> > @ -2 > PropertyDecorator2 -3 > ( -4 > 40 -5 > ) -1->Emitted(37, 9) Source(22, 6) + SourceIndex(0) -2 >Emitted(37, 27) Source(22, 24) + SourceIndex(0) -3 >Emitted(37, 28) Source(22, 25) + SourceIndex(0) -4 >Emitted(37, 30) Source(22, 27) + SourceIndex(0) -5 >Emitted(37, 31) Source(22, 28) + SourceIndex(0) +2 > PropertyDecorator2 +3 > ( +4 > 40 +5 > ) +1->Emitted(39, 5) Source(22, 6) + SourceIndex(0) +2 >Emitted(39, 23) Source(22, 24) + SourceIndex(0) +3 >Emitted(39, 24) Source(22, 25) + SourceIndex(0) +4 >Emitted(39, 26) Source(22, 27) + SourceIndex(0) +5 >Emitted(39, 27) Source(22, 28) + SourceIndex(0) --- ->>> ], Greeter.prototype, "greet", null); -1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>>>], Greeter.prototype, "greet", null); +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -1->Emitted(38, 41) Source(22, 28) + SourceIndex(0) +1->Emitted(40, 37) Source(22, 28) + SourceIndex(0) --- ->>> __decorate([ -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +>>>__decorate([ +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > greet() { > return "

" + this.greeting + "

"; > } > > -1 >Emitted(39, 5) Source(27, 5) + SourceIndex(0) +1 >Emitted(41, 1) Source(27, 5) + SourceIndex(0) --- ->>> PropertyDecorator1, -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^-> +>>> PropertyDecorator1, +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^-> 1->@ -2 > PropertyDecorator1 -1->Emitted(40, 9) Source(27, 6) + SourceIndex(0) -2 >Emitted(40, 27) Source(27, 24) + SourceIndex(0) +2 > PropertyDecorator1 +1->Emitted(42, 5) Source(27, 6) + SourceIndex(0) +2 >Emitted(42, 23) Source(27, 24) + SourceIndex(0) --- ->>> PropertyDecorator2(50) -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^-> +>>> PropertyDecorator2(50) +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^-> 1-> > @ -2 > PropertyDecorator2 -3 > ( -4 > 50 -5 > ) -1->Emitted(41, 9) Source(28, 6) + SourceIndex(0) -2 >Emitted(41, 27) Source(28, 24) + SourceIndex(0) -3 >Emitted(41, 28) Source(28, 25) + SourceIndex(0) -4 >Emitted(41, 30) Source(28, 27) + SourceIndex(0) -5 >Emitted(41, 31) Source(28, 28) + SourceIndex(0) +2 > PropertyDecorator2 +3 > ( +4 > 50 +5 > ) +1->Emitted(43, 5) Source(28, 6) + SourceIndex(0) +2 >Emitted(43, 23) Source(28, 24) + SourceIndex(0) +3 >Emitted(43, 24) Source(28, 25) + SourceIndex(0) +4 >Emitted(43, 26) Source(28, 27) + SourceIndex(0) +5 >Emitted(43, 27) Source(28, 28) + SourceIndex(0) --- ->>> ], Greeter.prototype, "x", void 0); -1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>>>], Greeter.prototype, "x", void 0); +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -1->Emitted(42, 39) Source(28, 28) + SourceIndex(0) +1->Emitted(44, 35) Source(28, 28) + SourceIndex(0) --- ->>> __decorate([ -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +>>>__decorate([ +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > private x: string; > @@ -472,83 +523,83 @@ sourceFile:sourceMapValidationDecorators.ts > > private fn( > -1 >Emitted(43, 5) Source(36, 7) + SourceIndex(0) +1 >Emitted(45, 1) Source(36, 7) + SourceIndex(0) --- ->>> __param(0, ParameterDecorator1), -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^-> +>>> __param(0, ParameterDecorator1), +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1->@ -2 > ParameterDecorator1 -1->Emitted(44, 20) Source(36, 8) + SourceIndex(0) -2 >Emitted(44, 39) Source(36, 27) + SourceIndex(0) +2 > ParameterDecorator1 +1->Emitted(46, 16) Source(36, 8) + SourceIndex(0) +2 >Emitted(46, 35) Source(36, 27) + SourceIndex(0) --- ->>> __param(0, ParameterDecorator2(70)) -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ +>>> __param(0, ParameterDecorator2(70)) +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> > @ -2 > ParameterDecorator2 -3 > ( -4 > 70 -5 > ) -1->Emitted(45, 20) Source(37, 8) + SourceIndex(0) -2 >Emitted(45, 39) Source(37, 27) + SourceIndex(0) -3 >Emitted(45, 40) Source(37, 28) + SourceIndex(0) -4 >Emitted(45, 42) Source(37, 30) + SourceIndex(0) -5 >Emitted(45, 43) Source(37, 31) + SourceIndex(0) +2 > ParameterDecorator2 +3 > ( +4 > 70 +5 > ) +1->Emitted(47, 16) Source(37, 8) + SourceIndex(0) +2 >Emitted(47, 35) Source(37, 27) + SourceIndex(0) +3 >Emitted(47, 36) Source(37, 28) + SourceIndex(0) +4 >Emitted(47, 38) Source(37, 30) + SourceIndex(0) +5 >Emitted(47, 39) Source(37, 31) + SourceIndex(0) --- ->>> ], Greeter.prototype, "fn", null); -1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>>>], Greeter.prototype, "fn", null); +1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > -1 >Emitted(46, 38) Source(37, 31) + SourceIndex(0) +1 >Emitted(48, 34) Source(37, 31) + SourceIndex(0) --- ->>> __decorate([ -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +>>>__decorate([ +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > x: number) { > return this.greeting; > } > > -1 >Emitted(47, 5) Source(42, 5) + SourceIndex(0) +1 >Emitted(49, 1) Source(42, 5) + SourceIndex(0) --- ->>> PropertyDecorator1, -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^-> +>>> PropertyDecorator1, +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1->@ -2 > PropertyDecorator1 -1->Emitted(48, 9) Source(42, 6) + SourceIndex(0) -2 >Emitted(48, 27) Source(42, 24) + SourceIndex(0) +2 > PropertyDecorator1 +1->Emitted(50, 5) Source(42, 6) + SourceIndex(0) +2 >Emitted(50, 23) Source(42, 24) + SourceIndex(0) --- ->>> PropertyDecorator2(80), -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^-> +>>> PropertyDecorator2(80), +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^^-> 1-> > @ -2 > PropertyDecorator2 -3 > ( -4 > 80 -5 > ) -1->Emitted(49, 9) Source(43, 6) + SourceIndex(0) -2 >Emitted(49, 27) Source(43, 24) + SourceIndex(0) -3 >Emitted(49, 28) Source(43, 25) + SourceIndex(0) -4 >Emitted(49, 30) Source(43, 27) + SourceIndex(0) -5 >Emitted(49, 31) Source(43, 28) + SourceIndex(0) +2 > PropertyDecorator2 +3 > ( +4 > 80 +5 > ) +1->Emitted(51, 5) Source(43, 6) + SourceIndex(0) +2 >Emitted(51, 23) Source(43, 24) + SourceIndex(0) +3 >Emitted(51, 24) Source(43, 25) + SourceIndex(0) +4 >Emitted(51, 26) Source(43, 27) + SourceIndex(0) +5 >Emitted(51, 27) Source(43, 28) + SourceIndex(0) --- ->>> __param(0, ParameterDecorator1), -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^-> +>>> __param(0, ParameterDecorator1), +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1-> > get greetings() { > return this.greeting; @@ -556,176 +607,175 @@ sourceFile:sourceMapValidationDecorators.ts > > set greetings( > @ -2 > ParameterDecorator1 -1->Emitted(50, 20) Source(49, 8) + SourceIndex(0) -2 >Emitted(50, 39) Source(49, 27) + SourceIndex(0) +2 > ParameterDecorator1 +1->Emitted(52, 16) Source(49, 8) + SourceIndex(0) +2 >Emitted(52, 35) Source(49, 27) + SourceIndex(0) --- ->>> __param(0, ParameterDecorator2(90)) -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ -6 > ^^^^-> +>>> __param(0, ParameterDecorator2(90)) +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^-> 1-> > @ -2 > ParameterDecorator2 -3 > ( -4 > 90 -5 > ) -1->Emitted(51, 20) Source(50, 8) + SourceIndex(0) -2 >Emitted(51, 39) Source(50, 27) + SourceIndex(0) -3 >Emitted(51, 40) Source(50, 28) + SourceIndex(0) -4 >Emitted(51, 42) Source(50, 30) + SourceIndex(0) -5 >Emitted(51, 43) Source(50, 31) + SourceIndex(0) +2 > ParameterDecorator2 +3 > ( +4 > 90 +5 > ) +1->Emitted(53, 16) Source(50, 8) + SourceIndex(0) +2 >Emitted(53, 35) Source(50, 27) + SourceIndex(0) +3 >Emitted(53, 36) Source(50, 28) + SourceIndex(0) +4 >Emitted(53, 38) Source(50, 30) + SourceIndex(0) +5 >Emitted(53, 39) Source(50, 31) + SourceIndex(0) --- ->>> ], Greeter.prototype, "greetings", null); -1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>>>], Greeter.prototype, "greetings", null); +1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -1->Emitted(52, 45) Source(43, 28) + SourceIndex(0) +1->Emitted(54, 41) Source(43, 28) + SourceIndex(0) --- ->>> __decorate([ -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +>>>__decorate([ 1 > -1 >Emitted(53, 5) Source(31, 5) + SourceIndex(0) +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +1 >Emitted(55, 1) Source(31, 5) + SourceIndex(0) --- ->>> PropertyDecorator1, -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^-> +>>> PropertyDecorator1, +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^-> 1->@ -2 > PropertyDecorator1 -1->Emitted(54, 9) Source(31, 6) + SourceIndex(0) -2 >Emitted(54, 27) Source(31, 24) + SourceIndex(0) +2 > PropertyDecorator1 +1->Emitted(56, 5) Source(31, 6) + SourceIndex(0) +2 >Emitted(56, 23) Source(31, 24) + SourceIndex(0) --- ->>> PropertyDecorator2(60) -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ -6 > ^-> +>>> PropertyDecorator2(60) +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^-> 1-> > @ -2 > PropertyDecorator2 -3 > ( -4 > 60 -5 > ) -1->Emitted(55, 9) Source(32, 6) + SourceIndex(0) -2 >Emitted(55, 27) Source(32, 24) + SourceIndex(0) -3 >Emitted(55, 28) Source(32, 25) + SourceIndex(0) -4 >Emitted(55, 30) Source(32, 27) + SourceIndex(0) -5 >Emitted(55, 31) Source(32, 28) + SourceIndex(0) +2 > PropertyDecorator2 +3 > ( +4 > 60 +5 > ) +1->Emitted(57, 5) Source(32, 6) + SourceIndex(0) +2 >Emitted(57, 23) Source(32, 24) + SourceIndex(0) +3 >Emitted(57, 24) Source(32, 25) + SourceIndex(0) +4 >Emitted(57, 26) Source(32, 27) + SourceIndex(0) +5 >Emitted(57, 27) Source(32, 28) + SourceIndex(0) --- ->>> ], Greeter, "x1", void 0); -1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>>>], Greeter, "x1", void 0); +1->^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> -1->Emitted(56, 30) Source(32, 28) + SourceIndex(0) +1->Emitted(58, 26) Source(32, 28) + SourceIndex(0) --- ->>> Greeter = __decorate([ -1 >^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^-> +>>>Greeter = __decorate([ 1 > -1 >Emitted(57, 5) Source(8, 1) + SourceIndex(0) +2 >^^^^^^^^^^^^^^^^^^^^^-> +1 > +1 >Emitted(59, 1) Source(8, 1) + SourceIndex(0) --- ->>> ClassDecorator1, -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^ -3 > ^^^^^^-> +>>> ClassDecorator1, +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1->@ -2 > ClassDecorator1 -1->Emitted(58, 9) Source(8, 2) + SourceIndex(0) -2 >Emitted(58, 24) Source(8, 17) + SourceIndex(0) +2 > ClassDecorator1 +1->Emitted(60, 5) Source(8, 2) + SourceIndex(0) +2 >Emitted(60, 20) Source(8, 17) + SourceIndex(0) --- ->>> ClassDecorator2(10), -1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^^^^^^^-> +>>> ClassDecorator2(10), +1->^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^^^^^-> 1-> >@ -2 > ClassDecorator2 -3 > ( -4 > 10 -5 > ) -1->Emitted(59, 9) Source(9, 2) + SourceIndex(0) -2 >Emitted(59, 24) Source(9, 17) + SourceIndex(0) -3 >Emitted(59, 25) Source(9, 18) + SourceIndex(0) -4 >Emitted(59, 27) Source(9, 20) + SourceIndex(0) -5 >Emitted(59, 28) Source(9, 21) + SourceIndex(0) +2 > ClassDecorator2 +3 > ( +4 > 10 +5 > ) +1->Emitted(61, 5) Source(9, 2) + SourceIndex(0) +2 >Emitted(61, 20) Source(9, 17) + SourceIndex(0) +3 >Emitted(61, 21) Source(9, 18) + SourceIndex(0) +4 >Emitted(61, 23) Source(9, 20) + SourceIndex(0) +5 >Emitted(61, 24) Source(9, 21) + SourceIndex(0) --- ->>> __param(0, ParameterDecorator1), -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^-> +>>> __param(0, ParameterDecorator1), +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^-> 1-> >class Greeter { > constructor( > @ -2 > ParameterDecorator1 -1->Emitted(60, 20) Source(12, 8) + SourceIndex(0) -2 >Emitted(60, 39) Source(12, 27) + SourceIndex(0) +2 > ParameterDecorator1 +1->Emitted(62, 16) Source(12, 8) + SourceIndex(0) +2 >Emitted(62, 35) Source(12, 27) + SourceIndex(0) --- ->>> __param(0, ParameterDecorator2(20)), -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ +>>> __param(0, ParameterDecorator2(20)), +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> > @ -2 > ParameterDecorator2 -3 > ( -4 > 20 -5 > ) -1->Emitted(61, 20) Source(13, 8) + SourceIndex(0) -2 >Emitted(61, 39) Source(13, 27) + SourceIndex(0) -3 >Emitted(61, 40) Source(13, 28) + SourceIndex(0) -4 >Emitted(61, 42) Source(13, 30) + SourceIndex(0) -5 >Emitted(61, 43) Source(13, 31) + SourceIndex(0) +2 > ParameterDecorator2 +3 > ( +4 > 20 +5 > ) +1->Emitted(63, 16) Source(13, 8) + SourceIndex(0) +2 >Emitted(63, 35) Source(13, 27) + SourceIndex(0) +3 >Emitted(63, 36) Source(13, 28) + SourceIndex(0) +4 >Emitted(63, 38) Source(13, 30) + SourceIndex(0) +5 >Emitted(63, 39) Source(13, 31) + SourceIndex(0) --- ->>> __param(1, ParameterDecorator1), -1 >^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^-> +>>> __param(1, ParameterDecorator1), +1 >^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> 1 > > public greeting: string, > > @ -2 > ParameterDecorator1 -1 >Emitted(62, 20) Source(16, 8) + SourceIndex(0) -2 >Emitted(62, 39) Source(16, 27) + SourceIndex(0) +2 > ParameterDecorator1 +1 >Emitted(64, 16) Source(16, 8) + SourceIndex(0) +2 >Emitted(64, 35) Source(16, 27) + SourceIndex(0) --- ->>> __param(1, ParameterDecorator2(30)) -1->^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^ -3 > ^ -4 > ^^ -5 > ^ +>>> __param(1, ParameterDecorator2(30)) +1->^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ 1-> > @ -2 > ParameterDecorator2 -3 > ( -4 > 30 -5 > ) -1->Emitted(63, 20) Source(17, 8) + SourceIndex(0) -2 >Emitted(63, 39) Source(17, 27) + SourceIndex(0) -3 >Emitted(63, 40) Source(17, 28) + SourceIndex(0) -4 >Emitted(63, 42) Source(17, 30) + SourceIndex(0) -5 >Emitted(63, 43) Source(17, 31) + SourceIndex(0) +2 > ParameterDecorator2 +3 > ( +4 > 30 +5 > ) +1->Emitted(65, 16) Source(17, 8) + SourceIndex(0) +2 >Emitted(65, 35) Source(17, 27) + SourceIndex(0) +3 >Emitted(65, 36) Source(17, 28) + SourceIndex(0) +4 >Emitted(65, 38) Source(17, 30) + SourceIndex(0) +5 >Emitted(65, 39) Source(17, 31) + SourceIndex(0) --- ->>> ], Greeter); -1 >^^^^^^^^^^^^^^^ -2 > ^^^^^-> +>>>], Greeter); +1 >^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(64, 16) Source(9, 21) + SourceIndex(0) +1 >Emitted(66, 12) Source(9, 21) + SourceIndex(0) --- ->>> return Greeter; -1->^^^^ -2 > ^^^^^^^^^^^^^^ +>>>//# sourceMappingURL=sourceMapValidationDecorators.js.map1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> >class Greeter { > constructor( @@ -771,68 +821,6 @@ sourceFile:sourceMapValidationDecorators.ts > greetings: string) { > this.greeting = greetings; > } - > -2 > } -1->Emitted(65, 5) Source(54, 1) + SourceIndex(0) -2 >Emitted(65, 19) Source(54, 2) + SourceIndex(0) ---- ->>>}()); -1 > -2 >^ -3 > -4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > -2 >} -3 > -4 > class Greeter { - > constructor( - > @ParameterDecorator1 - > @ParameterDecorator2(20) - > public greeting: string, - > - > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[]) { - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(40) - > greet() { - > return "

" + this.greeting + "

"; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(50) - > private x: string; - > - > @PropertyDecorator1 - > @PropertyDecorator2(60) - > private static x1: number = 10; - > - > private fn( - > @ParameterDecorator1 - > @ParameterDecorator2(70) - > x: number) { - > return this.greeting; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(80) - > get greetings() { - > return this.greeting; - > } - > - > set greetings( - > @ParameterDecorator1 - > @ParameterDecorator2(90) - > greetings: string) { - > this.greeting = greetings; - > } - > } -1 >Emitted(66, 1) Source(54, 1) + SourceIndex(0) -2 >Emitted(66, 2) Source(54, 2) + SourceIndex(0) -3 >Emitted(66, 2) Source(10, 1) + SourceIndex(0) -4 >Emitted(66, 6) Source(54, 2) + SourceIndex(0) ---- ->>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file + >} +1->Emitted(67, 1) Source(54, 2) + SourceIndex(0) +--- \ No newline at end of file diff --git a/tests/baselines/reference/staticClassProps.js b/tests/baselines/reference/staticClassProps.js index c808e4eb7fd..8a61bb7400f 100644 --- a/tests/baselines/reference/staticClassProps.js +++ b/tests/baselines/reference/staticClassProps.js @@ -13,6 +13,6 @@ var C = (function () { function C() { } C.prototype.foo = function () { }; - C.z = 1; return C; }()); +C.z = 1; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index a05ece1dbbb..1c76a251220 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -28,6 +28,6 @@ var P = (function (_super) { function P() { _super.apply(this, arguments); } - P.SomeNumber = P.GetNumber(); return P; }(SomeBase)); +P.SomeNumber = P.GetNumber(); diff --git a/tests/baselines/reference/staticMemberInitialization.js b/tests/baselines/reference/staticMemberInitialization.js index c21c29ed4f8..13a5c8c25c6 100644 --- a/tests/baselines/reference/staticMemberInitialization.js +++ b/tests/baselines/reference/staticMemberInitialization.js @@ -10,8 +10,8 @@ var r = C.x; var C = (function () { function C() { } - C.x = 1; return C; }()); +C.x = 1; var c = new C(); var r = C.x; diff --git a/tests/baselines/reference/staticMemberWithStringAndNumberNames.js b/tests/baselines/reference/staticMemberWithStringAndNumberNames.js index 2fdd64ea04b..9d8846ba963 100644 --- a/tests/baselines/reference/staticMemberWithStringAndNumberNames.js +++ b/tests/baselines/reference/staticMemberWithStringAndNumberNames.js @@ -19,10 +19,10 @@ var C = (function () { this.x2 = C['0']; this.x3 = C[0]; } - C["foo"] = 0; - C[0] = 1; - C.s = C['foo']; - C.s2 = C['0']; - C.s3 = C[0]; return C; }()); +C["foo"] = 0; +C[0] = 1; +C.s = C['foo']; +C.s2 = C['0']; +C.s3 = C[0]; diff --git a/tests/baselines/reference/staticModifierAlreadySeen.js b/tests/baselines/reference/staticModifierAlreadySeen.js index 76f8b050d6f..c37d4c0807a 100644 --- a/tests/baselines/reference/staticModifierAlreadySeen.js +++ b/tests/baselines/reference/staticModifierAlreadySeen.js @@ -9,6 +9,6 @@ var C = (function () { function C() { } C.bar = function () { }; - C.foo = 1; return C; }()); +C.foo = 1; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index f4bc5ece8d1..c25c406746d 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -52,9 +52,9 @@ var B = (function (_super) { var x = 1; // should not error _super.call(this); } - B.s = 9; return B; }(A)); +B.s = 9; var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/statics.js b/tests/baselines/reference/statics.js index 3776c09c8ce..d52a28208e6 100644 --- a/tests/baselines/reference/statics.js +++ b/tests/baselines/reference/statics.js @@ -45,11 +45,11 @@ var M; C.f = function (n) { return "wow: " + (n + C.y + C.pub + C.priv); }; - C.priv = 2; - C.pub = 3; - C.y = C.priv; return C; }()); + C.priv = 2; + C.pub = 3; + C.y = C.priv; M.C = C; var c = C.y; function f() { diff --git a/tests/baselines/reference/staticsInConstructorBodies.js b/tests/baselines/reference/staticsInConstructorBodies.js index 9bc3ed29325..edd49456ef7 100644 --- a/tests/baselines/reference/staticsInConstructorBodies.js +++ b/tests/baselines/reference/staticsInConstructorBodies.js @@ -11,6 +11,6 @@ var C = (function () { function C() { } C.m1 = function () { }; // ERROR - C.p1 = 0; // ERROR return C; }()); +C.p1 = 0; // ERROR diff --git a/tests/baselines/reference/staticsNotInScopeInClodule.js b/tests/baselines/reference/staticsNotInScopeInClodule.js index 150ae8aca5b..e10ed2b31d3 100644 --- a/tests/baselines/reference/staticsNotInScopeInClodule.js +++ b/tests/baselines/reference/staticsNotInScopeInClodule.js @@ -11,9 +11,9 @@ module Clod { var Clod = (function () { function Clod() { } - Clod.x = 10; return Clod; }()); +Clod.x = 10; var Clod; (function (Clod) { var p = x; // x isn't in scope here diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 3b315861548..30dbfa58d70 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -105,18 +105,18 @@ var Bs = (function (_super) { "use strict"; // No error _super.call(this); } - Bs.s = 9; return Bs; }(A)); +Bs.s = 9; var Cs = (function (_super) { __extends(Cs, _super); function Cs() { _super.call(this); // No error "use strict"; } - Cs.s = 9; return Cs; }(A)); +Cs.s = 9; var Ds = (function (_super) { __extends(Ds, _super); function Ds() { @@ -124,6 +124,6 @@ var Ds = (function (_super) { _super.call(this); "use strict"; } - Ds.s = 9; return Ds; }(A)); +Ds.s = 9; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 37c6a9816a6..6e5cd9aca44 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -24,9 +24,9 @@ var MyBase = (function () { this.S2 = "test"; this.f = function () { return 5; }; } - MyBase.S1 = 5; return MyBase; }()); +MyBase.S1 = 5; var MyDerived = (function (_super) { __extends(MyDerived, _super); function MyDerived() { diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index b27d695cb31..c72bf387c24 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -59,6 +59,6 @@ var Q = (function (_super) { _super.x.call(this); // error _super.y.call(this); }; - Q.yy = _super.; // error for static initializer accessing super return Q; }(P)); +Q.yy = _super.; // error for static initializer accessing super diff --git a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js index 4b23326c7a3..07d65c726b3 100644 --- a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js +++ b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js @@ -14,9 +14,9 @@ var Vector = (function () { function Vector() { var _this = this; } - Vector.foo = function () { - // 'this' should not be available in a static initializer. - log(_this); - }; return Vector; }()); +Vector.foo = function () { + // 'this' should not be available in a static initializer. + log(_this); +}; diff --git a/tests/baselines/reference/thisInConstructorParameter2.js b/tests/baselines/reference/thisInConstructorParameter2.js index 7260ecafcb9..ba2917c5a4e 100644 --- a/tests/baselines/reference/thisInConstructorParameter2.js +++ b/tests/baselines/reference/thisInConstructorParameter2.js @@ -25,6 +25,6 @@ var P = (function () { if (zz === void 0) { zz = this; } zz.y; }; - P.y = this; return P; }()); +P.y = this; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 75ccd12c288..76eeef0139c 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -58,9 +58,9 @@ var __extends = (this && this.__extends) || function (d, b) { var ErrClass1 = (function () { function ErrClass1() { } - ErrClass1.t = this; // Error return ErrClass1; }()); +ErrClass1.t = this; // Error var BaseErrClass = (function () { function BaseErrClass(t) { } diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 2e7e6d8b47c..634b5ef0a20 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -59,9 +59,9 @@ var __extends = (this && this.__extends) || function (d, b) { var ErrClass1 = (function () { function ErrClass1() { } - ErrClass1.t = this; // Error return ErrClass1; }()); +ErrClass1.t = this; // Error var BaseErrClass = (function () { function BaseErrClass(t) { } diff --git a/tests/baselines/reference/thisInOuterClassBody.js b/tests/baselines/reference/thisInOuterClassBody.js index 40e4a2e2485..40b0e2b78ae 100644 --- a/tests/baselines/reference/thisInOuterClassBody.js +++ b/tests/baselines/reference/thisInOuterClassBody.js @@ -36,6 +36,6 @@ var Foo = (function () { var a = this.y; var b = this.x; }; - Foo.y = this; return Foo; }()); +Foo.y = this; diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.js b/tests/baselines/reference/thisInPropertyBoundDeclarations.js index 0b378cec51a..f5967fbb5b2 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.js +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.js @@ -74,13 +74,13 @@ var Bug = (function () { Bug.prototype.foo = function (name) { this.name = name; }; - Bug.func = [ - function (that, name) { - that.foo(name); - } - ]; return Bug; }()); +Bug.func = [ + function (that, name) { + that.foo(name); + } +]; // Valid use of this in a property bound decl var A = (function () { function A() { diff --git a/tests/baselines/reference/thisInStaticMethod1.js b/tests/baselines/reference/thisInStaticMethod1.js index a42415c0b62..1e39ded3b61 100644 --- a/tests/baselines/reference/thisInStaticMethod1.js +++ b/tests/baselines/reference/thisInStaticMethod1.js @@ -14,7 +14,7 @@ var foo = (function () { foo.bar = function () { return this.x; }; - foo.x = 3; return foo; }()); +foo.x = 3; var x = foo.bar(); diff --git a/tests/baselines/reference/thisTypeErrors.js b/tests/baselines/reference/thisTypeErrors.js index f246b80f4f4..5811ec6b709 100644 --- a/tests/baselines/reference/thisTypeErrors.js +++ b/tests/baselines/reference/thisTypeErrors.js @@ -75,9 +75,9 @@ var C2 = (function () { C2.foo = function (x) { return undefined; }; - C2.y = undefined; return C2; }()); +C2.y = undefined; var N1; (function (N1) { N1.y = this; diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.js b/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.js index d18181dd1dc..44b37cc3be5 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.js +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.js @@ -14,9 +14,11 @@ function foo(x) { }()); } return undefined; } -foo((function () { - function class_2() { - } - class_2.prop = "hello"; - return class_2; -}())).length; +foo((_a = (function () { + function class_2() { + } + return class_2; + }()), + _a.prop = "hello", + _a)).length; +var _a; diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.js b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.js index 66da2ffbff6..bd221a30137 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.js +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression2.js @@ -16,9 +16,11 @@ function foo(x) { return undefined; } // Should not infer string because it is a static property -foo((function () { - function class_2() { - } - class_2.prop = "hello"; - return class_2; -}())).length; +foo((_a = (function () { + function class_2() { + } + return class_2; + }()), + _a.prop = "hello", + _a)).length; +var _a; diff --git a/tests/baselines/reference/typeOfPrototype.js b/tests/baselines/reference/typeOfPrototype.js index 3e8b3186936..a0f076113e0 100644 --- a/tests/baselines/reference/typeOfPrototype.js +++ b/tests/baselines/reference/typeOfPrototype.js @@ -11,7 +11,7 @@ var Foo = (function () { function Foo() { this.bar = 3; } - Foo.bar = ''; return Foo; }()); +Foo.bar = ''; Foo.prototype.bar = undefined; // Should be OK diff --git a/tests/baselines/reference/typeOfThisInStaticMembers2.js b/tests/baselines/reference/typeOfThisInStaticMembers2.js index b01770446be..886ea04e23d 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers2.js +++ b/tests/baselines/reference/typeOfThisInStaticMembers2.js @@ -11,12 +11,12 @@ class C2 { var C = (function () { function C() { } - C.foo = this; // error return C; }()); +C.foo = this; // error var C2 = (function () { function C2() { } - C2.foo = this; // error return C2; }()); +C2.foo = this; // error diff --git a/tests/baselines/reference/typeQueryOnClass.js b/tests/baselines/reference/typeQueryOnClass.js index 85dff0de831..80623af5be8 100644 --- a/tests/baselines/reference/typeQueryOnClass.js +++ b/tests/baselines/reference/typeQueryOnClass.js @@ -99,10 +99,10 @@ var C = (function () { enumerable: true, configurable: true }); - C.sa = 1; - C.sb = function () { return 1; }; return C; }()); +C.sa = 1; +C.sb = function () { return 1; }; var c; // BUG 820454 var r1; diff --git a/tests/baselines/reference/unqualifiedCallToClassStatic1.js b/tests/baselines/reference/unqualifiedCallToClassStatic1.js index 6c78a737fe8..906e9d3795f 100644 --- a/tests/baselines/reference/unqualifiedCallToClassStatic1.js +++ b/tests/baselines/reference/unqualifiedCallToClassStatic1.js @@ -10,9 +10,9 @@ class Vector { var Vector = (function () { function Vector() { } - Vector.foo = function () { - // 'foo' cannot be called in an unqualified manner. - foo(); - }; return Vector; }()); +Vector.foo = function () { + // 'foo' cannot be called in an unqualified manner. + foo(); +}; diff --git a/tests/baselines/reference/witness.js b/tests/baselines/reference/witness.js index e0a4c356873..56294a7cbb9 100644 --- a/tests/baselines/reference/witness.js +++ b/tests/baselines/reference/witness.js @@ -262,9 +262,9 @@ var c2inst; var C3 = (function () { function C3() { } - C3.q = C3.q; return C3; }()); +C3.q = C3.q; var qq = C3.q; var qq; // Parentheses - tested a bunch above diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index 6f46bb53405..084b2b08eab 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -2,26 +2,26 @@ module ts { describe("Transpile", () => { - + interface TranspileTestSettings { options?: TranspileOptions; expectedOutput?: string; expectedDiagnosticCodes?: number[]; } - + function checkDiagnostics(diagnostics: Diagnostic[], expectedDiagnosticCodes?: number[]) { if(!expectedDiagnosticCodes) { return; } - + for (let i = 0; i < expectedDiagnosticCodes.length; i++) { assert.equal(expectedDiagnosticCodes[i], diagnostics[i] && diagnostics[i].code, `Could not find expeced diagnostic.`); } - assert.equal(diagnostics.length, expectedDiagnosticCodes.length, "Resuting diagnostics count does not match expected"); + assert.equal(diagnostics.length, expectedDiagnosticCodes.length, "Resuting diagnostics count does not match expected"); } - + function test(input: string, testSettings: TranspileTestSettings): void { - + let transpileOptions: TranspileOptions = testSettings.options || {}; if (!transpileOptions.compilerOptions) { transpileOptions.compilerOptions = {}; @@ -30,43 +30,43 @@ module ts { // use \r\n as default new line transpileOptions.compilerOptions.newLine = ts.NewLineKind.CarriageReturnLineFeed; } - - let canUseOldTranspile = !transpileOptions.renamedDependencies; - + + let canUseOldTranspile = !transpileOptions.renamedDependencies; + transpileOptions.reportDiagnostics = true; let transpileModuleResult = transpileModule(input, transpileOptions); - + checkDiagnostics(transpileModuleResult.diagnostics, testSettings.expectedDiagnosticCodes); - + if (testSettings.expectedOutput !== undefined) { assert.equal(transpileModuleResult.outputText, testSettings.expectedOutput); } - + if (canUseOldTranspile) { let diagnostics: Diagnostic[] = []; - let transpileResult = transpile(input, transpileOptions.compilerOptions, transpileOptions.fileName, diagnostics, transpileOptions.moduleName); + let transpileResult = transpile(input, transpileOptions.compilerOptions, transpileOptions.fileName, diagnostics, transpileOptions.moduleName); checkDiagnostics(diagnostics, testSettings.expectedDiagnosticCodes); if (testSettings.expectedOutput) { assert.equal(transpileResult, testSettings.expectedOutput); } } - + // check source maps if (!transpileOptions.compilerOptions) { transpileOptions.compilerOptions = {}; } - + if (!transpileOptions.fileName) { transpileOptions.fileName = transpileOptions.compilerOptions.jsx ? "file.tsx" : "file.ts"; } - + transpileOptions.compilerOptions.sourceMap = true; let transpileModuleResultWithSourceMap = transpileModule(input, transpileOptions); assert.isTrue(transpileModuleResultWithSourceMap.sourceMapText !== undefined); - + let expectedSourceMapFileName = removeFileExtension(getBaseFileName(normalizeSlashes(transpileOptions.fileName))) + ".js.map"; let expectedSourceMappingUrlLine = `//# sourceMappingURL=${expectedSourceMapFileName}`; - + if (testSettings.expectedOutput !== undefined) { assert.equal(transpileModuleResultWithSourceMap.outputText, testSettings.expectedOutput + expectedSourceMappingUrlLine); } @@ -81,10 +81,10 @@ module ts { let suffix = getNewLineCharacter(transpileOptions.compilerOptions) + expectedSourceMappingUrlLine assert.isTrue(output.indexOf(suffix, output.length - suffix.length) !== -1); } - } + } } - + it("Generates correct compilerOptions diagnostics", () => { // Expecting 5047: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." test(`var x = 0;`, { expectedDiagnosticCodes: [5047] }); @@ -97,7 +97,7 @@ module ts { it("Generates no diagnostics for missing file references", () => { test(`/// -var x = 0;`, +var x = 0;`, { options: { compilerOptions: { module: ModuleKind.CommonJS } } }); }); @@ -117,17 +117,17 @@ var x = 0;`, }); it("Generates module output", () => { - test(`var x = 0;`, - { - options: { compilerOptions: { module: ModuleKind.AMD } }, + test(`var x = 0;`, + { + options: { compilerOptions: { module: ModuleKind.AMD } }, expectedOutput: `define(["require", "exports"], function (require, exports) {\r\n "use strict";\r\n var x = 0;\r\n});\r\n` }); }); it("Uses correct newLine character", () => { - test(`var x = 0;`, - { - options: { compilerOptions: { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed } }, + test(`var x = 0;`, + { + options: { compilerOptions: { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed } }, expectedOutput: `"use strict";\nvar x = 0;\n` }); }); @@ -145,9 +145,9 @@ var x = 0;`, ` }\n` + ` }\n` + `});\n`; - test("var x = 1;", - { - options: { compilerOptions: { module: ModuleKind.System, newLine: NewLineKind.LineFeed }, moduleName: "NamedModule" }, + test("var x = 1;", + { + options: { compilerOptions: { module: ModuleKind.System, newLine: NewLineKind.LineFeed }, moduleName: "NamedModule" }, expectedOutput: output }) }); @@ -157,7 +157,7 @@ var x = 0;`, }); it("Rename dependencies - System", () => { - let input = + let input = `import {foo} from "SomeName";\n` + `declare function use(a: any);\n` + `use(foo);` @@ -177,15 +177,15 @@ var x = 0;`, ` }\n` + `});\n` - test(input, - { - options: { compilerOptions: { module: ModuleKind.System, newLine: NewLineKind.LineFeed }, renamedDependencies: { "SomeName": "SomeOtherName" } }, + test(input, + { + options: { compilerOptions: { module: ModuleKind.System, newLine: NewLineKind.LineFeed }, renamedDependencies: { "SomeName": "SomeOtherName" } }, expectedOutput: output }); }); it("Rename dependencies - AMD", () => { - let input = + let input = `import {foo} from "SomeName";\n` + `declare function use(a: any);\n` + `use(foo);` @@ -195,15 +195,15 @@ var x = 0;`, ` use(SomeName_1.foo);\n` + `});\n`; - test(input, - { - options: { compilerOptions: { module: ModuleKind.AMD, newLine: NewLineKind.LineFeed }, renamedDependencies: { "SomeName": "SomeOtherName" } }, + test(input, + { + options: { compilerOptions: { module: ModuleKind.AMD, newLine: NewLineKind.LineFeed }, renamedDependencies: { "SomeName": "SomeOtherName" } }, expectedOutput: output }); }); it("Rename dependencies - UMD", () => { - let input = + let input = `import {foo} from "SomeName";\n` + `declare function use(a: any);\n` + `use(foo);` @@ -221,15 +221,15 @@ var x = 0;`, ` use(SomeName_1.foo);\n` + `});\n`; - test(input, - { - options: { compilerOptions: { module: ModuleKind.UMD, newLine: NewLineKind.LineFeed }, renamedDependencies: { "SomeName": "SomeOtherName" } }, + test(input, + { + options: { compilerOptions: { module: ModuleKind.UMD, newLine: NewLineKind.LineFeed }, renamedDependencies: { "SomeName": "SomeOtherName" } }, expectedOutput: output }); }); - + it("Transpile with emit decorators and emit metadata", () => { - let input = + let input = `import {db} from './db';\n` + `function someDecorator(target) {\n` + ` return target;\n` + @@ -245,26 +245,26 @@ var x = 0;`, `export {MyClass}; \n` let output = `"use strict";\n` + - `var db_1 = require(\'./db\');\n` + + `var db_1 = require(\'./db\');\n` + `function someDecorator(target) {\n` + ` return target;\n` + - `}\n` + - `var MyClass = (function () {\n` + - ` function MyClass(db) {\n` + - ` this.db = db;\n` + - ` this.db.doSomething();\n` + - ` }\n` + - ` MyClass = __decorate([\n` + - ` someDecorator, \n` + - ` __metadata(\'design:paramtypes\', [(typeof (_a = typeof db_1.db !== \'undefined\' && db_1.db) === \'function\' && _a) || Object])\n` + - ` ], MyClass);\n` + - ` return MyClass;\n` + - ` var _a;\n` + - `}());\n` + - `exports.MyClass = MyClass;\n`; + `}\n` + + `var MyClass = (function () {\n` + + ` function MyClass(db) {\n` + + ` this.db = db;\n` + + ` this.db.doSomething();\n` + + ` }\n` + + ` return MyClass;\n` + + `}());\n` + + `MyClass = __decorate([\n` + + ` someDecorator, \n` + + ` __metadata(\'design:paramtypes\', [(typeof (_a = typeof db_1.db !== \'undefined\' && db_1.db) === \'function\' && _a) || Object])\n` + + `], MyClass);\n` + + `exports.MyClass = MyClass;\n` + + `var _a;\n`; - test(input, - { + test(input, + { options: { compilerOptions: { module: ModuleKind.CommonJS, @@ -274,7 +274,7 @@ var x = 0;`, experimentalDecorators: true, target: ScriptTarget.ES5, } - }, + }, expectedOutput: output }); }); @@ -282,7 +282,7 @@ var x = 0;`, it("Supports backslashes in file name", () => { test("var x", { expectedOutput: `"use strict";\r\nvar x;\r\n`, options: { fileName: "a\\b.ts" }}); }); - + it("transpile file as 'tsx' if 'jsx' is specified", () => { let input = `var x =
`; let output = `"use strict";\nvar x = React.createElement("div", null);\n`;