diff --git a/tests/baselines/reference/checkJsxChildrenProperty8.js b/tests/baselines/reference/checkJsxChildrenProperty8.js
index f085c94f5ed..e999b94ea8d 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty8.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty8.js
@@ -46,12 +46,12 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var React = require("react");
+
+
var Button = /** @class */ (function (_super) {
- __extends(Button, _super);
- function Button() {
+ __extends(Button, _super);function Button() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- Button.prototype.render = function () {
+ }Button.prototype.render = function () {
return (My Button
);
};
return Button;
@@ -59,9 +59,11 @@ var Button = /** @class */ (function (_super) {
function AnotherButton(p) {
return Just Another Button
;
}
+
function Comp(p) {
return {p.b}
;
}
+
// OK
var k1 = ;
var k2 =
diff --git a/tests/baselines/reference/checkJsxChildrenProperty9.js b/tests/baselines/reference/checkJsxChildrenProperty9.js
index 017fb3ac41f..cee9e98b8eb 100644
--- a/tests/baselines/reference/checkJsxChildrenProperty9.js
+++ b/tests/baselines/reference/checkJsxChildrenProperty9.js
@@ -10,6 +10,7 @@ let k3 = {1} {"That is a number"}
;
"use strict";
exports.__esModule = true;
var React = require("react");
+
// OK
var k1 =
Hello
world
;
var k2 =
Hello
{function (user) { return {user.name}
; }};
diff --git a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js
index fe0e910f7cb..0e35f45bb52 100644
--- a/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js
+++ b/tests/baselines/reference/checkJsxGenericTagHasCorrectInferences.js
@@ -17,6 +17,7 @@ let d = a.x} />; /
"use strict";
exports.__esModule = true;
var React = require("react");
+
var a = ; // No error
var b = ; // No error - Values should be reinstantiated with `number` (since `object` is a default, not a constraint)
var c = ; // No Error
diff --git a/tests/baselines/reference/checkJsxIntersectionElementPropsType.js b/tests/baselines/reference/checkJsxIntersectionElementPropsType.js
index cbdf2835c0b..e8749cf2ceb 100644
--- a/tests/baselines/reference/checkJsxIntersectionElementPropsType.js
+++ b/tests/baselines/reference/checkJsxIntersectionElementPropsType.js
@@ -27,9 +27,10 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
+
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js
index d1d6dd7eeec..9916e453f33 100644
--- a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js
+++ b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js
@@ -78,12 +78,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
exports.__esModule = true;
///
var React = require("react");
+
+
+
var AsyncLoader = /** @class */ (function (_super) {
- __extends(AsyncLoader, _super);
- function AsyncLoader() {
+ __extends(AsyncLoader, _super);function AsyncLoader() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- AsyncLoader.prototype.render = function () { return null; };
+ }AsyncLoader.prototype.render = function () { return null; };
return AsyncLoader;
}(React.Component));
function load() {
@@ -93,4 +94,5 @@ function load() {
});
});
}
+
var loader = React.createElement(AsyncLoader, { prop1: load, prop2: function (result) { return result; } });
diff --git a/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.js b/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.js
index 65c38ef605b..4c8a1ee95a5 100644
--- a/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.js
+++ b/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.js
@@ -47,18 +47,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
exports.__esModule = true;
exports.HereIsTheError = exports.ComponentWithUnion = void 0;
var react_1 = __importDefault(require("react"));
+
+
+
function ComponentWithUnion(props) {
return react_1["default"].createElement("h1", null);
-}
-exports.ComponentWithUnion = ComponentWithUnion;
+}exports.ComponentWithUnion = ComponentWithUnion;
+
// Usage with React tsx
function HereIsTheError() {
- return (react_1["default"].createElement(ComponentWithUnion, { multi: false, value: 's', onChange: function (val) { return console.log(val); } }));
-}
-exports.HereIsTheError = HereIsTheError;
+ return (
+ react_1["default"].createElement(ComponentWithUnion, { multi: false, value: 's', onChange: function (val) { return console.log(val); } })
+ );
+}exports.HereIsTheError = HereIsTheError;
+
// Usage with pure TypeScript
ComponentWithUnion({
multi: false,
value: 's',
- onChange: function (val) { return console.log(val); } // <- this works fine
+ onChange: function (val) { return console.log(val);
+ } // <- this works fine
});
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js
index e507ddaecc1..3398620d727 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js
@@ -23,14 +23,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Based = /** @class */ (function () {
- function Based() {
- }
+})();var Based = /** @class */ (function () {
+ function Based() {}
return Based;
}());
var Derived = /** @class */ (function (_super) {
__extends(Derived, _super);
+
function Derived() {
var _this = _super.call(this) || this;
_this;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js
index 74a40ba6f29..f397012a9cc 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js
@@ -23,14 +23,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Based = /** @class */ (function () {
- function Based() {
- }
+})();var Based = /** @class */ (function () {
+ function Based() {}
return Based;
}());
var Derived = /** @class */ (function (_super) {
__extends(Derived, _super);
+
function Derived() {
var _this = this;
_this.x = 100;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js
index 199ab08d993..9b14962f3be 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js
@@ -28,14 +28,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Based = /** @class */ (function () {
- function Based() {
- }
+})();var Based = /** @class */ (function () {
+ function Based() {}
return Based;
}());
var Derived = /** @class */ (function (_super) {
__extends(Derived, _super);
+
function Derived() {
var _this = this;
var innver = /** @class */ (function () {
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js
index fcb45365bfc..85cf428f6cc 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js
@@ -32,22 +32,22 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Based = /** @class */ (function () {
- function Based() {
- }
+})();var Based = /** @class */ (function () {
+ function Based() {}
return Based;
}());
var Derived = /** @class */ (function (_super) {
__extends(Derived, _super);
+
function Derived() {
var _this = this;
(function () {
_this; // No error
});
- (function () {
- _this; // No error
- });
+ (
+ function () {
+ _this; // No error
+ });
(function () {
_this; // No error
})();
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js
index c6372d5a436..e4a9713af97 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js
@@ -20,10 +20,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Based = /** @class */ (function () {
- function Based() {
- var arg = [];
+})();var Based = /** @class */ (function () {
+ function Based() {var arg = [];
for (var _i = 0; _i < arguments.length; _i++) {
arg[_i] = arguments[_i];
}
@@ -32,6 +30,7 @@ var Based = /** @class */ (function () {
}());
var Derived = /** @class */ (function (_super) {
__extends(Derived, _super);
+
function Derived() {
var _this = _super.call(this, _this.x) || this;
return _this;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js
index 5e0e9000e7d..d82de22c9f8 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js
@@ -23,10 +23,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
- function Base() {
- var arg = [];
+})();var Base = /** @class */ (function () {
+ function Base() {var arg = [];
for (var _i = 0; _i < arguments.length; _i++) {
arg[_i] = arguments[_i];
}
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js
index 2c32bc82248..336c42825e3 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js
@@ -22,8 +22,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
+})();var Base = /** @class */ (function () {
function Base(func) {
}
return Base;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js
index 74bd178a888..9875e7753b8 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js
@@ -23,10 +23,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
- function Base() {
- var arg = [];
+})();var Base = /** @class */ (function () {
+ function Base() {var arg = [];
for (var _i = 0; _i < arguments.length; _i++) {
arg[_i] = arguments[_i];
}
diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js
index 3cbf473dc85..2273ed1c251 100644
--- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js
+++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.js
@@ -12,10 +12,10 @@ class A {
}
//// [checkSwitchStatementIfCaseTypeIsString.js]
+
var A = /** @class */ (function () {
function A() {
- }
- A.prototype.doIt = function (x) {
+ }A.prototype.doIt = function (x) {
var _this = this;
x.forEach(function (v) {
switch (v) {
diff --git a/tests/baselines/reference/circularConstraintYieldsAppropriateError.js b/tests/baselines/reference/circularConstraintYieldsAppropriateError.js
index 175f48d4bca..fdddf4be6ba 100644
--- a/tests/baselines/reference/circularConstraintYieldsAppropriateError.js
+++ b/tests/baselines/reference/circularConstraintYieldsAppropriateError.js
@@ -38,15 +38,13 @@ var BaseType = /** @class */ (function () {
return BaseType;
}());
var NextType = /** @class */ (function (_super) {
- __extends(NextType, _super);
- function NextType() {
+ __extends(NextType, _super);function NextType() {
return _super !== null && _super.apply(this, arguments) || this;
}
return NextType;
}(BaseType));
var Foo = /** @class */ (function (_super) {
- __extends(Foo, _super);
- function Foo() {
+ __extends(Foo, _super);function Foo() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Foo;
diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js
index 11049041b18..3101562c37a 100644
--- a/tests/baselines/reference/circularImportAlias.js
+++ b/tests/baselines/reference/circularImportAlias.js
@@ -38,8 +38,7 @@ var B;
(function (B) {
B.a = A;
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
@@ -49,8 +48,7 @@ var B;
var A;
(function (A) {
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
A.C = C;
@@ -58,3 +56,5 @@ var A;
})(A || (A = {}));
var c;
var c = new B.a.C();
+
+
diff --git a/tests/baselines/reference/circularIndexedAccessErrors.js b/tests/baselines/reference/circularIndexedAccessErrors.js
index 499d5b483e4..e6c018a20a6 100644
--- a/tests/baselines/reference/circularIndexedAccessErrors.js
+++ b/tests/baselines/reference/circularIndexedAccessErrors.js
@@ -40,7 +40,11 @@ function foo() {
//// [circularIndexedAccessErrors.js]
+
var x2x = x2.x;
+
+
+
var C1 = /** @class */ (function () {
function C1() {
}
@@ -51,6 +55,7 @@ var C2 = /** @class */ (function () {
}
return C2;
}());
+
function foo() {
}
diff --git a/tests/baselines/reference/circularInferredTypeOfVariable.js b/tests/baselines/reference/circularInferredTypeOfVariable.js
index d3e4dd0dc58..15579c109db 100644
--- a/tests/baselines/reference/circularInferredTypeOfVariable.js
+++ b/tests/baselines/reference/circularInferredTypeOfVariable.js
@@ -29,14 +29,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
+
(() => __awaiter(this, void 0, void 0, function* () {
function foo(p) {
return [];
}
+
function bar(p) {
return [];
}
+
let a1 = [];
+
while (true) {
let a2 = foo(a1);
a1 = yield bar(a2);
diff --git a/tests/baselines/reference/circularObjectLiteralAccessors.js b/tests/baselines/reference/circularObjectLiteralAccessors.js
index 34d114268ca..33b07f3db93 100644
--- a/tests/baselines/reference/circularObjectLiteralAccessors.js
+++ b/tests/baselines/reference/circularObjectLiteralAccessors.js
@@ -15,6 +15,7 @@ const a = {
//// [circularObjectLiteralAccessors.js]
// Repro from #6000
+
var a = {
b: {
get foo() {
diff --git a/tests/baselines/reference/circularOptionalityRemoval.js b/tests/baselines/reference/circularOptionalityRemoval.js
index c584c2f3949..54162973a3f 100644
--- a/tests/baselines/reference/circularOptionalityRemoval.js
+++ b/tests/baselines/reference/circularOptionalityRemoval.js
@@ -7,10 +7,7 @@ function fn2(x?: string = someCondition ? 'value1' : x) { }
//// [circularOptionalityRemoval.js]
// Constructed repro
-function fn1(x) {
- if (x === void 0) { x = x > 0 ? x : 0; }
-}
+function fn1(x) {if (x === void 0) { x = x > 0 ? x : 0; }}
+
// Report from user
-function fn2(x) {
- if (x === void 0) { x = someCondition ? 'value1' : x; }
-}
+function fn2(x) {if (x === void 0) { x = someCondition ? 'value1' : x; }}
diff --git a/tests/baselines/reference/circularReferenceInImport.js b/tests/baselines/reference/circularReferenceInImport.js
index 21857922aad..4c01240e1e9 100644
--- a/tests/baselines/reference/circularReferenceInImport.js
+++ b/tests/baselines/reference/circularReferenceInImport.js
@@ -20,8 +20,7 @@ exports.__esModule = true;
exports.foo = void 0;
function foo() {
return new Object();
-}
-exports.foo = foo;
+}exports.foo = foo;
//// [app.d.ts]
diff --git a/tests/baselines/reference/circularTypeAliasForUnionWithClass.js b/tests/baselines/reference/circularTypeAliasForUnionWithClass.js
index 1e2dfee69f8..c821c6ed5f5 100644
--- a/tests/baselines/reference/circularTypeAliasForUnionWithClass.js
+++ b/tests/baselines/reference/circularTypeAliasForUnionWithClass.js
@@ -20,18 +20,21 @@ class I4 {
//// [circularTypeAliasForUnionWithClass.js]
var v0;
+
var I0 = /** @class */ (function () {
function I0() {
}
return I0;
}());
var v3;
+
var I3 = /** @class */ (function () {
function I3() {
}
return I3;
}());
var v4;
+
var I4 = /** @class */ (function () {
function I4() {
}
diff --git a/tests/baselines/reference/circularTypeAliasForUnionWithInterface.js b/tests/baselines/reference/circularTypeAliasForUnionWithInterface.js
index 60f4df9a8b6..6d805dcf777 100644
--- a/tests/baselines/reference/circularTypeAliasForUnionWithInterface.js
+++ b/tests/baselines/reference/circularTypeAliasForUnionWithInterface.js
@@ -32,7 +32,16 @@ interface I4 {
//// [circularTypeAliasForUnionWithInterface.js]
var v0;
+
+
var v1;
+
+
var v2;
+
+
var v3;
+
+
var v4;
+
diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js
index 97dec519a99..cc3be780929 100644
--- a/tests/baselines/reference/circularTypeofWithFunctionModule.js
+++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js
@@ -27,9 +27,9 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
var Foo = /** @class */ (function () {
- function Foo() {
- }
+ function Foo() {}
return Foo;
}());
function maker(value) {
@@ -37,8 +37,7 @@ function maker(value) {
}
(function (maker) {
var Bar = /** @class */ (function (_super) {
- __extends(Bar, _super);
- function Bar() {
+ __extends(Bar, _super);function Bar() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
diff --git a/tests/baselines/reference/circularTypeofWithVarOrFunc.js b/tests/baselines/reference/circularTypeofWithVarOrFunc.js
index 07a95710372..a9654f331df 100644
--- a/tests/baselines/reference/circularTypeofWithVarOrFunc.js
+++ b/tests/baselines/reference/circularTypeofWithVarOrFunc.js
@@ -29,10 +29,21 @@ function f(): R2 { return 0; }
//// [circularTypeofWithVarOrFunc.js]
var varOfAliasedType1;
+
var varOfAliasedType2;
+
+
function func() { return null; }
var varOfAliasedType3 = func();
+
+
+
+
function mul(input) {
return input.a * input.b;
}
+
+
+
+
function f() { return 0; }
diff --git a/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.js b/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.js
index 3117cf0bb18..9f99ad24263 100644
--- a/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.js
+++ b/tests/baselines/reference/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.js
@@ -67,3 +67,4 @@ export type InferableComponentEnhancerWithProps =
//// [circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.js]
"use strict";
exports.__esModule = true;
+
diff --git a/tests/baselines/reference/circularlyReferentialInterfaceAccessNoCrash.js b/tests/baselines/reference/circularlyReferentialInterfaceAccessNoCrash.js
index af94b23a687..93bfec295f5 100644
--- a/tests/baselines/reference/circularlyReferentialInterfaceAccessNoCrash.js
+++ b/tests/baselines/reference/circularlyReferentialInterfaceAccessNoCrash.js
@@ -12,3 +12,5 @@ type TupleElem = [['list', TupleElem[0][0]]];
//// [circularlyReferentialInterfaceAccessNoCrash.js]
+
+
diff --git a/tests/baselines/reference/circularlySimplifyingConditionalTypesNoCrash.js b/tests/baselines/reference/circularlySimplifyingConditionalTypesNoCrash.js
index fdeff927f6b..a88541af5e3 100644
--- a/tests/baselines/reference/circularlySimplifyingConditionalTypesNoCrash.js
+++ b/tests/baselines/reference/circularlySimplifyingConditionalTypesNoCrash.js
@@ -53,7 +53,20 @@ export {};
//// [circularlySimplifyingConditionalTypesNoCrash.js]
"use strict";
exports.__esModule = true;
-var myStoreConnect = function (mapStateToProps, mapDispatchToProps, mergeProps, options) {
+
+
+
+
+var myStoreConnect = function (
+mapStateToProps,
+ mapDispatchToProps,
+ mergeProps,
+ options) {
if (options === void 0) { options = {}; }
- return connect(mapStateToProps, mapDispatchToProps, mergeProps, options);
+ return connect(
+ mapStateToProps,
+ mapDispatchToProps,
+ mergeProps,
+ options);
};
+
diff --git a/tests/baselines/reference/class2.js b/tests/baselines/reference/class2.js
index 22a253bfc19..a2b862abf63 100644
--- a/tests/baselines/reference/class2.js
+++ b/tests/baselines/reference/class2.js
@@ -3,8 +3,7 @@ class foo { constructor() { static f = 3; } }
//// [class2.js]
var foo = /** @class */ (function () {
- function foo() {
- }
+ function foo() {}
foo.f = 3;
return foo;
}());
diff --git a/tests/baselines/reference/classAbstractAsIdentifier.js b/tests/baselines/reference/classAbstractAsIdentifier.js
index c36481d3d73..65fb91afb03 100644
--- a/tests/baselines/reference/classAbstractAsIdentifier.js
+++ b/tests/baselines/reference/classAbstractAsIdentifier.js
@@ -8,8 +8,7 @@ new abstract;
//// [classAbstractAsIdentifier.js]
var abstract = /** @class */ (function () {
function abstract() {
- }
- abstract.prototype.foo = function () { return 1; };
+ }abstract.prototype.foo = function () { return 1; };
return abstract;
}());
new abstract;
diff --git a/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.js b/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.js
index 07a303ea407..ee20e7991b1 100644
--- a/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.js
+++ b/tests/baselines/reference/classAbstractAssignabilityConstructorFunction.js
@@ -10,8 +10,7 @@ AAA = "asdf";
//// [classAbstractAssignabilityConstructorFunction.js]
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
// var AA: typeof A;
diff --git a/tests/baselines/reference/classAbstractClinterfaceAssignability.js b/tests/baselines/reference/classAbstractClinterfaceAssignability.js
index abf4a28b4bb..1a163e2ce90 100644
--- a/tests/baselines/reference/classAbstractClinterfaceAssignability.js
+++ b/tests/baselines/reference/classAbstractClinterfaceAssignability.js
@@ -24,7 +24,10 @@ var AAA: typeof I;
AAA = A;
//// [classAbstractClinterfaceAssignability.js]
+
+
var I;
+
var A = /** @class */ (function () {
function A() {
}
diff --git a/tests/baselines/reference/classAbstractConstructor.js b/tests/baselines/reference/classAbstractConstructor.js
index c1e51be8cb5..ed31175d5ab 100644
--- a/tests/baselines/reference/classAbstractConstructor.js
+++ b/tests/baselines/reference/classAbstractConstructor.js
@@ -5,7 +5,6 @@ abstract class A {
//// [classAbstractConstructor.js]
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js
index b19f6788fed..071a2380e2a 100644
--- a/tests/baselines/reference/classAbstractConstructorAssignability.js
+++ b/tests/baselines/reference/classAbstractConstructorAssignability.js
@@ -26,22 +26,18 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js
index ec0680fe873..ab61a9bfa16 100644
--- a/tests/baselines/reference/classAbstractCrashedOnce.js
+++ b/tests/baselines/reference/classAbstractCrashedOnce.js
@@ -23,18 +23,15 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var foo = /** @class */ (function () {
+})();var foo = /** @class */ (function () {
function foo() {
}
return foo;
}());
var bar = /** @class */ (function (_super) {
- __extends(bar, _super);
- function bar() {
+ __extends(bar, _super);function bar() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- bar.prototype.test = function () {
+ }bar.prototype.test = function () {
this.
;
};
diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js
index 24357c0bdc6..b53b5f2bff6 100644
--- a/tests/baselines/reference/classAbstractExtends.js
+++ b/tests/baselines/reference/classAbstractExtends.js
@@ -28,39 +28,32 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
- }
- A.prototype.foo = function () { };
+ }A.prototype.foo = function () { };
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(B));
var E = /** @class */ (function (_super) {
- __extends(E, _super);
- function E() {
+ __extends(E, _super);function E() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- E.prototype.bar = function () { };
+ }E.prototype.bar = function () { };
return E;
}(B));
diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js
index 002b065c641..d392e35a9f3 100644
--- a/tests/baselines/reference/classAbstractFactoryFunction.js
+++ b/tests/baselines/reference/classAbstractFactoryFunction.js
@@ -29,15 +29,12 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
@@ -45,10 +42,12 @@ var B = /** @class */ (function (_super) {
function NewA(Factory) {
return new A;
}
+
function NewB(Factory) {
return new B;
}
NewA(A);
NewA(B);
+
NewB(A);
NewB(B);
diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js
index e7e77bd47df..4f23f7f9331 100644
--- a/tests/baselines/reference/classAbstractGeneric.js
+++ b/tests/baselines/reference/classAbstractGeneric.js
@@ -38,55 +38,49 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A)); // error -- inherits abstract methods
var D = /** @class */ (function (_super) {
- __extends(D, _super);
+ __extends(D, _super);// error -- inherits abstract methods
function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(A)); // error -- inherits abstract methods
var E = /** @class */ (function (_super) {
- __extends(E, _super);
+ __extends(E, _super);// error -- inherits abstract methods
function E() {
return _super !== null && _super.apply(this, arguments) || this;
- }
+ }// error -- doesn't implement bar
E.prototype.foo = function () { return this.t; };
return E;
}(A));
var F = /** @class */ (function (_super) {
- __extends(F, _super);
- function F() {
+ __extends(F, _super);function F() {
return _super !== null && _super.apply(this, arguments) || this;
- }
+ }// error -- doesn't implement foo
F.prototype.bar = function (t) { };
return F;
}(A));
var G = /** @class */ (function (_super) {
- __extends(G, _super);
- function G() {
+ __extends(G, _super);function G() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- G.prototype.foo = function () { return this.t; };
+ }G.prototype.foo = function () { return this.t; };
G.prototype.bar = function (t) { };
return G;
}(A));
diff --git a/tests/baselines/reference/classAbstractImportInstantiation.js b/tests/baselines/reference/classAbstractImportInstantiation.js
index a12853bbc12..5cf7e19579d 100644
--- a/tests/baselines/reference/classAbstractImportInstantiation.js
+++ b/tests/baselines/reference/classAbstractImportInstantiation.js
@@ -14,8 +14,7 @@ new myA;
var M;
(function (M) {
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
M.A = A;
diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js
index ff2103d78ac..72fa36b0580 100644
--- a/tests/baselines/reference/classAbstractInAModule.js
+++ b/tests/baselines/reference/classAbstractInAModule.js
@@ -24,14 +24,12 @@ var __extends = (this && this.__extends) || (function () {
var M;
(function (M) {
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
M.A = A;
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js
index 478c2f5979d..026671a2803 100644
--- a/tests/baselines/reference/classAbstractInheritance.js
+++ b/tests/baselines/reference/classAbstractInheritance.js
@@ -34,22 +34,18 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
@@ -60,43 +56,37 @@ var AA = /** @class */ (function () {
return AA;
}());
var BB = /** @class */ (function (_super) {
- __extends(BB, _super);
- function BB() {
+ __extends(BB, _super);function BB() {
return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(AA));
var CC = /** @class */ (function (_super) {
- __extends(CC, _super);
- function CC() {
+ __extends(CC, _super);function CC() {
return _super !== null && _super.apply(this, arguments) || this;
}
return CC;
}(AA));
var DD = /** @class */ (function (_super) {
- __extends(DD, _super);
- function DD() {
+ __extends(DD, _super);function DD() {
return _super !== null && _super.apply(this, arguments) || this;
}
return DD;
}(BB));
var EE = /** @class */ (function (_super) {
- __extends(EE, _super);
- function EE() {
+ __extends(EE, _super);function EE() {
return _super !== null && _super.apply(this, arguments) || this;
}
return EE;
}(BB));
var FF = /** @class */ (function (_super) {
- __extends(FF, _super);
- function FF() {
+ __extends(FF, _super);function FF() {
return _super !== null && _super.apply(this, arguments) || this;
}
return FF;
}(CC));
var GG = /** @class */ (function (_super) {
- __extends(GG, _super);
- function GG() {
+ __extends(GG, _super);function GG() {
return _super !== null && _super.apply(this, arguments) || this;
}
return GG;
diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js
index fc3a2448346..5c1cd4f0661 100644
--- a/tests/baselines/reference/classAbstractInstantiations1.js
+++ b/tests/baselines/reference/classAbstractInstantiations1.js
@@ -40,21 +40,19 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js
index 4beafc415f7..f8a73b14e1c 100644
--- a/tests/baselines/reference/classAbstractInstantiations2.js
+++ b/tests/baselines/reference/classAbstractInstantiations2.js
@@ -64,16 +64,14 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
}
return A;
}());
var B = /** @class */ (function () {
function B() {
- }
- B.prototype.foo = function () { return this.bar(); };
+ }B.prototype.foo = function () { return this.bar(); };
return B;
}());
new B; // error
@@ -83,38 +81,37 @@ new AA;
function constructB(Factory) {
new Factory; // error -- Factory is of type typeof B.
}
+
var BB = B;
new BB; // error -- BB is of type typeof B.
var x = C;
new x; // okay -- undefined behavior at runtime
var C = /** @class */ (function (_super) {
- __extends(C, _super);
+ __extends(C, _super);// okay -- undefined behavior at runtime
function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B)); // error -- not declared abstract
var D = /** @class */ (function (_super) {
- __extends(D, _super);
+ __extends(D, _super);// error -- not declared abstract
function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(B)); // okay
var E = /** @class */ (function (_super) {
- __extends(E, _super);
+ __extends(E, _super);// okay
function E() {
return _super !== null && _super.apply(this, arguments) || this;
- }
+ }// okay -- implements abstract method
E.prototype.bar = function () { return 1; };
return E;
}(B));
var F = /** @class */ (function (_super) {
- __extends(F, _super);
- function F() {
+ __extends(F, _super);function F() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- F.prototype.bar = function () { return 2; };
+ }F.prototype.bar = function () { return 2; };
return F;
}(B));
var G = /** @class */ (function () {
diff --git a/tests/baselines/reference/classAbstractManyKeywords.js b/tests/baselines/reference/classAbstractManyKeywords.js
index 7f197497f7c..f2e60a3ce5e 100644
--- a/tests/baselines/reference/classAbstractManyKeywords.js
+++ b/tests/baselines/reference/classAbstractManyKeywords.js
@@ -9,24 +9,19 @@ import abstract class D {}
exports.__esModule = true;
exports.B = void 0;
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
exports["default"] = A;
var B = /** @class */ (function () {
- function B() {
- }
+ function B() {}
return B;
-}());
-exports.B = B;
+}());exports.B = B;
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var D = /** @class */ (function () {
- function D() {
- }
+ function D() {}
return D;
}());
diff --git a/tests/baselines/reference/classAbstractMergedDeclaration.js b/tests/baselines/reference/classAbstractMergedDeclaration.js
index 75fa7cb1ffb..60e3917bca4 100644
--- a/tests/baselines/reference/classAbstractMergedDeclaration.js
+++ b/tests/baselines/reference/classAbstractMergedDeclaration.js
@@ -42,45 +42,42 @@ new DCC2;
//// [classAbstractMergedDeclaration.js]
var CM = /** @class */ (function () {
- function CM() {
- }
+ function CM() {}
return CM;
}());
+
var MC = /** @class */ (function () {
- function MC() {
- }
+ function MC() {}
return MC;
}());
var CI = /** @class */ (function () {
- function CI() {
- }
+ function CI() {}
return CI;
}());
+
var IC = /** @class */ (function () {
- function IC() {
- }
+ function IC() {}
return IC;
}());
var CC1 = /** @class */ (function () {
- function CC1() {
- }
+ function CC1() {}
return CC1;
}());
var CC1 = /** @class */ (function () {
- function CC1() {
- }
+ function CC1() {}
return CC1;
}());
var CC2 = /** @class */ (function () {
- function CC2() {
- }
+ function CC2() {}
return CC2;
}());
var CC2 = /** @class */ (function () {
- function CC2() {
- }
+ function CC2() {}
return CC2;
}());
+
+
+
new CM;
new MC;
new CI;
diff --git a/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js b/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js
index aa2197b1ed5..2b75876e3d8 100644
--- a/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js
+++ b/tests/baselines/reference/classAbstractMethodInNonAbstractClass.js
@@ -15,7 +15,6 @@ var A = /** @class */ (function () {
}());
var B = /** @class */ (function () {
function B() {
- }
- B.prototype.foo = function () { };
+ }B.prototype.foo = function () { };
return B;
}());
diff --git a/tests/baselines/reference/classAbstractMethodWithImplementation.js b/tests/baselines/reference/classAbstractMethodWithImplementation.js
index 7debbdb83d8..8c78fa82b2b 100644
--- a/tests/baselines/reference/classAbstractMethodWithImplementation.js
+++ b/tests/baselines/reference/classAbstractMethodWithImplementation.js
@@ -6,7 +6,6 @@ abstract class A {
//// [classAbstractMethodWithImplementation.js]
var A = /** @class */ (function () {
function A() {
- }
- A.prototype.foo = function () { };
+ }A.prototype.foo = function () { };
return A;
}());
diff --git a/tests/baselines/reference/classAbstractOverloads.js b/tests/baselines/reference/classAbstractOverloads.js
index 1f0368a2c84..8e441208aa7 100644
--- a/tests/baselines/reference/classAbstractOverloads.js
+++ b/tests/baselines/reference/classAbstractOverloads.js
@@ -27,8 +27,7 @@ abstract class B {
//// [classAbstractOverloads.js]
var A = /** @class */ (function () {
function A() {
- }
- A.prototype.baz = function () { };
+ }A.prototype.baz = function () { };
return A;
}());
var B = /** @class */ (function () {
diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js
index 1765b8958c8..d11df58c39e 100644
--- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js
+++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js
@@ -36,46 +36,38 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
- }
- A.prototype.foo = function () { };
+ }A.prototype.foo = function () { };
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var AA = /** @class */ (function () {
function AA() {
- }
- AA.prototype.foo = function () { };
+ }AA.prototype.foo = function () { };
return AA;
}());
var BB = /** @class */ (function (_super) {
- __extends(BB, _super);
- function BB() {
+ __extends(BB, _super);function BB() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- BB.prototype.bar = function () { };
+ }BB.prototype.bar = function () { };
return BB;
}(AA));
var CC = /** @class */ (function (_super) {
- __extends(CC, _super);
- function CC() {
+ __extends(CC, _super);function CC() {
return _super !== null && _super.apply(this, arguments) || this;
}
return CC;
}(BB)); // error
var DD = /** @class */ (function (_super) {
- __extends(DD, _super);
+ __extends(DD, _super);// error
function DD() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- DD.prototype.foo = function () { };
+ }DD.prototype.foo = function () { };
return DD;
}(BB));
diff --git a/tests/baselines/reference/classAbstractSingleLineDecl.js b/tests/baselines/reference/classAbstractSingleLineDecl.js
index aef23d55ba6..c525b13f459 100644
--- a/tests/baselines/reference/classAbstractSingleLineDecl.js
+++ b/tests/baselines/reference/classAbstractSingleLineDecl.js
@@ -14,20 +14,17 @@ new C;
//// [classAbstractSingleLineDecl.js]
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
abstract;
var B = /** @class */ (function () {
- function B() {
- }
+ function B() {}
return B;
}());
abstract;
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
new A;
diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js
index f812c4425a8..161f8874bbe 100644
--- a/tests/baselines/reference/classAbstractSuperCalls.js
+++ b/tests/baselines/reference/classAbstractSuperCalls.js
@@ -39,42 +39,34 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
- }
- A.prototype.foo = function () { return 1; };
+ }A.prototype.foo = function () { return 1; };
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- B.prototype.bar = function () { _super.prototype.foo.call(this); };
+ }B.prototype.bar = function () { _super.prototype.foo.call(this); };
B.prototype.baz = function () { return this.foo; };
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- C.prototype.foo = function () { return 2; };
+ }C.prototype.foo = function () { return 2; };
C.prototype.qux = function () { return _super.prototype.foo.call(this) || _super.prototype.foo; }; // 2 errors, foo is abstract
C.prototype.norf = function () { return _super.prototype.bar.call(this); };
return C;
}(B));
var AA = /** @class */ (function () {
function AA() {
- }
- AA.prototype.foo = function () { return 1; };
+ }AA.prototype.foo = function () { return 1; };
AA.prototype.bar = function () { return this.foo(); };
return AA;
}());
var BB = /** @class */ (function (_super) {
- __extends(BB, _super);
- function BB() {
+ __extends(BB, _super);function BB() {
return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js
index 9f855223f17..7eaa364a0ff 100644
--- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js
+++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js
@@ -30,28 +30,25 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- B.prototype.foo = function () { return 1; };
+ }B.prototype.foo = function () { return 1; };
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
var a = new B;
a.foo();
+
a = new C; // error, cannot instantiate abstract class.
a.foo();
diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js
index 0a8e4893496..5bba4348057 100644
--- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js
+++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js
@@ -40,40 +40,33 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- D.prototype.foo = function () { };
+ }D.prototype.foo = function () { };
return D;
}(A));
var E = /** @class */ (function (_super) {
- __extends(E, _super);
- function E() {
+ __extends(E, _super);function E() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- E.prototype.foo = function () { };
+ }E.prototype.foo = function () { };
return E;
}(A));
var AA = /** @class */ (function () {
@@ -82,24 +75,20 @@ var AA = /** @class */ (function () {
return AA;
}());
var BB = /** @class */ (function (_super) {
- __extends(BB, _super);
- function BB() {
+ __extends(BB, _super);function BB() {
return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(AA));
var CC = /** @class */ (function (_super) {
- __extends(CC, _super);
- function CC() {
+ __extends(CC, _super);function CC() {
return _super !== null && _super.apply(this, arguments) || this;
}
return CC;
}(AA));
var DD = /** @class */ (function (_super) {
- __extends(DD, _super);
- function DD() {
+ __extends(DD, _super);function DD() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- DD.prototype.foo = function () { };
+ }DD.prototype.foo = function () { };
return DD;
}(AA));
diff --git a/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.js b/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.js
index 07b425383f4..271f91e79c4 100644
--- a/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.js
+++ b/tests/baselines/reference/classAndInterfaceMergeConflictingMembers.js
@@ -24,3 +24,8 @@ interface C3 {
}
//// [classAndInterfaceMergeConflictingMembers.js]
+
+
+
+
+
diff --git a/tests/baselines/reference/classAndInterfaceWithSameName.js b/tests/baselines/reference/classAndInterfaceWithSameName.js
index 964cd8cd322..7363886b6f9 100644
--- a/tests/baselines/reference/classAndInterfaceWithSameName.js
+++ b/tests/baselines/reference/classAndInterfaceWithSameName.js
@@ -14,8 +14,7 @@ module M {
//// [classAndInterfaceWithSameName.js]
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var M;
diff --git a/tests/baselines/reference/classAndVariableWithSameName.js b/tests/baselines/reference/classAndVariableWithSameName.js
index 8ceaa91a73d..0d32ae48be4 100644
--- a/tests/baselines/reference/classAndVariableWithSameName.js
+++ b/tests/baselines/reference/classAndVariableWithSameName.js
@@ -12,8 +12,7 @@ module M {
//// [classAndVariableWithSameName.js]
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}()); // error
var C = ''; // error
diff --git a/tests/baselines/reference/classAppearsToHaveMembersOfObject.js b/tests/baselines/reference/classAppearsToHaveMembersOfObject.js
index e3fe521bba0..4828622b530 100644
--- a/tests/baselines/reference/classAppearsToHaveMembersOfObject.js
+++ b/tests/baselines/reference/classAppearsToHaveMembersOfObject.js
@@ -10,8 +10,7 @@ var o2: {} = c;
//// [classAppearsToHaveMembersOfObject.js]
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var c;
diff --git a/tests/baselines/reference/classBlockScoping.js b/tests/baselines/reference/classBlockScoping.js
index ee3d9163b5e..e7b4e11f36a 100644
--- a/tests/baselines/reference/classBlockScoping.js
+++ b/tests/baselines/reference/classBlockScoping.js
@@ -40,10 +40,10 @@ function f(b) {
if (b) {
Foo = (_a = /** @class */ (function () {
function Foo() {
- }
- Foo.x = function () {
+ }Foo.x = function () {
new Foo();
};
+
Foo.prototype.m = function () {
new Foo();
};
@@ -56,10 +56,10 @@ function f(b) {
else {
var Foo_1 = /** @class */ (function () {
function Foo() {
- }
- Foo.x = function () {
+ }Foo.x = function () {
new Foo();
};
+
Foo.prototype.m = function () {
new Foo();
};
diff --git a/tests/baselines/reference/classBodyWithStatements.js b/tests/baselines/reference/classBodyWithStatements.js
index 24eee708966..8f02ab8a609 100644
--- a/tests/baselines/reference/classBodyWithStatements.js
+++ b/tests/baselines/reference/classBodyWithStatements.js
@@ -15,14 +15,14 @@ class C3 {
//// [classBodyWithStatements.js]
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var x = 1;
+
+
var C2 = /** @class */ (function () {
- function C2() {
- }
+ function C2() {}
return C2;
}());
function foo() { }
diff --git a/tests/baselines/reference/classCannotExtendVar.js b/tests/baselines/reference/classCannotExtendVar.js
index c242c99902f..ff4a0209029 100644
--- a/tests/baselines/reference/classCannotExtendVar.js
+++ b/tests/baselines/reference/classCannotExtendVar.js
@@ -9,6 +9,7 @@ class Markup {
//// [classCannotExtendVar.js]
var Markup;
+
var Markup = /** @class */ (function () {
function Markup() {
}
diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js
index 1868df64fd8..adbdba597e3 100644
--- a/tests/baselines/reference/classConstructorAccessibility2.js
+++ b/tests/baselines/reference/classConstructorAccessibility2.js
@@ -58,8 +58,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var BaseA = /** @class */ (function () {
+})();var BaseA = /** @class */ (function () {
function BaseA(x) {
this.x = x;
}
@@ -120,6 +119,7 @@ var DerivedC = /** @class */ (function (_super) {
var ba = new BaseA(1);
var bb = new BaseB(1); // error
var bc = new BaseC(1); // error
+
var da = new DerivedA(1);
var db = new DerivedB(1);
var dc = new DerivedC(1);
diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js
index 412f4f95bca..e02763fb62a 100644
--- a/tests/baselines/reference/classConstructorAccessibility4.js
+++ b/tests/baselines/reference/classConstructorAccessibility4.js
@@ -42,22 +42,19 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
+
A.prototype.method = function () {
var B = /** @class */ (function () {
function B() {
- }
- B.prototype.method = function () {
+ }B.prototype.method = function () {
new A(); // OK
};
return B;
}());
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
@@ -66,20 +63,18 @@ var A = /** @class */ (function () {
return A;
}());
var D = /** @class */ (function () {
- function D() {
- }
+ function D() {}
+
D.prototype.method = function () {
var E = /** @class */ (function () {
function E() {
- }
- E.prototype.method = function () {
+ }E.prototype.method = function () {
new D(); // OK
};
return E;
}());
var F = /** @class */ (function (_super) {
- __extends(F, _super);
- function F() {
+ __extends(F, _super);function F() {
return _super !== null && _super.apply(this, arguments) || this;
}
return F;
diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js
index ec950634e11..fb5534010df 100644
--- a/tests/baselines/reference/classConstructorAccessibility5.js
+++ b/tests/baselines/reference/classConstructorAccessibility5.js
@@ -24,23 +24,18 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
- function Base() {
- }
+})();var Base = /** @class */ (function () {
+ function Base() {}
return Base;
}());
var Derived = /** @class */ (function (_super) {
- __extends(Derived, _super);
- function Derived() {
+ __extends(Derived, _super);function Derived() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- Derived.make = function () { new Base(); }; // ok
+ }Derived.make = function () { new Base(); }; // ok
return Derived;
}(Base));
var Unrelated = /** @class */ (function () {
function Unrelated() {
- }
- Unrelated.fake = function () { new Base(); }; // error
+ }Unrelated.fake = function () { new Base(); }; // error
return Unrelated;
}());
diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js
index 2bb0f49a481..9aec47ecef2 100644
--- a/tests/baselines/reference/classConstructorParametersAccessibility.js
+++ b/tests/baselines/reference/classConstructorParametersAccessibility.js
@@ -39,8 +39,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C1 = /** @class */ (function () {
+})();var C1 = /** @class */ (function () {
function C1(x) {
this.x = x;
}
diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js
index de647fc282a..a3407490031 100644
--- a/tests/baselines/reference/classConstructorParametersAccessibility2.js
+++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js
@@ -39,8 +39,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C1 = /** @class */ (function () {
+})();var C1 = /** @class */ (function () {
function C1(x) {
this.x = x;
}
diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js
index bf034cde19b..c0205459d77 100644
--- a/tests/baselines/reference/classConstructorParametersAccessibility3.js
+++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js
@@ -26,8 +26,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
+})();var Base = /** @class */ (function () {
function Base(p) {
this.p = p;
}
diff --git a/tests/baselines/reference/classDeclarationBlockScoping2.js b/tests/baselines/reference/classDeclarationBlockScoping2.js
index 7d62392e19b..20264418b68 100644
--- a/tests/baselines/reference/classDeclarationBlockScoping2.js
+++ b/tests/baselines/reference/classDeclarationBlockScoping2.js
@@ -12,15 +12,13 @@ function f() {
//// [classDeclarationBlockScoping2.js]
function f() {
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var c1 = C;
{
var C_1 = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var c2 = C_1;
diff --git a/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js b/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js
index 56bf38145a0..ef7a5e50027 100644
--- a/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js
+++ b/tests/baselines/reference/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js
@@ -9,7 +9,6 @@ function f() {
new C2(); // OK
}
var C2 = /** @class */ (function () {
- function C2() {
- }
+ function C2() {}
return C2;
}());
diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js
index 53ed374116f..44651370ba1 100644
--- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js
+++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js
@@ -28,8 +28,7 @@ var __extends = (this && this.__extends) || (function () {
var M;
(function (M) {
var N = /** @class */ (function () {
- function N() {
- }
+ function N() {}
return N;
}());
M.N = N;
@@ -39,8 +38,7 @@ var M;
})(M || (M = {}));
(function (M) {
var O = /** @class */ (function (_super) {
- __extends(O, _super);
- function O() {
+ __extends(O, _super);function O() {
return _super !== null && _super.apply(this, arguments) || this;
}
return O;
diff --git a/tests/baselines/reference/classDeclarationShouldBeOutOfScopeInComputedNames.js b/tests/baselines/reference/classDeclarationShouldBeOutOfScopeInComputedNames.js
index 5367ef781a5..6150666a757 100644
--- a/tests/baselines/reference/classDeclarationShouldBeOutOfScopeInComputedNames.js
+++ b/tests/baselines/reference/classDeclarationShouldBeOutOfScopeInComputedNames.js
@@ -14,9 +14,7 @@ class A {
var A = /** @class */ (function () {
function A() {
this[_b] = 0;
- }
- A[(_a = A.p1, A.p2)] = function () { return 0; };
- ;
+ }A[(_a = A.p1, A.p2)] = function () { return 0; };;
A.prototype[A.p1] = function () { };
var _a, _b;
_b = A.p2;
diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js
index 78fee53c66c..12f0651fa76 100644
--- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js
+++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js
@@ -23,7 +23,7 @@ var __extends = (this && this.__extends) || (function () {
})();
// Should be OK due to hoisting
var Derived = /** @class */ (function (_super) {
- __extends(Derived, _super);
+ __extends(Derived, _super);// Should be OK due to hoisting
function Derived() {
return _super !== null && _super.apply(this, arguments) || this;
}
@@ -31,8 +31,7 @@ var Derived = /** @class */ (function (_super) {
}(makeBaseClass()));
function makeBaseClass() {
return /** @class */ (function () {
- function Base() {
- }
+ function Base() {}
return Base;
}());
}
diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js
index 0a3e6698f3c..3bf3b4b96f9 100644
--- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js
+++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js
@@ -32,8 +32,7 @@ var StringTreeCollectionBase = /** @class */ (function () {
return StringTreeCollectionBase;
}());
var StringTreeCollection = /** @class */ (function (_super) {
- __extends(StringTreeCollection, _super);
- function StringTreeCollection() {
+ __extends(StringTreeCollection, _super);function StringTreeCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
return StringTreeCollection;
diff --git a/tests/baselines/reference/classExpression.js b/tests/baselines/reference/classExpression.js
index 8764060eabf..2f14b2cd8aa 100644
--- a/tests/baselines/reference/classExpression.js
+++ b/tests/baselines/reference/classExpression.js
@@ -17,19 +17,25 @@ var x = /** @class */ (function () {
function C() {
}
return C;
-}());
+}())
+
+;
+
var y = {
foo: /** @class */ (function () {
function C2() {
}
return C2;
}())
-};
+}
+
+;
var M;
(function (M) {
var z = /** @class */ (function () {
function C4() {
}
return C4;
- }());
+ }())
+ ;
})(M || (M = {}));
diff --git a/tests/baselines/reference/classExpression1.js b/tests/baselines/reference/classExpression1.js
index 6dc9dd9d2c2..037c20e4284 100644
--- a/tests/baselines/reference/classExpression1.js
+++ b/tests/baselines/reference/classExpression1.js
@@ -3,7 +3,6 @@ var v = class C {};
//// [classExpression1.js]
var v = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js
index 3ad11c2b731..369d58dba24 100644
--- a/tests/baselines/reference/classExpression2.js
+++ b/tests/baselines/reference/classExpression2.js
@@ -15,15 +15,12 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var D = /** @class */ (function () {
- function D() {
- }
+})();var D = /** @class */ (function () {
+ function D() {}
return D;
}());
var v = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js
index a87515f3f2f..fc237b0fa60 100644
--- a/tests/baselines/reference/classExpression3.js
+++ b/tests/baselines/reference/classExpression3.js
@@ -19,18 +19,15 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
- __extends(class_1, _super);
- function class_1() {
+})();var C = /** @class */ (function (_super) {
+ __extends(class_1, _super);function class_1() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.c = 3;
return _this;
}
return class_1;
}(/** @class */ (function (_super) {
- __extends(class_2, _super);
- function class_2() {
+ __extends(class_2, _super);function class_2() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.b = 2;
return _this;
diff --git a/tests/baselines/reference/classExpression4.js b/tests/baselines/reference/classExpression4.js
index c8af94883ce..1c5ac6da3e8 100644
--- a/tests/baselines/reference/classExpression4.js
+++ b/tests/baselines/reference/classExpression4.js
@@ -10,8 +10,7 @@ let x = (new C).foo();
//// [classExpression4.js]
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.foo = function () {
+ }C.prototype.foo = function () {
return new C();
};
return C;
diff --git a/tests/baselines/reference/classExpression5.js b/tests/baselines/reference/classExpression5.js
index c9c78d7df52..ee3fe41b2f2 100644
--- a/tests/baselines/reference/classExpression5.js
+++ b/tests/baselines/reference/classExpression5.js
@@ -8,8 +8,7 @@ new class {
//// [classExpression5.js]
new /** @class */ (function () {
function class_1() {
- }
- class_1.prototype.hi = function () {
+ }class_1.prototype.hi = function () {
return "Hi!";
};
return class_1;
diff --git a/tests/baselines/reference/classExpressionES61.js b/tests/baselines/reference/classExpressionES61.js
index eaf013acbaf..d591706ff46 100644
--- a/tests/baselines/reference/classExpressionES61.js
+++ b/tests/baselines/reference/classExpressionES61.js
@@ -2,5 +2,4 @@
var v = class C {};
//// [classExpressionES61.js]
-var v = class C {
-};
+var v = class C {};
diff --git a/tests/baselines/reference/classExpressionES62.js b/tests/baselines/reference/classExpressionES62.js
index 620d86c6de2..8316002c325 100644
--- a/tests/baselines/reference/classExpressionES62.js
+++ b/tests/baselines/reference/classExpressionES62.js
@@ -3,7 +3,5 @@ class D { }
var v = class C extends D {};
//// [classExpressionES62.js]
-class D {
-}
-var v = class C extends D {
-};
+class D {}
+var v = class C extends D {};
diff --git a/tests/baselines/reference/classExpressionES63.js b/tests/baselines/reference/classExpressionES63.js
index 66d5bc4de4c..4e43efcb282 100644
--- a/tests/baselines/reference/classExpressionES63.js
+++ b/tests/baselines/reference/classExpressionES63.js
@@ -7,21 +7,15 @@ c.c;
//// [classExpressionES63.js]
-let C = class extends class extends class {
- constructor() {
+let C = class extends class extends class {constructor() {
this.a = 1;
- }
-} {
- constructor() {
+ }} {constructor() {
super(...arguments);
this.b = 2;
- }
-} {
- constructor() {
+ }} {constructor() {
super(...arguments);
this.c = 3;
- }
-};
+ }};
let c = new C();
c.a;
c.b;
diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js
index fe8e4ce19df..e15e06ced87 100644
--- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js
+++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js
@@ -21,16 +21,15 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
}
return A;
}());
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
+
diff --git a/tests/baselines/reference/classExpressionInClassStaticDeclarations.js b/tests/baselines/reference/classExpressionInClassStaticDeclarations.js
index cb635f9eee2..a85509f9d22 100644
--- a/tests/baselines/reference/classExpressionInClassStaticDeclarations.js
+++ b/tests/baselines/reference/classExpressionInClassStaticDeclarations.js
@@ -21,8 +21,7 @@ var C = /** @class */ (function () {
function C() {
}
C.D = /** @class */ (function (_super) {
- __extends(class_1, _super);
- function class_1() {
+ __extends(class_1, _super);function class_1() {
return _super !== null && _super.apply(this, arguments) || this;
}
return class_1;
diff --git a/tests/baselines/reference/classExpressionTest1.js b/tests/baselines/reference/classExpressionTest1.js
index 4589365f83b..7df4c0fee6a 100644
--- a/tests/baselines/reference/classExpressionTest1.js
+++ b/tests/baselines/reference/classExpressionTest1.js
@@ -16,8 +16,7 @@ function M() {
function M() {
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.f = function () {
+ }C.prototype.f = function () {
var t;
var x;
return { t: t, x: x };
diff --git a/tests/baselines/reference/classExpressionTest2.js b/tests/baselines/reference/classExpressionTest2.js
index 3c9faee6c30..4b197ce42cc 100644
--- a/tests/baselines/reference/classExpressionTest2.js
+++ b/tests/baselines/reference/classExpressionTest2.js
@@ -16,14 +16,16 @@ function M() {
function M() {
var m = /** @class */ (function () {
function C() {
- }
- C.prototype.f = function () {
+ }C.prototype.f = function () {
var t;
var x;
return { t: t, x: x };
};
return C;
- }());
+ }())
+
+ ;
+
var v = new m();
return v.f();
}
diff --git a/tests/baselines/reference/classExpressionWithDecorator1.js b/tests/baselines/reference/classExpressionWithDecorator1.js
index e96bc7d46d2..a106f080152 100644
--- a/tests/baselines/reference/classExpressionWithDecorator1.js
+++ b/tests/baselines/reference/classExpressionWithDecorator1.js
@@ -7,11 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var v = ;
+};var v = ;
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
C.p = 1;
C = __decorate([
decorate
diff --git a/tests/baselines/reference/classExpressionWithResolutionOfNamespaceOfSameName01.js b/tests/baselines/reference/classExpressionWithResolutionOfNamespaceOfSameName01.js
index 841f7ecbb69..e7c9173b9fa 100644
--- a/tests/baselines/reference/classExpressionWithResolutionOfNamespaceOfSameName01.js
+++ b/tests/baselines/reference/classExpressionWithResolutionOfNamespaceOfSameName01.js
@@ -9,6 +9,7 @@ var x = class C {
}
//// [classExpressionWithResolutionOfNamespaceOfSameName01.js]
+
var x = /** @class */ (function () {
function C() {
}
diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES64.js b/tests/baselines/reference/classExpressionWithStaticPropertiesES64.js
index 5567d7e7cee..3186c7a4e4a 100644
--- a/tests/baselines/reference/classExpressionWithStaticPropertiesES64.js
+++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES64.js
@@ -4,7 +4,6 @@
//// [classExpressionWithStaticPropertiesES64.js]
var _a;
-(_a = class {
- },
+(_a = class {},
_a.x = 0,
_a);
diff --git a/tests/baselines/reference/classExpressions.js b/tests/baselines/reference/classExpressions.js
index 0db1111e2aa..17e6eb3855d 100644
--- a/tests/baselines/reference/classExpressions.js
+++ b/tests/baselines/reference/classExpressions.js
@@ -13,8 +13,7 @@ var x = /** @class */ (function () {
function B() {
this.func = function () {
};
- }
- B.prototype.onStart = function () {
+ }B.prototype.onStart = function () {
};
return B;
}());
diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js
index 8d2c2dfdd31..d7ea5f43835 100644
--- a/tests/baselines/reference/classExtendingBuiltinType.js
+++ b/tests/baselines/reference/classExtendingBuiltinType.js
@@ -24,73 +24,62 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C1 = /** @class */ (function (_super) {
- __extends(C1, _super);
- function C1() {
+})();var C1 = /** @class */ (function (_super) {
+ __extends(C1, _super);function C1() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C1;
}(Object));
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(Function));
var C3 = /** @class */ (function (_super) {
- __extends(C3, _super);
- function C3() {
+ __extends(C3, _super);function C3() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(String));
var C4 = /** @class */ (function (_super) {
- __extends(C4, _super);
- function C4() {
+ __extends(C4, _super);function C4() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(Boolean));
var C5 = /** @class */ (function (_super) {
- __extends(C5, _super);
- function C5() {
+ __extends(C5, _super);function C5() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(Number));
var C6 = /** @class */ (function (_super) {
- __extends(C6, _super);
- function C6() {
+ __extends(C6, _super);function C6() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(Date));
var C7 = /** @class */ (function (_super) {
- __extends(C7, _super);
- function C7() {
+ __extends(C7, _super);function C7() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
}(RegExp));
var C8 = /** @class */ (function (_super) {
- __extends(C8, _super);
- function C8() {
+ __extends(C8, _super);function C8() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C8;
}(Error));
var C9 = /** @class */ (function (_super) {
- __extends(C9, _super);
- function C9() {
+ __extends(C9, _super);function C9() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C9;
}(Array));
var C10 = /** @class */ (function (_super) {
- __extends(C10, _super);
- function C10() {
+ __extends(C10, _super);function C10() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C10;
diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js
index cd462784c4f..de84ef74408 100644
--- a/tests/baselines/reference/classExtendingClass.js
+++ b/tests/baselines/reference/classExtendingClass.js
@@ -44,17 +44,14 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function () {
+})();var C = /** @class */ (function () {
function C() {
- }
- C.prototype.thing = function () { };
+ }C.prototype.thing = function () { };
C.other = function () { };
return C;
}());
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
@@ -64,16 +61,15 @@ var r = d.foo;
var r2 = d.bar;
var r3 = d.thing();
var r4 = D.other();
+
var C2 = /** @class */ (function () {
function C2() {
- }
- C2.prototype.thing = function (x) { };
+ }C2.prototype.thing = function (x) { };
C2.other = function (x) { };
return C2;
}());
var D2 = /** @class */ (function (_super) {
- __extends(D2, _super);
- function D2() {
+ __extends(D2, _super);function D2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js
index 016454073ec..557ab03f2f7 100644
--- a/tests/baselines/reference/classExtendingClassLikeType.js
+++ b/tests/baselines/reference/classExtendingClassLikeType.js
@@ -72,14 +72,16 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
// Error, no Base constructor function
var D0 = /** @class */ (function (_super) {
- __extends(D0, _super);
- function D0() {
+ __extends(D0, _super);function D0() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D0;
}(Base));
+
+
var D1 = /** @class */ (function (_super) {
__extends(D1, _super);
function D1() {
@@ -113,16 +115,16 @@ var D3 = /** @class */ (function (_super) {
}(getBase()));
// Error, no constructors with three type arguments
var D4 = /** @class */ (function (_super) {
- __extends(D4, _super);
- function D4() {
+ __extends(D4, _super);function D4() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D4;
}(getBase()));
+
+
// Error, constructor return types differ
var D5 = /** @class */ (function (_super) {
- __extends(D5, _super);
- function D5() {
+ __extends(D5, _super);function D5() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D5;
diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js
index c83ea16696e..4be68e56c1b 100644
--- a/tests/baselines/reference/classExtendingNonConstructor.js
+++ b/tests/baselines/reference/classExtendingNonConstructor.js
@@ -27,56 +27,48 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var x;
+})();var x;
function foo() {
this.x = 1;
}
var C1 = /** @class */ (function (_super) {
- __extends(C1, _super);
- function C1() {
+ __extends(C1, _super);function C1() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C1;
}(undefined));
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(true));
var C3 = /** @class */ (function (_super) {
- __extends(C3, _super);
- function C3() {
+ __extends(C3, _super);function C3() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(false));
var C4 = /** @class */ (function (_super) {
- __extends(C4, _super);
- function C4() {
+ __extends(C4, _super);function C4() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(42));
var C5 = /** @class */ (function (_super) {
- __extends(C5, _super);
- function C5() {
+ __extends(C5, _super);function C5() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}("hello"));
var C6 = /** @class */ (function (_super) {
- __extends(C6, _super);
- function C6() {
+ __extends(C6, _super);function C6() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(x));
var C7 = /** @class */ (function (_super) {
- __extends(C7, _super);
- function C7() {
+ __extends(C7, _super);function C7() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js
index 99c8fb76501..c1f589d0aab 100644
--- a/tests/baselines/reference/classExtendingNull.js
+++ b/tests/baselines/reference/classExtendingNull.js
@@ -17,29 +17,22 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C1 = /** @class */ (function (_super) {
- __extends(C1, _super);
- function C1() {
- }
+})();var C1 = /** @class */ (function (_super) {
+ __extends(C1, _super);function C1() {}
return C1;
}(null));
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
- }
+ __extends(C2, _super);function C2() {}
return C2;
}((null)));
var C3 = /** @class */ (function (_super) {
- __extends(C3, _super);
- function C3() {
+ __extends(C3, _super);function C3() {
this.x = 1;
}
return C3;
}(null));
var C4 = /** @class */ (function (_super) {
- __extends(C4, _super);
- function C4() {
+ __extends(C4, _super);function C4() {
this.x = 1;
}
return C4;
diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js
index 8ad1eb89c1b..9380edda5c4 100644
--- a/tests/baselines/reference/classExtendingPrimitive.js
+++ b/tests/baselines/reference/classExtendingPrimitive.js
@@ -29,63 +29,55 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
var C = /** @class */ (function (_super) {
- __extends(C, _super);
+ __extends(C, _super);// classes cannot extend primitives
function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(number));
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(string));
var C3 = /** @class */ (function (_super) {
- __extends(C3, _super);
- function C3() {
+ __extends(C3, _super);function C3() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(boolean));
var C4 = /** @class */ (function (_super) {
- __extends(C4, _super);
- function C4() {
+ __extends(C4, _super);function C4() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(Void));
var C4a = /** @class */ (function () {
- function C4a() {
- }
+ function C4a() {}
return C4a;
}());
void {};
var C5 = /** @class */ (function (_super) {
- __extends(C5, _super);
- function C5() {
+ __extends(C5, _super);function C5() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(Null));
var C5a = /** @class */ (function (_super) {
- __extends(C5a, _super);
- function C5a() {
- }
+ __extends(C5a, _super);function C5a() {}
return C5a;
}(null));
var C6 = /** @class */ (function (_super) {
- __extends(C6, _super);
- function C6() {
+ __extends(C6, _super);function C6() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(undefined));
var C7 = /** @class */ (function (_super) {
- __extends(C7, _super);
- function C7() {
+ __extends(C7, _super);function C7() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
@@ -95,8 +87,7 @@ var E;
E[E["A"] = 0] = "A";
})(E || (E = {}));
var C8 = /** @class */ (function (_super) {
- __extends(C8, _super);
- function C8() {
+ __extends(C8, _super);function C8() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C8;
diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js
index b6524e2bd04..cadfc2996e9 100644
--- a/tests/baselines/reference/classExtendingPrimitive2.js
+++ b/tests/baselines/reference/classExtendingPrimitive2.js
@@ -19,15 +19,13 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
var C4a = /** @class */ (function () {
- function C4a() {
- }
+ function C4a() {}
return C4a;
}());
void {};
var C5a = /** @class */ (function (_super) {
- __extends(C5a, _super);
- function C5a() {
- }
+ __extends(C5a, _super);function C5a() {}
return C5a;
}(null));
diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js
index 1465af9739a..c485767ef17 100644
--- a/tests/baselines/reference/classExtendingQualifiedName.js
+++ b/tests/baselines/reference/classExtendingQualifiedName.js
@@ -29,8 +29,7 @@ var M;
return C;
}());
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js
index 20e9994ea2e..dec65d913c8 100644
--- a/tests/baselines/reference/classExtendingQualifiedName2.js
+++ b/tests/baselines/reference/classExtendingQualifiedName2.js
@@ -30,8 +30,7 @@ var M;
}());
M.C = C;
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js
index 16b8095cc45..22787a4104f 100644
--- a/tests/baselines/reference/classExtendsAcrossFiles.js
+++ b/tests/baselines/reference/classExtendsAcrossFiles.js
@@ -40,13 +40,11 @@ var a_1 = require("./a");
exports.b = {
f: function () {
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
@@ -75,13 +73,11 @@ var b_1 = require("./b");
exports.a = {
f: function () {
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js
index 18dd63364b6..703bee40694 100644
--- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js
+++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js
@@ -26,8 +26,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
}
return A;
@@ -38,8 +37,7 @@ var Foo;
(function (Foo) {
var A = 1;
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js
index f746f36daef..ea5989c1ebe 100644
--- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js
+++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js
@@ -19,18 +19,15 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
return A;
}());
var Foo;
(function (Foo) {
var A = 1;
var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js
index 7fcb678fc65..fd866fd7fe4 100644
--- a/tests/baselines/reference/classExtendsEveryObjectType.js
+++ b/tests/baselines/reference/classExtendsEveryObjectType.js
@@ -31,48 +31,43 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(I)); // error
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
+ __extends(C2, _super);// error
function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}({ foo: string })); // error
-var x;
+var x
+;
var C3 = /** @class */ (function (_super) {
- __extends(C3, _super);
- function C3() {
+ __extends(C3, _super);function C3() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(x)); // error
var M;
-(function (M) {
- M.x = 1;
-})(M || (M = {}));
+(function (M) {M.x = 1;})(M || (M = {}));
var C4 = /** @class */ (function (_super) {
- __extends(C4, _super);
- function C4() {
+ __extends(C4, _super);function C4() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(M)); // error
function foo() { }
var C5 = /** @class */ (function (_super) {
- __extends(C5, _super);
- function C5() {
+ __extends(C5, _super);function C5() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(foo)); // error
var C6 = /** @class */ (function (_super) {
- __extends(C6, _super);
+ __extends(C6, _super);// error
function C6() {
return _super !== null && _super.apply(this, arguments) || this;
}
diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js
index f8c5f110389..1903b835d9b 100644
--- a/tests/baselines/reference/classExtendsEveryObjectType2.js
+++ b/tests/baselines/reference/classExtendsEveryObjectType2.js
@@ -16,16 +16,14 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+})();var C2 = /** @class */ (function (_super) {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}({ foo: string })); // error
var C6 = /** @class */ (function (_super) {
- __extends(C6, _super);
+ __extends(C6, _super);// error
function C6() {
return _super !== null && _super.apply(this, arguments) || this;
}
diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js
index 047e6161354..e6b1da4d544 100644
--- a/tests/baselines/reference/classExtendsInterface.js
+++ b/tests/baselines/reference/classExtendsInterface.js
@@ -23,26 +23,22 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var A = /** @class */ (function (_super) {
- __extends(A, _super);
- function A() {
+ __extends(A, _super);function A() {
return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(Comparable));
var B = /** @class */ (function () {
- function B() {
- }
+ function B() {}
return B;
}());
var A2 = /** @class */ (function (_super) {
- __extends(A2, _super);
- function A2() {
+ __extends(A2, _super);function A2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return A2;
}(Comparable2));
var B2 = /** @class */ (function () {
- function B2() {
- }
+ function B2() {}
return B2;
}());
diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js
index a930feed6cf..bfbf986e79e 100644
--- a/tests/baselines/reference/classExtendsInterfaceInExpression.js
+++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js
@@ -22,12 +22,13 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
function factory(a) {
return null;
}
+
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js
index 7aa057a9227..3a0580a4f63 100644
--- a/tests/baselines/reference/classExtendsInterfaceInModule.js
+++ b/tests/baselines/reference/classExtendsInterfaceInModule.js
@@ -30,22 +30,20 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var C1 = /** @class */ (function (_super) {
- __extends(C1, _super);
- function C1() {
+ __extends(C1, _super);function C1() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C1;
}(M.I1));
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(M.I2));
+
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js
index 1b72cba2b63..c4d05e22b76 100644
--- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js
+++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js
@@ -18,15 +18,15 @@ class D2 implements I {
var C = /** @class */ (function () {
function C() {
this.x = 1;
- }
- C.prototype.foo = function (x) { return x; };
+ }C.prototype.foo = function (x) { return x; };
return C;
}());
+
var D2 = /** @class */ (function () {
function D2() {
this.x = 3;
- }
- D2.prototype.foo = function (x) { return x; };
+ }D2.prototype.foo = function (x) { return x; };
+
D2.prototype.other = function (x) { return x; };
return D2;
}());
diff --git a/tests/baselines/reference/classExtendsInterface_not.js b/tests/baselines/reference/classExtendsInterface_not.js
index 238a00bbbd2..420dae9e90e 100644
--- a/tests/baselines/reference/classExtendsInterface_not.js
+++ b/tests/baselines/reference/classExtendsInterface_not.js
@@ -15,10 +15,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+})();var C = /** @class */ (function (_super) {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js
index ba71ae1df91..08019301e38 100644
--- a/tests/baselines/reference/classExtendsItself.js
+++ b/tests/baselines/reference/classExtendsItself.js
@@ -18,23 +18,21 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+})();var C = /** @class */ (function (_super) {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(C)); // error
var D = /** @class */ (function (_super) {
- __extends(D, _super);
+ __extends(D, _super);// error
function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(D)); // error
var E = /** @class */ (function (_super) {
- __extends(E, _super);
+ __extends(E, _super);// error
function E() {
return _super !== null && _super.apply(this, arguments) || this;
}
diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js
index 04d5a9879d5..257c4614811 100644
--- a/tests/baselines/reference/classExtendsItselfIndirectly.js
+++ b/tests/baselines/reference/classExtendsItselfIndirectly.js
@@ -24,45 +24,40 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+})();var C = /** @class */ (function (_super) {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(E)); // error
var D = /** @class */ (function (_super) {
- __extends(D, _super);
+ __extends(D, _super);// error
function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
var E = /** @class */ (function (_super) {
- __extends(E, _super);
- function E() {
+ __extends(E, _super);function E() {
return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(D));
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(E2)); // error
var D2 = /** @class */ (function (_super) {
- __extends(D2, _super);
+ __extends(D2, _super);// error
function D2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(C2));
var E2 = /** @class */ (function (_super) {
- __extends(E2, _super);
- function E2() {
+ __extends(E2, _super);function E2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return E2;
diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js
index 310d96ee7ab..87292c4cdd2 100644
--- a/tests/baselines/reference/classExtendsItselfIndirectly2.js
+++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js
@@ -35,10 +35,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+})();var C = /** @class */ (function (_super) {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
@@ -46,8 +44,7 @@ var C = /** @class */ (function (_super) {
var M;
(function (M) {
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
@@ -57,8 +54,7 @@ var M;
var N;
(function (N) {
var E = /** @class */ (function (_super) {
- __extends(E, _super);
- function E() {
+ __extends(E, _super);function E() {
return _super !== null && _super.apply(this, arguments) || this;
}
return E;
@@ -68,8 +64,7 @@ var N;
var O;
(function (O) {
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
@@ -77,8 +72,7 @@ var O;
var P;
(function (P) {
var D2 = /** @class */ (function (_super) {
- __extends(D2, _super);
- function D2() {
+ __extends(D2, _super);function D2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
@@ -88,8 +82,7 @@ var O;
var Q;
(function (Q) {
var E2 = /** @class */ (function (_super) {
- __extends(E2, _super);
- function E2() {
+ __extends(E2, _super);function E2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return E2;
diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js
index af882e651d0..58aa0c3fdad 100644
--- a/tests/baselines/reference/classExtendsItselfIndirectly3.js
+++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js
@@ -31,10 +31,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+})();var C = /** @class */ (function (_super) {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
@@ -52,10 +50,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+})();var D = /** @class */ (function (_super) {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
@@ -73,10 +69,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var E = /** @class */ (function (_super) {
- __extends(E, _super);
- function E() {
+})();var E = /** @class */ (function (_super) {
+ __extends(E, _super);function E() {
return _super !== null && _super.apply(this, arguments) || this;
}
return E;
@@ -94,10 +88,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+})();var C2 = /** @class */ (function (_super) {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
@@ -115,10 +107,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var D2 = /** @class */ (function (_super) {
- __extends(D2, _super);
- function D2() {
+})();var D2 = /** @class */ (function (_super) {
+ __extends(D2, _super);function D2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
@@ -136,10 +126,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var E2 = /** @class */ (function (_super) {
- __extends(E2, _super);
- function E2() {
+})();var E2 = /** @class */ (function (_super) {
+ __extends(E2, _super);function E2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return E2;
diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js
index 1727a582238..fe9b12c3869 100644
--- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js
+++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js
@@ -16,20 +16,16 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
return A;
}());
var B = /** @class */ (function () {
- function B() {
- }
+ function B() {}
return B;
}());
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js
index 2fef0e405f1..1ddf1f0233b 100644
--- a/tests/baselines/reference/classExtendsNull.js
+++ b/tests/baselines/reference/classExtendsNull.js
@@ -25,8 +25,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function (_super) {
+})();var C = /** @class */ (function (_super) {
__extends(C, _super);
function C() {
_this = _super.call(this) || this;
diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js
index 3b86d7739cd..bc7e8ae08ae 100644
--- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js
+++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js
@@ -21,18 +21,15 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function () {
- function C() {
- }
+})();var C = /** @class */ (function () {
+ function C() {}
return C;
}());
var M;
(function (M) {
var C = 1;
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js
index 6570beaf8c9..bc161b98662 100644
--- a/tests/baselines/reference/classExtendsValidConstructorFunction.js
+++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js
@@ -21,8 +21,9 @@ var __extends = (this && this.__extends) || (function () {
})();
function foo() { }
var x = new foo(); // can be used as a constructor function
+
var C = /** @class */ (function (_super) {
- __extends(C, _super);
+ __extends(C, _super);// can be used as a constructor function
function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
diff --git a/tests/baselines/reference/classExtensionNameOutput.js b/tests/baselines/reference/classExtensionNameOutput.js
index e2c80c242e4..535729dc76f 100644
--- a/tests/baselines/reference/classExtensionNameOutput.js
+++ b/tests/baselines/reference/classExtensionNameOutput.js
@@ -21,16 +21,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
+})();var A = /** @class */ (function () {
+ function A() {}
return A;
}());
if (true) {
var B_1 = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
diff --git a/tests/baselines/reference/classFunctionMerging.js b/tests/baselines/reference/classFunctionMerging.js
index 7da31c1bbd0..988b501d3a7 100644
--- a/tests/baselines/reference/classFunctionMerging.js
+++ b/tests/baselines/reference/classFunctionMerging.js
@@ -13,5 +13,6 @@ const a = new Foo("");
const b = Foo(12);
//// [classFunctionMerging.js]
+
var a = new Foo("");
var b = Foo(12);
diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js
index 993a8c37afb..9efbdfd63b2 100644
--- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js
+++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js
@@ -16,15 +16,12 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function () {
- function C() {
- }
+})();var C = /** @class */ (function () {
+ function C() {}
return C;
}());
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
diff --git a/tests/baselines/reference/classImplementsClass1.js b/tests/baselines/reference/classImplementsClass1.js
index 0a850229c00..480ac6441e6 100644
--- a/tests/baselines/reference/classImplementsClass1.js
+++ b/tests/baselines/reference/classImplementsClass1.js
@@ -4,12 +4,10 @@ class C implements A { }
//// [classImplementsClass1.js]
var A = /** @class */ (function () {
- function A() {
- }
+ function A() {}
return A;
}());
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js
index ac9348b90a2..bfb254ea80f 100644
--- a/tests/baselines/reference/classImplementsClass2.js
+++ b/tests/baselines/reference/classImplementsClass2.js
@@ -26,24 +26,19 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
- A.prototype.foo = function () { return 1; };
+})();var A = /** @class */ (function () {
+ function A() {}A.prototype.foo = function () { return 1; };
return A;
}());
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}()); // error
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
+ __extends(C2, _super);// error
function C2() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- C2.prototype.foo = function () {
+ }C2.prototype.foo = function () {
return 1;
};
return C2;
diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js
index e06c47c60cf..b12d2151149 100644
--- a/tests/baselines/reference/classImplementsClass3.js
+++ b/tests/baselines/reference/classImplementsClass3.js
@@ -27,24 +27,19 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
- function A() {
- }
- A.prototype.foo = function () { return 1; };
+})();var A = /** @class */ (function () {
+ function A() {}A.prototype.foo = function () { return 1; };
return A;
}());
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.foo = function () {
+ }C.prototype.foo = function () {
return 1;
};
return C;
}());
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js
index dfba80d1543..b93cfe5a3f6 100644
--- a/tests/baselines/reference/classImplementsClass4.js
+++ b/tests/baselines/reference/classImplementsClass4.js
@@ -29,25 +29,21 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
this.x = 1;
- }
- A.prototype.foo = function () { return 1; };
+ }A.prototype.foo = function () { return 1; };
return A;
}());
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.foo = function () {
+ }C.prototype.foo = function () {
return 1;
};
return C;
}());
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js
index 0ab2ff23fdd..07c27cd1412 100644
--- a/tests/baselines/reference/classImplementsClass5.js
+++ b/tests/baselines/reference/classImplementsClass5.js
@@ -30,26 +30,22 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
this.x = 1;
- }
- A.prototype.foo = function () { return 1; };
+ }A.prototype.foo = function () { return 1; };
return A;
}());
var C = /** @class */ (function () {
function C() {
this.x = 1;
- }
- C.prototype.foo = function () {
+ }C.prototype.foo = function () {
return 1;
};
return C;
}());
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js
index 28e8b574403..5f324440cd2 100644
--- a/tests/baselines/reference/classImplementsClass6.js
+++ b/tests/baselines/reference/classImplementsClass6.js
@@ -34,11 +34,9 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
- }
- A.bar = function () {
+ }A.bar = function () {
return "";
};
A.prototype.foo = function () { return 1; };
@@ -46,15 +44,13 @@ var A = /** @class */ (function () {
}());
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.foo = function () {
+ }C.prototype.foo = function () {
return 1;
};
return C;
}());
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
diff --git a/tests/baselines/reference/classImplementsClass7.js b/tests/baselines/reference/classImplementsClass7.js
index bbb2fde3391..ca12ecf8550 100644
--- a/tests/baselines/reference/classImplementsClass7.js
+++ b/tests/baselines/reference/classImplementsClass7.js
@@ -13,7 +13,6 @@ var A = /** @class */ (function () {
return A;
}());
var B = /** @class */ (function () {
- function B() {
- }
+ function B() {}
return B;
}());
diff --git a/tests/baselines/reference/classImplementsImportedInterface.js b/tests/baselines/reference/classImplementsImportedInterface.js
index 6276dced5a7..fde7257baaa 100644
--- a/tests/baselines/reference/classImplementsImportedInterface.js
+++ b/tests/baselines/reference/classImplementsImportedInterface.js
@@ -17,8 +17,7 @@ var M2;
(function (M2) {
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.foo = function () { };
+ }C.prototype.foo = function () { };
return C;
}());
})(M2 || (M2 = {}));
diff --git a/tests/baselines/reference/classImplementsMergedClassInterface.js b/tests/baselines/reference/classImplementsMergedClassInterface.js
index 38e67f8bdb0..8bb8b3fe19a 100644
--- a/tests/baselines/reference/classImplementsMergedClassInterface.js
+++ b/tests/baselines/reference/classImplementsMergedClassInterface.js
@@ -24,6 +24,8 @@ class C5 implements C1 { // okay
}
//// [classImplementsMergedClassInterface.js]
+
+
var C2 = /** @class */ (function () {
function C2() {
}
diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js
index 217bfa7958e..2b53c56569b 100644
--- a/tests/baselines/reference/classIndexer3.js
+++ b/tests/baselines/reference/classIndexer3.js
@@ -23,15 +23,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C123 = /** @class */ (function () {
+})();var C123 = /** @class */ (function () {
function C123() {
}
return C123;
}());
var D123 = /** @class */ (function (_super) {
- __extends(D123, _super);
- function D123() {
+ __extends(D123, _super);function D123() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D123;
diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js
index 99206a1e8ff..66f41f09902 100644
--- a/tests/baselines/reference/classInheritence.js
+++ b/tests/baselines/reference/classInheritence.js
@@ -15,17 +15,14 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var B = /** @class */ (function (_super) {
- __extends(B, _super);
- function B() {
+})();var B = /** @class */ (function (_super) {
+ __extends(B, _super);function B() {
return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var A = /** @class */ (function (_super) {
- __extends(A, _super);
- function A() {
+ __extends(A, _super);function A() {
return _super !== null && _super.apply(this, arguments) || this;
}
return A;
diff --git a/tests/baselines/reference/classInsideBlock.js b/tests/baselines/reference/classInsideBlock.js
index c858ac6290b..518978d2ecd 100644
--- a/tests/baselines/reference/classInsideBlock.js
+++ b/tests/baselines/reference/classInsideBlock.js
@@ -6,8 +6,7 @@ function foo() {
//// [classInsideBlock.js]
function foo() {
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
}
diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js
index c185c546ad9..caeb320769e 100644
--- a/tests/baselines/reference/classIsSubtypeOfBaseType.js
+++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js
@@ -28,22 +28,19 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
+})();var Base = /** @class */ (function () {
function Base() {
}
return Base;
}());
var Derived = /** @class */ (function (_super) {
- __extends(Derived, _super);
- function Derived() {
+ __extends(Derived, _super);function Derived() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = /** @class */ (function (_super) {
- __extends(Derived2, _super);
- function Derived2() {
+ __extends(Derived2, _super);function Derived2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js
index f7660fbec7e..b2a613ad448 100644
--- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js
+++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.js
@@ -52,6 +52,8 @@ var Test1 = /** @class */ (function () {
this.field1 = field1;
this.messageHandler = function () {
console.log(field1); // But this should be error as the field1 will resolve to var field1
+
+
// but since this code would be generated inside constructor, in generated js
// it would resolve to private field1 and thats not what user intended here.
};
diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.js
index dafd3d503eb..125f146d1a7 100644
--- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.js
+++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.js
@@ -25,6 +25,8 @@ var Test1 = /** @class */ (function () {
this.field1 = field1;
this.messageHandler = function () {
console.log(field1); // But this should be error as the field1 will resolve to var field1
+
+
// but since this code would be generated inside constructor, in generated js
// it would resolve to private field1 and thats not what user intended here.
};
diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js
index 5adf1ae6d8e..b96953829ad 100644
--- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js
+++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js
@@ -28,10 +28,11 @@ var Test1 = /** @class */ (function () {
this.field1 = field1;
this.messageHandler = function () {
console.log(field1); // But this should be error as the field1 will resolve to var field1
+
+
// but since this code would be generated inside constructor, in generated js
// it would resolve to private field1 and thats not what user intended here.
};
}
return Test1;
-}());
-exports.Test1 = Test1;
+}());exports.Test1 = Test1;
diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js
index c148dcb0a96..14ae7e01920 100644
--- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js
+++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js
@@ -31,5 +31,4 @@ var Test1 = /** @class */ (function () {
};
}
return Test1;
-}());
-exports.Test1 = Test1;
+}());exports.Test1 = Test1;
diff --git a/tests/baselines/reference/classMemberWithMissingIdentifier.js b/tests/baselines/reference/classMemberWithMissingIdentifier.js
index 55596754f20..13a2dcc4ed5 100644
--- a/tests/baselines/reference/classMemberWithMissingIdentifier.js
+++ b/tests/baselines/reference/classMemberWithMissingIdentifier.js
@@ -9,5 +9,4 @@ var C = /** @class */ (function () {
}
return C;
}());
-{ }
-;
+{ };
diff --git a/tests/baselines/reference/classMemberWithMissingIdentifier2.js b/tests/baselines/reference/classMemberWithMissingIdentifier2.js
index f4cd26302c4..1251aa14eb8 100644
--- a/tests/baselines/reference/classMemberWithMissingIdentifier2.js
+++ b/tests/baselines/reference/classMemberWithMissingIdentifier2.js
@@ -9,8 +9,4 @@ var C = /** @class */ (function () {
}
return C;
}());
-{
- [name, string];
- VariableDeclaration;
-}
-;
+{[name, string];VariableDeclaration;};
diff --git a/tests/baselines/reference/classMergedWithInterfaceMultipleBasesNoError.js b/tests/baselines/reference/classMergedWithInterfaceMultipleBasesNoError.js
index 16eb43631c9..c9511dbd162 100644
--- a/tests/baselines/reference/classMergedWithInterfaceMultipleBasesNoError.js
+++ b/tests/baselines/reference/classMergedWithInterfaceMultipleBasesNoError.js
@@ -27,13 +27,11 @@ var __extends = (this && this.__extends) || (function () {
})();
exports.__esModule = true;
var Foo = /** @class */ (function () {
- function Foo() {
- }
+ function Foo() {}
return Foo;
}());
var default_1 = /** @class */ (function (_super) {
- __extends(default_1, _super);
- function default_1() {
+ __extends(default_1, _super);function default_1() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.observer = _this.handleIntersection;
_this.handleIntersection = function () { };
diff --git a/tests/baselines/reference/classMethodWithKeywordName1.js b/tests/baselines/reference/classMethodWithKeywordName1.js
index 5568f20978f..618947945f4 100644
--- a/tests/baselines/reference/classMethodWithKeywordName1.js
+++ b/tests/baselines/reference/classMethodWithKeywordName1.js
@@ -6,7 +6,6 @@ class C {
//// [classMethodWithKeywordName1.js]
var C = /** @class */ (function () {
function C() {
- }
- C["try"] = function () { };
+ }C["try"] = function () { };
return C;
}());
diff --git a/tests/baselines/reference/classOrder1.js b/tests/baselines/reference/classOrder1.js
index e4e7beb7218..4535df9ad15 100644
--- a/tests/baselines/reference/classOrder1.js
+++ b/tests/baselines/reference/classOrder1.js
@@ -14,8 +14,7 @@ a.foo();
//// [classOrder1.js]
var A = /** @class */ (function () {
function A() {
- }
- A.prototype.foo = function () {
+ }A.prototype.foo = function () {
/*WScript.Echo("Here!");*/
};
return A;
diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js
index 27a8d9091dd..8771aeb6be0 100644
--- a/tests/baselines/reference/classOrder2.js
+++ b/tests/baselines/reference/classOrder2.js
@@ -31,19 +31,15 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function (_super) {
- __extends(A, _super);
- function A() {
+})();var A = /** @class */ (function (_super) {
+ __extends(A, _super);function A() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- A.prototype.foo = function () { this.bar(); };
+ }A.prototype.foo = function () { this.bar(); };
return A;
}(B));
var B = /** @class */ (function () {
function B() {
- }
- B.prototype.bar = function () { };
+ }B.prototype.bar = function () { };
return B;
}());
var a = new A();
diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js
index 6660407f8ad..e61e2f6790c 100644
--- a/tests/baselines/reference/classOrderBug.js
+++ b/tests/baselines/reference/classOrderBug.js
@@ -28,21 +28,18 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var bar = /** @class */ (function () {
+})();var bar = /** @class */ (function () {
function bar() {
this.baz = new foo();
}
return bar;
}());
var baz = /** @class */ (function () {
- function baz() {
- }
+ function baz() {}
return baz;
}());
var foo = /** @class */ (function (_super) {
- __extends(foo, _super);
- function foo() {
+ __extends(foo, _super);function foo() {
return _super !== null && _super.apply(this, arguments) || this;
}
return foo;
diff --git a/tests/baselines/reference/classOverloadForFunction.js b/tests/baselines/reference/classOverloadForFunction.js
index 1e0073f4d81..6fc116a44dc 100644
--- a/tests/baselines/reference/classOverloadForFunction.js
+++ b/tests/baselines/reference/classOverloadForFunction.js
@@ -5,8 +5,7 @@ function foo() {}
//// [classOverloadForFunction.js]
var foo = /** @class */ (function () {
- function foo() {
- }
+ function foo() {}
return foo;
}());
;
diff --git a/tests/baselines/reference/classOverloadForFunction2.js b/tests/baselines/reference/classOverloadForFunction2.js
index 79b594e36a7..b8a2797cd0c 100644
--- a/tests/baselines/reference/classOverloadForFunction2.js
+++ b/tests/baselines/reference/classOverloadForFunction2.js
@@ -4,7 +4,6 @@ class bar {}
//// [classOverloadForFunction2.js]
var bar = /** @class */ (function () {
- function bar() {
- }
+ function bar() {}
return bar;
}());
diff --git a/tests/baselines/reference/classPropertyAsPrivate.js b/tests/baselines/reference/classPropertyAsPrivate.js
index 08f1b091c89..c5ac8ee61c1 100644
--- a/tests/baselines/reference/classPropertyAsPrivate.js
+++ b/tests/baselines/reference/classPropertyAsPrivate.js
@@ -49,6 +49,7 @@ c.x;
c.y;
c.y = 1;
c.foo();
+
C.a;
C.b();
C.b = 1;
diff --git a/tests/baselines/reference/classPropertyAsProtected.js b/tests/baselines/reference/classPropertyAsProtected.js
index 7628adee04e..4d3aba2d2eb 100644
--- a/tests/baselines/reference/classPropertyAsProtected.js
+++ b/tests/baselines/reference/classPropertyAsProtected.js
@@ -49,6 +49,7 @@ c.x;
c.y;
c.y = 1;
c.foo();
+
C.a;
C.b();
C.b = 1;
diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.js b/tests/baselines/reference/classPropertyIsPublicByDefault.js
index 116f25a67e5..67867ff3591 100644
--- a/tests/baselines/reference/classPropertyIsPublicByDefault.js
+++ b/tests/baselines/reference/classPropertyIsPublicByDefault.js
@@ -47,6 +47,7 @@ c.x;
c.y;
c.y = 1;
c.foo();
+
C.a;
C.b();
C.b = 1;
diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js
index 0cce6704987..de886b15ffa 100644
--- a/tests/baselines/reference/classSideInheritance1.js
+++ b/tests/baselines/reference/classSideInheritance1.js
@@ -28,19 +28,16 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A() {
- }
- A.bar = function () {
+ }A.bar = function () {
return "";
};
A.prototype.foo = function () { return 1; };
return A;
}());
var C2 = /** @class */ (function (_super) {
- __extends(C2, _super);
- function C2() {
+ __extends(C2, _super);function C2() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js
index 0794de5d946..12ece765cab 100644
--- a/tests/baselines/reference/classSideInheritance2.js
+++ b/tests/baselines/reference/classSideInheritance2.js
@@ -34,8 +34,11 @@ var __extends = (this && this.__extends) || (function () {
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
+
+
var SubText = /** @class */ (function (_super) {
__extends(SubText, _super);
+
function SubText(text, span) {
return _super.call(this) || this;
}
@@ -43,8 +46,8 @@ var SubText = /** @class */ (function (_super) {
}(TextBase));
var TextBase = /** @class */ (function () {
function TextBase() {
- }
- TextBase.prototype.subText = function (span) {
+ }TextBase.prototype.subText = function (span) {
+
return new SubText(this, span);
};
return TextBase;
diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js
index e407b85ecfb..f1fdc4cb61a 100644
--- a/tests/baselines/reference/classSideInheritance3.js
+++ b/tests/baselines/reference/classSideInheritance3.js
@@ -31,8 +31,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var A = /** @class */ (function () {
+})();var A = /** @class */ (function () {
function A(x) {
this.x = x;
}
diff --git a/tests/baselines/reference/classStaticPropertyTypeGuard.js b/tests/baselines/reference/classStaticPropertyTypeGuard.js
index d833e812b36..4b170328408 100644
--- a/tests/baselines/reference/classStaticPropertyTypeGuard.js
+++ b/tests/baselines/reference/classStaticPropertyTypeGuard.js
@@ -14,6 +14,7 @@ class A {
//// [classStaticPropertyTypeGuard.js]
// Repro from #8923
+
var A = /** @class */ (function () {
function A() {
}
diff --git a/tests/baselines/reference/classTypeParametersInStatics.js b/tests/baselines/reference/classTypeParametersInStatics.js
index 76f7997bbcd..cba0034febc 100644
--- a/tests/baselines/reference/classTypeParametersInStatics.js
+++ b/tests/baselines/reference/classTypeParametersInStatics.js
@@ -36,23 +36,28 @@ module Editor {
//// [classTypeParametersInStatics.js]
var Editor;
(function (Editor) {
+
+
var List = /** @class */ (function () {
function List(isHead, data) {
this.isHead = isHead;
this.data = data;
}
+
List.MakeHead = function () {
var entry = new List(true, null);
entry.prev = entry;
entry.next = entry;
return entry;
};
+
List.MakeHead2 = function () {
var entry = new List(true, null);
entry.prev = entry;
entry.next = entry;
return entry;
};
+
List.MakeHead3 = function () {
var entry = new List(true, null);
entry.prev = entry;
diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js
index 916ac9baa47..a6408466a90 100644
--- a/tests/baselines/reference/classUpdateTests.js
+++ b/tests/baselines/reference/classUpdateTests.js
@@ -145,10 +145,7 @@ var B = /** @class */ (function () {
return B;
}());
var C = /** @class */ (function () {
- function C(p1, p2, p3) {
- if (p1 === void 0) { p1 = 0; }
- if (p2 === void 0) { p2 = 0; }
- if (p3 === void 0) { p3 = 0; }
+ function C(p1, p2, p3) {if (p1 === void 0) { p1 = 0; }if (p2 === void 0) { p2 = 0; }if (p3 === void 0) { p3 = 0; }
this.p1 = p1;
this.p2 = p2;
}
@@ -163,8 +160,7 @@ var D = /** @class */ (function () {
return D;
}());
var E = /** @class */ (function (_super) {
- __extends(E, _super);
- function E() {
+ __extends(E, _super);function E() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.p1 = 0;
return _this;
@@ -181,6 +177,7 @@ var F = /** @class */ (function (_super) {
}(E));
var G = /** @class */ (function (_super) {
__extends(G, _super);
+
function G() {
var _this = _super.call(this) || this;
_this.p1 = 0;
@@ -189,9 +186,7 @@ var G = /** @class */ (function (_super) {
return G;
}(D));
var H = /** @class */ (function () {
- function H() {
- _this = _super.call(this) || this;
- } // ERROR - no super call allowed
+ function H() {_this = _super.call(this) || this;} // ERROR - no super call allowed
return H;
}());
var I = /** @class */ (function (_super) {
diff --git a/tests/baselines/reference/classUsedBeforeInitializedVariables.js b/tests/baselines/reference/classUsedBeforeInitializedVariables.js
index eb3e7908ea5..6682b5a1f87 100644
--- a/tests/baselines/reference/classUsedBeforeInitializedVariables.js
+++ b/tests/baselines/reference/classUsedBeforeInitializedVariables.js
@@ -52,8 +52,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Test = /** @class */ (function () {
+})();var Test = /** @class */ (function () {
function Test() {
var _a, _b, _c;
var _this = this;
@@ -86,8 +85,7 @@ var Test = /** @class */ (function () {
}),
_c);
this.withinClassDeclarationExtension = (/** @class */ (function (_super) {
- __extends(class_1, _super);
- function class_1() {
+ __extends(class_1, _super);function class_1() {
return _super !== null && _super.apply(this, arguments) || this;
}
return class_1;
diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js
index 54b0fd482e5..4c979446fe4 100644
--- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js
+++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js
@@ -53,15 +53,12 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Base = /** @class */ (function () {
- function Base(x) {
- }
+})();var Base = /** @class */ (function () {
+ function Base(x) {}
return Base;
}());
var C = /** @class */ (function (_super) {
- __extends(C, _super);
- function C() {
+ __extends(C, _super);function C() {
return _super !== null && _super.apply(this, arguments) || this;
}
return C;
@@ -69,14 +66,13 @@ var C = /** @class */ (function (_super) {
var r = C;
var c = new C(); // error
var c2 = new C(1); // ok
+
var Base2 = /** @class */ (function () {
- function Base2(x) {
- }
+ function Base2(x) {}
return Base2;
}());
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
@@ -84,9 +80,11 @@ var D = /** @class */ (function (_super) {
var r2 = D;
var d = new D(); // error
var d2 = new D(1); // ok
+
+
// specialized base class
var D2 = /** @class */ (function (_super) {
- __extends(D2, _super);
+ __extends(D2, _super);// ok
function D2() {
return _super !== null && _super.apply(this, arguments) || this;
}
@@ -95,8 +93,9 @@ var D2 = /** @class */ (function (_super) {
var r3 = D2;
var d3 = new D(); // error
var d4 = new D(1); // ok
+
var D3 = /** @class */ (function (_super) {
- __extends(D3, _super);
+ __extends(D3, _super);// ok
function D3() {
return _super !== null && _super.apply(this, arguments) || this;
}
diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js
index db3fcb05a34..30c35c3f8c0 100644
--- a/tests/baselines/reference/classWithConstructors.js
+++ b/tests/baselines/reference/classWithConstructors.js
@@ -66,22 +66,22 @@ var __extends = (this && this.__extends) || (function () {
var NonGeneric;
(function (NonGeneric) {
var C = /** @class */ (function () {
- function C(x) {
- }
+ function C(x) {}
return C;
}());
var c = new C(); // error
var c2 = new C(''); // ok
+
var C2 = /** @class */ (function () {
- function C2(x) {
- }
+ function C2(x) {}
return C2;
}());
var c3 = new C2(); // error
var c4 = new C2(''); // ok
var c5 = new C2(1); // ok
+
var D = /** @class */ (function (_super) {
- __extends(D, _super);
+ __extends(D, _super);// ok
function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
@@ -94,22 +94,22 @@ var NonGeneric;
var Generics;
(function (Generics) {
var C = /** @class */ (function () {
- function C(x) {
- }
+ function C(x) {}
return C;
}());
var c = new C(); // error
var c2 = new C(''); // ok
+
var C2 = /** @class */ (function () {
- function C2(x) {
- }
+ function C2(x) {}
return C2;
}());
var c3 = new C2(); // error
var c4 = new C2(''); // ok
var c5 = new C2(1, 2); // ok
+
var D = /** @class */ (function (_super) {
- __extends(D, _super);
+ __extends(D, _super);// ok
function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
diff --git a/tests/baselines/reference/classWithDuplicateIdentifier.js b/tests/baselines/reference/classWithDuplicateIdentifier.js
index 45fe8333f75..52c5d645004 100644
--- a/tests/baselines/reference/classWithDuplicateIdentifier.js
+++ b/tests/baselines/reference/classWithDuplicateIdentifier.js
@@ -16,13 +16,12 @@ class D {
//// [classWithDuplicateIdentifier.js]
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.a = function () { return 0; }; // error: duplicate identifier
+ }C.prototype.a = function () { return 0; }; // error: duplicate identifier
return C;
}());
var K = /** @class */ (function () {
function K() {
- }
+ }// error: duplicate identifier
K.prototype.b = function () { return 0; };
return K;
}());
diff --git a/tests/baselines/reference/classWithEmptyBody.js b/tests/baselines/reference/classWithEmptyBody.js
index 8fed60f296c..093cc83c5fa 100644
--- a/tests/baselines/reference/classWithEmptyBody.js
+++ b/tests/baselines/reference/classWithEmptyBody.js
@@ -31,6 +31,7 @@ var o = c;
c = 1;
c = { foo: '' };
c = function () { };
+
var D = /** @class */ (function () {
function D() {
return 1;
diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.js b/tests/baselines/reference/classWithMultipleBaseClasses.js
index 353b22aa09d..e8aa9bddd22 100644
--- a/tests/baselines/reference/classWithMultipleBaseClasses.js
+++ b/tests/baselines/reference/classWithMultipleBaseClasses.js
@@ -27,20 +27,20 @@ interface I extends A, B {
//// [classWithMultipleBaseClasses.js]
var A = /** @class */ (function () {
function A() {
- }
- A.prototype.foo = function () { };
+ }A.prototype.foo = function () { };
return A;
}());
var B = /** @class */ (function () {
function B() {
- }
- B.prototype.bar = function () { };
+ }B.prototype.bar = function () { };
return B;
}());
+
+
+
var D = /** @class */ (function () {
function D() {
- }
- D.prototype.baz = function () { };
+ }D.prototype.baz = function () { };
D.prototype.bat = function () { };
return D;
}());
diff --git a/tests/baselines/reference/classWithNoConstructorOrBaseClass.js b/tests/baselines/reference/classWithNoConstructorOrBaseClass.js
index 40c870878e3..ad53f5a194c 100644
--- a/tests/baselines/reference/classWithNoConstructorOrBaseClass.js
+++ b/tests/baselines/reference/classWithNoConstructorOrBaseClass.js
@@ -24,6 +24,7 @@ var C = /** @class */ (function () {
}());
var c = new C();
var r = C;
+
var D = /** @class */ (function () {
function D() {
}
diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js
index 0ed9cefb246..129f0e7d586 100644
--- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js
+++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js
@@ -27,10 +27,10 @@ i = c;
//// [classWithOnlyPublicMembersEquivalentToInterface.js]
// no errors expected
+
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.y = function (a) { return null; };
+ }C.prototype.y = function (a) { return null; };
Object.defineProperty(C.prototype, "z", {
get: function () { return 1; },
set: function (v) { },
@@ -39,6 +39,7 @@ var C = /** @class */ (function () {
});
return C;
}());
+
var c;
var i;
c = i;
diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js
index bd5bcd65895..731f99018ce 100644
--- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js
+++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js
@@ -29,10 +29,10 @@ i = c;
//// [classWithOnlyPublicMembersEquivalentToInterface2.js]
// no errors expected
+
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.y = function (a) { return null; };
+ }C.prototype.y = function (a) { return null; };
Object.defineProperty(C.prototype, "z", {
get: function () { return 1; },
set: function (v) { },
@@ -41,6 +41,7 @@ var C = /** @class */ (function () {
});
return C;
}());
+
var c;
var i;
c = i;
diff --git a/tests/baselines/reference/classWithOptionalParameter.js b/tests/baselines/reference/classWithOptionalParameter.js
index a7e61a1c1f6..33f4887d020 100644
--- a/tests/baselines/reference/classWithOptionalParameter.js
+++ b/tests/baselines/reference/classWithOptionalParameter.js
@@ -13,15 +13,14 @@ class C2 {
//// [classWithOptionalParameter.js]
// classes do not permit optional parameters, these are errors
+
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.f = function () { };
+ }C.prototype.f = function () { };
return C;
}());
var C2 = /** @class */ (function () {
function C2() {
- }
- C2.prototype.f = function (x) { };
+ }C2.prototype.f = function (x) { };
return C2;
}());
diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js
index 8f32085d23a..458f1848e7e 100644
--- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js
+++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js
@@ -8,7 +8,6 @@ class C {
//// [classWithOverloadImplementationOfWrongName.js]
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.bar = function (x) { };
+ }C.prototype.bar = function (x) { };
return C;
}());
diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js
index 21e41c3a8d5..3205937531c 100644
--- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js
+++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js
@@ -8,7 +8,6 @@ class C {
//// [classWithOverloadImplementationOfWrongName2.js]
var C = /** @class */ (function () {
function C() {
- }
- C.prototype.bar = function (x) { };
+ }C.prototype.bar = function (x) { };
return C;
}());
diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames.js b/tests/baselines/reference/classWithPredefinedTypesAsNames.js
index 2fba9ebb08d..f728dfc07a5 100644
--- a/tests/baselines/reference/classWithPredefinedTypesAsNames.js
+++ b/tests/baselines/reference/classWithPredefinedTypesAsNames.js
@@ -8,23 +8,20 @@ class string { }
//// [classWithPredefinedTypesAsNames.js]
// classes cannot use predefined types as names
+
var any = /** @class */ (function () {
- function any() {
- }
+ function any() {}
return any;
}());
var number = /** @class */ (function () {
- function number() {
- }
+ function number() {}
return number;
}());
var boolean = /** @class */ (function () {
- function boolean() {
- }
+ function boolean() {}
return boolean;
}());
var string = /** @class */ (function () {
- function string() {
- }
+ function string() {}
return string;
}());
diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames2.js b/tests/baselines/reference/classWithPredefinedTypesAsNames2.js
index 12dacb1b8bb..3e4e067391f 100644
--- a/tests/baselines/reference/classWithPredefinedTypesAsNames2.js
+++ b/tests/baselines/reference/classWithPredefinedTypesAsNames2.js
@@ -5,9 +5,9 @@ class void {}
//// [classWithPredefinedTypesAsNames2.js]
// classes cannot use predefined types as names
+
var default_1 = /** @class */ (function () {
- function default_1() {
- }
+ function default_1() {}
return default_1;
}());
void {};
diff --git a/tests/baselines/reference/classWithPrivateProperty.js b/tests/baselines/reference/classWithPrivateProperty.js
index 1188b43c771..5c9658b83a8 100644
--- a/tests/baselines/reference/classWithPrivateProperty.js
+++ b/tests/baselines/reference/classWithPrivateProperty.js
@@ -29,8 +29,9 @@ var C = /** @class */ (function () {
this.a = '';
this.b = '';
this.d = function () { return ''; };
- }
- C.prototype.c = function () { return ''; };
+ }C.prototype.c = function () { return ''; };
+
+
C.f = function () { return ''; };
C.g = function () { return ''; };
return C;
diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js
index 91d4564a5d3..f973a96cba5 100644
--- a/tests/baselines/reference/classWithProtectedProperty.js
+++ b/tests/baselines/reference/classWithProtectedProperty.js
@@ -47,18 +47,17 @@ var C = /** @class */ (function () {
this.a = '';
this.b = '';
this.d = function () { return ''; };
- }
- C.prototype.c = function () { return ''; };
+ }C.prototype.c = function () { return ''; };
+
+
C.f = function () { return ''; };
C.g = function () { return ''; };
return C;
}());
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- D.prototype.method = function () {
+ }D.prototype.method = function () {
// No errors
var d = new D();
var r1 = d.x;
diff --git a/tests/baselines/reference/classWithPublicProperty.js b/tests/baselines/reference/classWithPublicProperty.js
index 879a4db8864..c1c4de736e2 100644
--- a/tests/baselines/reference/classWithPublicProperty.js
+++ b/tests/baselines/reference/classWithPublicProperty.js
@@ -27,8 +27,9 @@ var C = /** @class */ (function () {
this.a = '';
this.b = '';
this.d = function () { return ''; };
- }
- C.prototype.c = function () { return ''; };
+ }C.prototype.c = function () { return ''; };
+
+
C.f = function () { return ''; };
C.g = function () { return ''; };
return C;
diff --git a/tests/baselines/reference/classWithSemicolonClassElement1.js b/tests/baselines/reference/classWithSemicolonClassElement1.js
index 14f5aa172d0..6735fad5efa 100644
--- a/tests/baselines/reference/classWithSemicolonClassElement1.js
+++ b/tests/baselines/reference/classWithSemicolonClassElement1.js
@@ -6,7 +6,6 @@ class C {
//// [classWithSemicolonClassElement1.js]
var C = /** @class */ (function () {
function C() {
- }
- ;
+ };
return C;
}());
diff --git a/tests/baselines/reference/classWithSemicolonClassElement2.js b/tests/baselines/reference/classWithSemicolonClassElement2.js
index 63c6386bb3e..47b60ab3b91 100644
--- a/tests/baselines/reference/classWithSemicolonClassElement2.js
+++ b/tests/baselines/reference/classWithSemicolonClassElement2.js
@@ -7,8 +7,7 @@ class C {
//// [classWithSemicolonClassElement2.js]
var C = /** @class */ (function () {
function C() {
- }
- ;
+ };
;
return C;
}());
diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js
index d2a181c5b8d..32d60c4a798 100644
--- a/tests/baselines/reference/classWithStaticMembers.js
+++ b/tests/baselines/reference/classWithStaticMembers.js
@@ -32,13 +32,11 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var C = /** @class */ (function () {
+})();var C = /** @class */ (function () {
function C(a, b) {
this.a = a;
this.b = b;
- }
- C.fn = function () { return this; };
+ }C.fn = function () { return this; };
Object.defineProperty(C, "x", {
get: function () { return 1; },
set: function (v) { },
@@ -50,9 +48,9 @@ var C = /** @class */ (function () {
var r = C.fn();
var r2 = r.x;
var r3 = r.foo;
+
var D = /** @class */ (function (_super) {
- __extends(D, _super);
- function D() {
+ __extends(D, _super);function D() {
return _super !== null && _super.apply(this, arguments) || this;
}
return D;
diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.js b/tests/baselines/reference/classWithTwoConstructorDefinitions.js
index 2b65f40cae3..bccdedc1ef5 100644
--- a/tests/baselines/reference/classWithTwoConstructorDefinitions.js
+++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.js
@@ -11,12 +11,10 @@ class D {
//// [classWithTwoConstructorDefinitions.js]
var C = /** @class */ (function () {
- function C() {
- } // error
+ function C() {} // error
return C;
}());
var D = /** @class */ (function () {
- function D(x) {
- } // error
+ function D(x) {} // error
return D;
}());
diff --git a/tests/baselines/reference/classWithoutExplicitConstructor.js b/tests/baselines/reference/classWithoutExplicitConstructor.js
index 0627bf97563..f6ac100b405 100644
--- a/tests/baselines/reference/classWithoutExplicitConstructor.js
+++ b/tests/baselines/reference/classWithoutExplicitConstructor.js
@@ -25,6 +25,7 @@ var C = /** @class */ (function () {
}());
var c = new C();
var c2 = new C(null); // error
+
var D = /** @class */ (function () {
function D() {
this.x = 2;
diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js
index a3506a88035..1760761e22d 100644
--- a/tests/baselines/reference/classdecl.js
+++ b/tests/baselines/reference/classdecl.js
@@ -106,10 +106,10 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var a = /** @class */ (function () {
+})();var a = /** @class */ (function () {
function a(ns) {
}
+
a.prototype.pgF = function () { };
Object.defineProperty(a.prototype, "d", {
get: function () {
@@ -142,8 +142,7 @@ var a = /** @class */ (function () {
return a;
}());
var b = /** @class */ (function (_super) {
- __extends(b, _super);
- function b() {
+ __extends(b, _super);function b() {
return _super !== null && _super.apply(this, arguments) || this;
}
return b;
@@ -167,8 +166,7 @@ var m2;
var m3;
(function (m3) {
var c = /** @class */ (function (_super) {
- __extends(c, _super);
- function c() {
+ __extends(c, _super);function c() {
return _super !== null && _super.apply(this, arguments) || this;
}
return c;
@@ -183,8 +181,7 @@ var m2;
})(m3 = m2.m3 || (m2.m3 = {}));
})(m2 || (m2 = {}));
var c = /** @class */ (function (_super) {
- __extends(c, _super);
- function c() {
+ __extends(c, _super);function c() {
return _super !== null && _super.apply(this, arguments) || this;
}
return c;
@@ -194,18 +191,17 @@ var ib2 = /** @class */ (function () {
}
return ib2;
}());
+
var d = /** @class */ (function () {
function d() {
- }
- d.prototype.foo = function (ns) {
+ }d.prototype.foo = function (ns) {
return ns.toString();
};
return d;
}());
var e = /** @class */ (function () {
function e() {
- }
- e.prototype.foo = function (ns) {
+ }e.prototype.foo = function (ns) {
return ns.toString();
};
return e;
diff --git a/tests/baselines/reference/clinterfaces.js b/tests/baselines/reference/clinterfaces.js
index 8e5e28ebcb3..a1f34a4d991 100644
--- a/tests/baselines/reference/clinterfaces.js
+++ b/tests/baselines/reference/clinterfaces.js
@@ -30,16 +30,15 @@ export = Foo;
var M;
(function (M) {
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
var D = /** @class */ (function () {
- function D() {
- }
+ function D() {}
return D;
}());
})(M || (M = {}));
+
var Foo = /** @class */ (function () {
function Foo() {
}
@@ -50,4 +49,5 @@ var Bar = /** @class */ (function () {
}
return Bar;
}());
+
module.exports = Foo;
diff --git a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js
index 3e1f5a6adc4..14a453ef782 100644
--- a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js
+++ b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js
@@ -20,8 +20,7 @@ var A;
(function (A) {
var B = /** @class */ (function () {
function B() {
- }
- B.prototype.foo = function () { };
+ }B.prototype.foo = function () { };
B.bar = function () { };
return B;
}());
diff --git a/tests/baselines/reference/cloduleAndTypeParameters.js b/tests/baselines/reference/cloduleAndTypeParameters.js
index 4c8ca5e11ec..ddb5086b790 100644
--- a/tests/baselines/reference/cloduleAndTypeParameters.js
+++ b/tests/baselines/reference/cloduleAndTypeParameters.js
@@ -20,6 +20,7 @@ var Foo = /** @class */ (function () {
return Foo;
}());
(function (Foo) {
+
var Baz = /** @class */ (function () {
function Baz() {
}
diff --git a/tests/baselines/reference/cloduleGenericOnSelfMember.js b/tests/baselines/reference/cloduleGenericOnSelfMember.js
index fbd431d4709..d54460cff4b 100644
--- a/tests/baselines/reference/cloduleGenericOnSelfMember.js
+++ b/tests/baselines/reference/cloduleGenericOnSelfMember.js
@@ -24,15 +24,13 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var ServiceBase = /** @class */ (function () {
+})();var ServiceBase = /** @class */ (function () {
function ServiceBase() {
}
return ServiceBase;
}());
var Service = /** @class */ (function (_super) {
- __extends(Service, _super);
- function Service() {
+ __extends(Service, _super);function Service() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Service;
diff --git a/tests/baselines/reference/cloduleSplitAcrossFiles.js b/tests/baselines/reference/cloduleSplitAcrossFiles.js
index b6394b13015..68157552d5f 100644
--- a/tests/baselines/reference/cloduleSplitAcrossFiles.js
+++ b/tests/baselines/reference/cloduleSplitAcrossFiles.js
@@ -11,8 +11,7 @@ D.y;
//// [cloduleSplitAcrossFiles_class.js]
var D = /** @class */ (function () {
- function D() {
- }
+ function D() {}
return D;
}());
//// [cloduleSplitAcrossFiles_module.js]
diff --git a/tests/baselines/reference/cloduleStaticMembers.js b/tests/baselines/reference/cloduleStaticMembers.js
index 8d59de41e68..35e6d3250f8 100644
--- a/tests/baselines/reference/cloduleStaticMembers.js
+++ b/tests/baselines/reference/cloduleStaticMembers.js
@@ -23,6 +23,7 @@ var Clod = /** @class */ (function () {
(function (Clod) {
var p = Clod.x;
var q = x;
+
var s = Clod.y;
var t = y;
})(Clod || (Clod = {}));
diff --git a/tests/baselines/reference/cloduleTest2.js b/tests/baselines/reference/cloduleTest2.js
index 96221ed58a2..25fc09a75d1 100644
--- a/tests/baselines/reference/cloduleTest2.js
+++ b/tests/baselines/reference/cloduleTest2.js
@@ -40,25 +40,19 @@ var r2 = new m4d(); // error
var T1;
(function (T1) {
var m3d;
- (function (m3d) {
- m3d.y = 2;
- })(m3d || (m3d = {}));
+ (function (m3d) {m3d.y = 2;})(m3d || (m3d = {}));
var r = new m3d(); // error
})(T1 || (T1 = {}));
var T2;
(function (T2) {
var m3d;
- (function (m3d) {
- m3d.y = 2;
- })(m3d || (m3d = {}));
+ (function (m3d) {m3d.y = 2;})(m3d || (m3d = {}));
var r = new m3d(); // error
})(T2 || (T2 = {}));
var T3;
(function (T3) {
var m3d;
- (function (m3d) {
- m3d.y = 2;
- })(m3d || (m3d = {}));
+ (function (m3d) {m3d.y = 2;})(m3d || (m3d = {}));
var r = new m3d();
r.foo();
r.bar(); // error
@@ -67,17 +61,14 @@ var T3;
var T4;
(function (T4) {
var m3d;
- (function (m3d) {
- m3d.y = 2;
- })(m3d || (m3d = {}));
+ (function (m3d) {m3d.y = 2;})(m3d || (m3d = {}));
var r = new m3d();
r.foo();
r.bar(); // error
r.y; // error
})(T4 || (T4 = {}));
var m3d;
-(function (m3d) {
- m3d.y = 2;
-})(m3d || (m3d = {}));
+(function (m3d) {m3d.y = 2;})(m3d || (m3d = {}));
var r = new m3d(); // error
+
var r2 = new m4d(); // error
diff --git a/tests/baselines/reference/cloduleWithPriorUninstantiatedModule.js b/tests/baselines/reference/cloduleWithPriorUninstantiatedModule.js
index 166df315618..316681eee0b 100644
--- a/tests/baselines/reference/cloduleWithPriorUninstantiatedModule.js
+++ b/tests/baselines/reference/cloduleWithPriorUninstantiatedModule.js
@@ -16,6 +16,7 @@ module Moclodule {
}
//// [cloduleWithPriorUninstantiatedModule.js]
+
var Moclodule = /** @class */ (function () {
function Moclodule() {
}
diff --git a/tests/baselines/reference/cloduleWithRecursiveReference.js b/tests/baselines/reference/cloduleWithRecursiveReference.js
index 9b81239a01f..52bb9c6dafe 100644
--- a/tests/baselines/reference/cloduleWithRecursiveReference.js
+++ b/tests/baselines/reference/cloduleWithRecursiveReference.js
@@ -11,8 +11,7 @@ module M
var M;
(function (M) {
var C = /** @class */ (function () {
- function C() {
- }
+ function C() {}
return C;
}());
M.C = C;
diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js
index 1d522b86089..ed603d189b8 100644
--- a/tests/baselines/reference/clodulesDerivedClasses.js
+++ b/tests/baselines/reference/clodulesDerivedClasses.js
@@ -35,8 +35,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Shape = /** @class */ (function () {
+})();var Shape = /** @class */ (function () {
function Shape() {
}
return Shape;
@@ -49,8 +48,7 @@ var Shape = /** @class */ (function () {
})(Utils = Shape.Utils || (Shape.Utils = {}));
})(Shape || (Shape = {}));
var Path = /** @class */ (function (_super) {
- __extends(Path, _super);
- function Path() {
+ __extends(Path, _super);function Path() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Path;
diff --git a/tests/baselines/reference/collectionPatternNoError.js b/tests/baselines/reference/collectionPatternNoError.js
index eff09af0267..119820b6a72 100644
--- a/tests/baselines/reference/collectionPatternNoError.js
+++ b/tests/baselines/reference/collectionPatternNoError.js
@@ -40,20 +40,23 @@ function f<
//// [collectionPatternNoError.js]
var Message = /** @class */ (function () {
function Message() {
- }
- Message.prototype.clone = function () {
+ }Message.prototype.clone = function () {
return this;
};
return Message;
}());
+
function fetchMsg(protoCtor) {
return null;
}
+
var DataProvider = /** @class */ (function () {
- function DataProvider(message, messageList) {
+ function DataProvider(message,
+ messageList) {
this.message = message;
this.messageList = messageList;
}
+
DataProvider.prototype.fetch = function () {
var messageList = fetchMsg(this.messageList);
messageList.methodOnMessageList();
diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions.js b/tests/baselines/reference/collisionArgumentsArrowFunctions.js
index 3e56b8b2f9c..308ac1698f4 100644
--- a/tests/baselines/reference/collisionArgumentsArrowFunctions.js
+++ b/tests/baselines/reference/collisionArgumentsArrowFunctions.js
@@ -17,30 +17,33 @@ var f2NoError = () => {
}
//// [collisionArgumentsArrowFunctions.js]
-var f1 = function (i) {
- var arguments = [];
+var f1 = function (i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
var arguments; // no error
-};
-var f12 = function (arguments) {
- var rest = [];
+}
+;
+var f12 = function (arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
var arguments = 10; // no error
-};
+}
+;
var f1NoError = function (arguments) {
var arguments = 10; // no error
-};
-var f2 = function () {
- var restParameters = [];
+}
+
+;
+
+var f2 = function () {var restParameters = [];
for (var _i = 0; _i < arguments.length; _i++) {
restParameters[_i] = arguments[_i];
}
var arguments = 10; // No Error
-};
+}
+;
var f2NoError = function () {
var arguments = 10; // no error
};
diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor.js b/tests/baselines/reference/collisionArgumentsClassConstructor.js
index b9da6ba4fa4..0beb49b6b00 100644
--- a/tests/baselines/reference/collisionArgumentsClassConstructor.js
+++ b/tests/baselines/reference/collisionArgumentsClassConstructor.js
@@ -89,8 +89,7 @@ declare class c6NoError {
//// [collisionArgumentsClassConstructor.js]
// Constructors
var c1 = /** @class */ (function () {
- function c1(i) {
- var arguments = [];
+ function c1(i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
@@ -99,8 +98,7 @@ var c1 = /** @class */ (function () {
return c1;
}());
var c12 = /** @class */ (function () {
- function c12(arguments) {
- var rest = [];
+ function c12(arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
@@ -115,8 +113,7 @@ var c1NoError = /** @class */ (function () {
return c1NoError;
}());
var c2 = /** @class */ (function () {
- function c2() {
- var restParameters = [];
+ function c2() {var restParameters = [];
for (var _i = 0; _i < arguments.length; _i++) {
restParameters[_i] = arguments[_i];
}
@@ -131,8 +128,7 @@ var c2NoError = /** @class */ (function () {
return c2NoError;
}());
var c3 = /** @class */ (function () {
- function c3(arguments) {
- var restParameters = [];
+ function c3(arguments) {var restParameters = [];
for (var _i = 1; _i < arguments.length; _i++) {
restParameters[_i - 1] = arguments[_i];
}
@@ -148,9 +144,9 @@ var c3NoError = /** @class */ (function () {
}
return c3NoError;
}());
+
var c5 = /** @class */ (function () {
- function c5(i) {
- var arguments = [];
+ function c5(i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
@@ -159,8 +155,7 @@ var c5 = /** @class */ (function () {
return c5;
}());
var c52 = /** @class */ (function () {
- function c52(arguments) {
- var rest = [];
+ function c52(arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
@@ -174,3 +169,4 @@ var c5NoError = /** @class */ (function () {
}
return c5NoError;
}());
+
diff --git a/tests/baselines/reference/collisionArgumentsClassMethod.js b/tests/baselines/reference/collisionArgumentsClassMethod.js
index 3c2276f8ce5..1b456eb4f33 100644
--- a/tests/baselines/reference/collisionArgumentsClassMethod.js
+++ b/tests/baselines/reference/collisionArgumentsClassMethod.js
@@ -51,16 +51,13 @@ class c3 {
//// [collisionArgumentsClassMethod.js]
var c1 = /** @class */ (function () {
function c1() {
- }
- c1.prototype.foo = function (i) {
- var arguments = [];
+ }c1.prototype.foo = function (i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
var arguments; // no error
};
- c1.prototype.foo1 = function (arguments) {
- var rest = [];
+ c1.prototype.foo1 = function (arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
@@ -69,30 +66,30 @@ var c1 = /** @class */ (function () {
c1.prototype.fooNoError = function (arguments) {
var arguments = 10; // no error
};
- c1.prototype.f4 = function (i) {
- var arguments = [];
+
+ c1.prototype.f4 = function (i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
var arguments; // no error
};
- c1.prototype.f41 = function (arguments) {
- var rest = [];
+
+ c1.prototype.f41 = function (arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
var arguments; // no error
};
+
c1.prototype.f4NoError = function (arguments) {
var arguments; // no error
};
return c1;
}());
+
var c3 = /** @class */ (function () {
function c3() {
- }
- c3.prototype.foo = function () {
- var restParameters = [];
+ }c3.prototype.foo = function () {var restParameters = [];
for (var _i = 0; _i < arguments.length; _i++) {
restParameters[_i] = arguments[_i];
}
diff --git a/tests/baselines/reference/collisionArgumentsFunction.js b/tests/baselines/reference/collisionArgumentsFunction.js
index c6a26baa495..949c37039b1 100644
--- a/tests/baselines/reference/collisionArgumentsFunction.js
+++ b/tests/baselines/reference/collisionArgumentsFunction.js
@@ -46,15 +46,13 @@ declare function f6(arguments: string); // no codegen no error
//// [collisionArgumentsFunction.js]
// Functions
-function f1(arguments) {
- var restParameters = [];
+function f1(arguments) {var restParameters = [];
for (var _i = 1; _i < arguments.length; _i++) {
restParameters[_i - 1] = arguments[_i];
}
var arguments = 10; // no error
}
-function f12(i) {
- var arguments = [];
+function f12(i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
@@ -63,8 +61,9 @@ function f12(i) {
function f1NoError(arguments) {
var arguments = 10; // no error
}
-function f3() {
- var restParameters = [];
+
+
+function f3() {var restParameters = [];
for (var _i = 0; _i < arguments.length; _i++) {
restParameters[_i] = arguments[_i];
}
@@ -73,15 +72,14 @@ function f3() {
function f3NoError() {
var arguments = 10; // no error
}
-function f4(arguments) {
- var rest = [];
+
+function f4(arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
var arguments; // No error
}
-function f42(i) {
- var arguments = [];
+function f42(i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
@@ -90,3 +88,4 @@ function f42(i) {
function f4NoError(arguments) {
var arguments; // No error
}
+
diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions.js b/tests/baselines/reference/collisionArgumentsFunctionExpressions.js
index b3389ddbf4a..0d1c9062377 100644
--- a/tests/baselines/reference/collisionArgumentsFunctionExpressions.js
+++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions.js
@@ -36,15 +36,13 @@ function foo() {
//// [collisionArgumentsFunctionExpressions.js]
function foo() {
- function f1(arguments) {
- var restParameters = [];
+ function f1(arguments) {var restParameters = [];
for (var _i = 1; _i < arguments.length; _i++) {
restParameters[_i - 1] = arguments[_i];
}
var arguments = 10; // no error
}
- function f12(i) {
- var arguments = [];
+ function f12(i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
@@ -53,8 +51,8 @@ function foo() {
function f1NoError(arguments) {
var arguments = 10; // no error
}
- function f3() {
- var restParameters = [];
+
+ function f3() {var restParameters = [];
for (var _i = 0; _i < arguments.length; _i++) {
restParameters[_i] = arguments[_i];
}
@@ -63,15 +61,14 @@ function foo() {
function f3NoError() {
var arguments = 10; // no error
}
- function f4(arguments) {
- var rest = [];
+
+ function f4(arguments) {var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
var arguments; // No error
}
- function f42(i) {
- var arguments = [];
+ function f42(i) {var arguments = [];
for (var _i = 1; _i < arguments.length; _i++) {
arguments[_i - 1] = arguments[_i];
}
diff --git a/tests/baselines/reference/collisionArgumentsInType.js b/tests/baselines/reference/collisionArgumentsInType.js
index 4db7c930775..2d1dfaa15d6 100644
--- a/tests/baselines/reference/collisionArgumentsInType.js
+++ b/tests/baselines/reference/collisionArgumentsInType.js
@@ -17,5 +17,6 @@ var v21: {
//// [collisionArgumentsInType.js]
var v1; // no error - no code gen
var v12; // no error - no code gen
-var v2;
+var v2
+;
var v21;
diff --git a/tests/baselines/reference/collisionArgumentsInterfaceMembers.js b/tests/baselines/reference/collisionArgumentsInterfaceMembers.js
index a55e112b603..da3dd17b053 100644
--- a/tests/baselines/reference/collisionArgumentsInterfaceMembers.js
+++ b/tests/baselines/reference/collisionArgumentsInterfaceMembers.js
@@ -29,3 +29,5 @@ interface i3 {
}
//// [collisionArgumentsInterfaceMembers.js]
+
+
diff --git a/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js
index 23afcb0cae5..1ee4f69e7f5 100644
--- a/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js
+++ b/tests/baselines/reference/collisionCodeGenModuleWithConstructorChildren.js
@@ -28,16 +28,13 @@ var M;
(function (M_1) {
M_1.x = 3;
var c = /** @class */ (function () {
- function c(M, p) {
- if (p === void 0) { p = M_1.x; }
- }
+ function c(M, p) {if (p === void 0) { p = M_1.x; }}
return c;
}());
})(M || (M = {}));
(function (M_2) {
var d = /** @class */ (function () {
- function d(M, p) {
- if (p === void 0) { p = M_2.x; }
+ function d(M, p) {if (p === void 0) { p = M_2.x; }
this.M = M;
}
return d;
diff --git a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js
index afe3cb43f28..20ea5aeaf80 100644
--- a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js
+++ b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js
@@ -23,9 +23,7 @@ module M {
var M;
(function (M_1) {
M_1.x = 3;
- function fn(M, p) {
- if (p === void 0) { p = M_1.x; }
- }
+ function fn(M, p) {if (p === void 0) { p = M_1.x; }}
})(M || (M = {}));
(function (M_2) {
function fn2() {
diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js
index e75d84f9df4..fa0bcd93329 100644
--- a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js
+++ b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js
@@ -38,18 +38,14 @@ var M;
M_1.x = 3;
var c = /** @class */ (function () {
function c() {
- }
- c.prototype.fn = function (M, p) {
- if (p === void 0) { p = M_1.x; }
- };
+ }c.prototype.fn = function (M, p) {if (p === void 0) { p = M_1.x; }};
return c;
}());
})(M || (M = {}));
(function (M_2) {
var d = /** @class */ (function () {
function d() {
- }
- d.prototype.fn2 = function () {
+ }d.prototype.fn2 = function () {
var M;
var p = M_2.x;
};
@@ -59,8 +55,7 @@ var M;
(function (M_3) {
var e = /** @class */ (function () {
function e() {
- }
- e.prototype.fn3 = function () {
+ }e.prototype.fn3 = function () {
function M() {
var p = M_3.x;
}
@@ -71,8 +66,7 @@ var M;
(function (M) {
var f = /** @class */ (function () {
function f() {
- }
- f.prototype.M = function () {
+ }f.prototype.M = function () {
};
return f;
}());
diff --git a/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js b/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js
index 6a5056281a1..1ec137f48a0 100644
--- a/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js
+++ b/tests/baselines/reference/collisionCodeGenModuleWithUnicodeNames.js
@@ -20,3 +20,5 @@ var 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄü
才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123_1.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
})(才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 || (才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = {}));
var x = new 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123();
+
+
diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.js b/tests/baselines/reference/collisionExportsRequireAndAlias.js
index 87f1df2faf8..67210057e4a 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAlias.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAlias.js
@@ -23,8 +23,7 @@ define(["require", "exports"], function (require, exports) {
exports.__esModule = true;
exports.bar = void 0;
function bar() {
- }
- exports.bar = bar;
+ }exports.bar = bar;
});
//// [collisionExportsRequireAndAlias_file3333.js]
define(["require", "exports"], function (require, exports) {
@@ -32,8 +31,7 @@ define(["require", "exports"], function (require, exports) {
exports.__esModule = true;
exports.bar2 = void 0;
function bar2() {
- }
- exports.bar2 = bar2;
+ }exports.bar2 = bar2;
});
//// [collisionExportsRequireAndAlias_file2.js]
define(["require", "exports", "collisionExportsRequireAndAlias_file1", "collisionExportsRequireAndAlias_file3333"], function (require, exports, require, exports) {
@@ -42,10 +40,9 @@ define(["require", "exports", "collisionExportsRequireAndAlias_file1", "collisio
exports.foo2 = exports.foo = void 0;
function foo() {
require.bar();
- }
+ }// Error
exports.foo = foo;
function foo2() {
exports.bar2();
- }
- exports.foo2 = foo2;
+ }exports.foo2 = foo2;
});
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js
index 050799d4c2b..b316374458c 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js
@@ -17,6 +17,8 @@ module m2 {
define(["require", "exports"], function (require, exports) {
"use strict";
exports.__esModule = true;
+
+
var m2;
(function (m2) {
var a = 10;
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js
index 43d8c3cfd22..2eeb4d52d1f 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js
@@ -101,12 +101,10 @@ define(["require", "exports"], function (require, exports) {
exports.foo2 = exports.foo = void 0;
function foo() {
return null;
- }
- exports.foo = foo;
+ }exports.foo = foo;
function foo2() {
return null;
- }
- exports.foo2 = foo2;
+ }exports.foo2 = foo2;
var m2;
(function (m2) {
var a = 10;
@@ -115,5 +113,6 @@ define(["require", "exports"], function (require, exports) {
//// [collisionExportsRequireAndAmbientModule_globalFile.js]
var m4;
(function (m4) {
+
var a = 10;
})(m4 || (m4 = {}));
diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.js b/tests/baselines/reference/collisionExportsRequireAndClass.js
index 7bda97f5d1f..bcdcf6d9669 100644
--- a/tests/baselines/reference/collisionExportsRequireAndClass.js
+++ b/tests/baselines/reference/collisionExportsRequireAndClass.js
@@ -45,14 +45,12 @@ define(["require", "exports"], function (require, exports) {
function require() {
}
return require;
- }());
- exports.require = require;
+ }());exports.require = require;
var exports = /** @class */ (function () {
function exports() {
}
return exports;
- }());
- exports.exports = exports;
+ }());exports.exports = exports;
var m1;
(function (m1) {
var require = /** @class */ (function () {
diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.js b/tests/baselines/reference/collisionExportsRequireAndFunction.js
index d7779ccc260..20a12e53b3c 100644
--- a/tests/baselines/reference/collisionExportsRequireAndFunction.js
+++ b/tests/baselines/reference/collisionExportsRequireAndFunction.js
@@ -29,12 +29,10 @@ define(["require", "exports"], function (require, exports) {
exports.require = exports.exports = void 0;
function exports() {
return 1;
- }
- exports.exports = exports;
+ }exports.exports = exports;
function require() {
return "require";
- }
- exports.require = require;
+ }exports.require = require;
var m1;
(function (m1) {
function exports() {
diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.js b/tests/baselines/reference/collisionExportsRequireAndModule.js
index f2296f3f55e..b75478738be 100644
--- a/tests/baselines/reference/collisionExportsRequireAndModule.js
+++ b/tests/baselines/reference/collisionExportsRequireAndModule.js
@@ -107,8 +107,7 @@ define(["require", "exports"], function (require, exports) {
})(require = exports.require || (exports.require = {}));
function foo() {
return null;
- }
- exports.foo = foo;
+ }exports.foo = foo;
var exports;
(function (exports) {
var C = /** @class */ (function () {
@@ -120,8 +119,7 @@ define(["require", "exports"], function (require, exports) {
})(exports = exports.exports || (exports.exports = {}));
function foo2() {
return null;
- }
- exports.foo2 = foo2;
+ }exports.foo2 = foo2;
var m1;
(function (m1) {
var require;
diff --git a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js
index 6243321eb1d..8baaffaa662 100644
--- a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js
+++ b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js
@@ -21,10 +21,8 @@ define(["require", "exports"], function (require, exports) {
exports.foo2 = exports.foo = void 0;
function foo() {
return null;
- }
- exports.foo = foo;
+ }exports.foo = foo;
function foo2() {
return null;
- }
- exports.foo2 = foo2;
+ }exports.foo2 = foo2;
});
diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.js b/tests/baselines/reference/collisionExportsRequireAndVar.js
index b85b16ca051..c128e0f466e 100644
--- a/tests/baselines/reference/collisionExportsRequireAndVar.js
+++ b/tests/baselines/reference/collisionExportsRequireAndVar.js
@@ -32,8 +32,7 @@ define(["require", "exports"], function (require, exports) {
exports.__esModule = true;
exports.foo = void 0;
function foo() {
- }
- exports.foo = foo;
+ }exports.foo = foo;
var exports = 1;
var require = "require";
var m1;
diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.js b/tests/baselines/reference/collisionRestParameterArrowFunctions.js
index 3e20f48a4d0..9a8bd933f3a 100644
--- a/tests/baselines/reference/collisionRestParameterArrowFunctions.js
+++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.js
@@ -14,23 +14,26 @@ var f2NoError = () => {
}
//// [collisionRestParameterArrowFunctions.js]
-var f1 = function (_i) {
- var restParameters = [];
+var f1 = function (_i) {var restParameters = [];
for (var _a = 1; _a < arguments.length; _a++) {
restParameters[_a - 1] = arguments[_a];
}
var _i = 10; // no error
-};
+}
+;
var f1NoError = function (_i) {
var _i = 10; // no error
-};
-var f2 = function () {
- var restParameters = [];
+}
+
+;
+
+var f2 = function () {var restParameters = [];
for (var _a = 0; _a < arguments.length; _a++) {
restParameters[_a] = arguments[_a];
}
var _i = 10; // No Error
-};
+}
+;
var f2NoError = function () {
var _i = 10; // no error
};
diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.js b/tests/baselines/reference/collisionRestParameterClassConstructor.js
index ee6565cf0a1..19dfd973519 100644
--- a/tests/baselines/reference/collisionRestParameterClassConstructor.js
+++ b/tests/baselines/reference/collisionRestParameterClassConstructor.js
@@ -69,8 +69,7 @@ declare class c6NoError {
//// [collisionRestParameterClassConstructor.js]
// Constructors
var c1 = /** @class */ (function () {
- function c1(_i) {
- var restParameters = [];
+ function c1(_i) {var restParameters = [];
for (var _a = 1; _a < arguments.length; _a++) {
restParameters[_a - 1] = arguments[_a];
}
@@ -85,8 +84,7 @@ var c1NoError = /** @class */ (function () {
return c1NoError;
}());
var c2 = /** @class */ (function () {
- function c2() {
- var restParameters = [];
+ function c2() {var restParameters = [];
for (var _a = 0; _a < arguments.length; _a++) {
restParameters[_a] = arguments[_a];
}
@@ -101,8 +99,7 @@ var c2NoError = /** @class */ (function () {
return c2NoError;
}());
var c3 = /** @class */ (function () {
- function c3(_i) {
- var restParameters = [];
+ function c3(_i) {var restParameters = [];
for (var _a = 1; _a < arguments.length; _a++) {
restParameters[_a - 1] = arguments[_a];
}
@@ -118,9 +115,9 @@ var c3NoError = /** @class */ (function () {
}
return c3NoError;
}());
+
var c5 = /** @class */ (function () {
- function c5(_i) {
- var rest = [];
+ function c5(_i) {var rest = [];
for (var _a = 1; _a < arguments.length; _a++) {
rest[_a - 1] = arguments[_a];
}
@@ -134,3 +131,4 @@ var c5NoError = /** @class */ (function () {
}
return c5NoError;
}());
+
diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.js b/tests/baselines/reference/collisionRestParameterClassMethod.js
index 6c49ebe1350..fe158f6977e 100644
--- a/tests/baselines/reference/collisionRestParameterClassMethod.js
+++ b/tests/baselines/reference/collisionRestParameterClassMethod.js
@@ -41,9 +41,7 @@ class c3 {
//// [collisionRestParameterClassMethod.js]
var c1 = /** @class */ (function () {
function c1() {
- }
- c1.prototype.foo = function (_i) {
- var restParameters = [];
+ }c1.prototype.foo = function (_i) {var restParameters = [];
for (var _a = 1; _a < arguments.length; _a++) {
restParameters[_a - 1] = arguments[_a];
}
@@ -52,23 +50,24 @@ var c1 = /** @class */ (function () {
c1.prototype.fooNoError = function (_i) {
var _i = 10; // no error
};
- c1.prototype.f4 = function (_i) {
- var rest = [];
+
+ c1.prototype.f4 = function (_i) {var rest = [];
for (var _a = 1; _a < arguments.length; _a++) {
rest[_a - 1] = arguments[_a];
}
var _i; // no error
};
+
+
c1.prototype.f4NoError = function (_i) {
var _i; // no error
};
return c1;
}());
+
var c3 = /** @class */ (function () {
function c3() {
- }
- c3.prototype.foo = function () {
- var restParameters = [];
+ }c3.prototype.foo = function () {var restParameters = [];
for (var _a = 0; _a < arguments.length; _a++) {
restParameters[_a] = arguments[_a];
}
diff --git a/tests/baselines/reference/collisionRestParameterFunction.js b/tests/baselines/reference/collisionRestParameterFunction.js
index 651062a696c..d178d99e73d 100644
--- a/tests/baselines/reference/collisionRestParameterFunction.js
+++ b/tests/baselines/reference/collisionRestParameterFunction.js
@@ -35,8 +35,7 @@ declare function f6(_i: string); // no codegen no error
//// [collisionRestParameterFunction.js]
// Functions
-function f1(_i) {
- var restParameters = [];
+function f1(_i) {var restParameters = [];
for (var _a = 1; _a < arguments.length; _a++) {
restParameters[_a - 1] = arguments[_a];
}
@@ -45,8 +44,9 @@ function f1(_i) {
function f1NoError(_i) {
var _i = 10; // no error
}
-function f3() {
- var restParameters = [];
+
+
+function f3() {var restParameters = [];
for (var _a = 0; _a < arguments.length; _a++) {
restParameters[_a] = arguments[_a];
}
@@ -55,11 +55,14 @@ function f3() {
function f3NoError() {
var _i = 10; // no error
}
-function f4(_i) {
- var rest = [];
+
+function f4(_i) {var rest = [];
for (var _a = 1; _a < arguments.length; _a++) {
rest[_a - 1] = arguments[_a];
}
}
+
function f4NoError(_i) {
}
+
+
diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js
index 87bafea09bd..d6619d63c11 100644
--- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js
+++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js
@@ -26,8 +26,7 @@ function foo() {
//// [collisionRestParameterFunctionExpressions.js]
function foo() {
- function f1(_i) {
- var restParameters = [];
+ function f1(_i) {var restParameters = [];
for (var _a = 1; _a < arguments.length; _a++) {
restParameters[_a - 1] = arguments[_a];
}
@@ -36,8 +35,7 @@ function foo() {
function f1NoError(_i) {
var _i = 10; // no error
}
- function f3() {
- var restParameters = [];
+ function f3() {var restParameters = [];
for (var _a = 0; _a < arguments.length; _a++) {
restParameters[_a] = arguments[_a];
}
@@ -46,12 +44,13 @@ function foo() {
function f3NoError() {
var _i = 10; // no error
}
- function f4(_i) {
- var rest = [];
+
+ function f4(_i) {var rest = [];
for (var _a = 1; _a < arguments.length; _a++) {
rest[_a - 1] = arguments[_a];
}
}
+
function f4NoError(_i) {
}
}
diff --git a/tests/baselines/reference/collisionRestParameterInterfaceMembers.js b/tests/baselines/reference/collisionRestParameterInterfaceMembers.js
index 044ef871bf3..cec8eb4957b 100644
--- a/tests/baselines/reference/collisionRestParameterInterfaceMembers.js
+++ b/tests/baselines/reference/collisionRestParameterInterfaceMembers.js
@@ -22,3 +22,5 @@ interface i3 {
}
//// [collisionRestParameterInterfaceMembers.js]
+
+
diff --git a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js
index 4b09dfe6683..bcb742ac754 100644
--- a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js
+++ b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js
@@ -11,8 +11,7 @@ new Foo();
//// [collisionRestParameterUnderscoreIUsage.js]
var _i = "This is what I'd expect to see";
var Foo = /** @class */ (function () {
- function Foo() {
- var args = [];
+ function Foo() {var args = [];
for (var _a = 0; _a < arguments.length; _a++) {
args[_a] = arguments[_a];
}
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js
index 2814b7dc2b4..45ec6cebadb 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js
@@ -74,8 +74,7 @@ var Foo = /** @class */ (function () {
return Foo;
}());
var b = /** @class */ (function (_super_1) {
- __extends(b, _super_1);
- function b() {
+ __extends(b, _super_1);function b() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "prop2", {
@@ -94,8 +93,7 @@ var b = /** @class */ (function (_super_1) {
return b;
}(Foo));
var c = /** @class */ (function (_super_1) {
- __extends(c, _super_1);
- function c() {
+ __extends(c, _super_1);function c() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
}
Object.defineProperty(c.prototype, "prop2", {
@@ -103,14 +101,16 @@ var c = /** @class */ (function (_super_1) {
var x = function () {
function _super() {
}
- };
+ }
+ ;
return 10;
},
set: function (val) {
var x = function () {
function _super() {
}
- };
+ }
+ ;
},
enumerable: false,
configurable: true
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js
index abb43068394..a1f721c3270 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js
@@ -64,7 +64,8 @@ var c = /** @class */ (function (_super_1) {
var x = function () {
function _super() {
}
- };
+ }
+ ;
return _this;
}
return c;
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js
index 30bd47f7cdc..4ca405b4c72 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js
@@ -46,8 +46,7 @@ function _super() {
}
var Foo = /** @class */ (function () {
function Foo() {
- }
- Foo.prototype.x = function () {
+ }Foo.prototype.x = function () {
function _super() {
}
};
@@ -56,11 +55,9 @@ var Foo = /** @class */ (function () {
return Foo;
}());
var b = /** @class */ (function (_super_1) {
- __extends(b, _super_1);
- function b() {
+ __extends(b, _super_1);function b() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
- }
- b.prototype.foo = function () {
+ }b.prototype.foo = function () {
function _super() {
}
};
@@ -69,15 +66,14 @@ var b = /** @class */ (function (_super_1) {
return b;
}(Foo));
var c = /** @class */ (function (_super_1) {
- __extends(c, _super_1);
- function c() {
+ __extends(c, _super_1);function c() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
- }
- c.prototype.foo = function () {
+ }c.prototype.foo = function () {
var x = function () {
function _super() {
}
- };
+ }
+ ;
};
c.prototype._super = function () {
};
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js
index 7f1f6d38c95..8faf48ceca5 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js
@@ -46,8 +46,7 @@ var Foo = /** @class */ (function () {
return Foo;
}());
var b = /** @class */ (function (_super_1) {
- __extends(b, _super_1);
- function b() {
+ __extends(b, _super_1);function b() {
var _this = _super_1 !== null && _super_1.apply(this, arguments) || this;
_this.prop2 = {
doStuff: function () {
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js
index 7aa17672460..e5733b64c2f 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js
@@ -45,8 +45,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var _super = 10; // No Error
+})();var _super = 10; // No Error
var Foo = /** @class */ (function () {
function Foo() {
}
@@ -64,8 +63,7 @@ var Foo = /** @class */ (function () {
return Foo;
}());
var b = /** @class */ (function (_super_1) {
- __extends(b, _super_1);
- function b() {
+ __extends(b, _super_1);function b() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "prop2", {
@@ -82,21 +80,22 @@ var b = /** @class */ (function (_super_1) {
return b;
}(Foo));
var c = /** @class */ (function (_super_1) {
- __extends(c, _super_1);
- function c() {
+ __extends(c, _super_1);function c() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
}
Object.defineProperty(c.prototype, "prop2", {
get: function () {
var x = function () {
var _super = 10; // Should be error
- };
+ }
+ ;
return 10;
},
set: function (val) {
var x = function () {
var _super = 10; // Should be error
- };
+ }
+ ;
},
enumerable: false,
configurable: true
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js
index ffd052dfe75..24531da9850 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js
@@ -33,8 +33,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var _super = 10; // No Error
+})();var _super = 10; // No Error
var Foo = /** @class */ (function () {
function Foo() {
var _super = 10; // No error
@@ -56,7 +55,8 @@ var c = /** @class */ (function (_super_1) {
var _this = _super_1.call(this) || this;
var x = function () {
var _super = 10; // Should be error
- };
+ }
+ ;
return _this;
}
return c;
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js
index 110323d4973..c16aae9d19c 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js
@@ -31,35 +31,30 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var _super = 10; // No Error
+})();var _super = 10; // No Error
var Foo = /** @class */ (function () {
function Foo() {
- }
- Foo.prototype.x = function () {
+ }Foo.prototype.x = function () {
var _super = 10; // No error
};
return Foo;
}());
var b = /** @class */ (function (_super_1) {
- __extends(b, _super_1);
- function b() {
+ __extends(b, _super_1);function b() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
- }
- b.prototype.foo = function () {
+ }b.prototype.foo = function () {
var _super = 10; // Should be error
};
return b;
}(Foo));
var c = /** @class */ (function (_super_1) {
- __extends(c, _super_1);
- function c() {
+ __extends(c, _super_1);function c() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
- }
- c.prototype.foo = function () {
+ }c.prototype.foo = function () {
var x = function () {
var _super = 10; // Should be error
- };
+ }
+ ;
};
return c;
}(Foo));
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js
index e1330ff822a..e6796b66843 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js
@@ -30,8 +30,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var _super = 10; // No Error
+})();var _super = 10; // No Error
var Foo = /** @class */ (function () {
function Foo() {
this.prop1 = {
@@ -44,8 +43,7 @@ var Foo = /** @class */ (function () {
return Foo;
}());
var b = /** @class */ (function (_super_1) {
- __extends(b, _super_1);
- function b() {
+ __extends(b, _super_1);function b() {
var _this = _super_1 !== null && _super_1.apply(this, arguments) || this;
_this.prop2 = {
doStuff: function () {
diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js
index e3df51d1f99..891c5ebd83f 100644
--- a/tests/baselines/reference/collisionSuperAndNameResolution.js
+++ b/tests/baselines/reference/collisionSuperAndNameResolution.js
@@ -24,8 +24,8 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var console;
+})();var console
+;
var _super = 10; // No error
var base = /** @class */ (function () {
function base() {
@@ -33,11 +33,9 @@ var base = /** @class */ (function () {
return base;
}());
var Foo = /** @class */ (function (_super_1) {
- __extends(Foo, _super_1);
- function Foo() {
+ __extends(Foo, _super_1);function Foo() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
- }
- Foo.prototype.x = function () {
+ }Foo.prototype.x = function () {
console.log(_super); // Error as this doesnt not resolve to user defined _super
};
return Foo;
diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js
index 8b85ad6b9c5..e3836a2a693 100644
--- a/tests/baselines/reference/collisionSuperAndParameter.js
+++ b/tests/baselines/reference/collisionSuperAndParameter.js
@@ -75,21 +75,21 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Foo = /** @class */ (function () {
+})();var Foo = /** @class */ (function () {
function Foo() {
- }
- Foo.prototype.a = function () {
+ }Foo.prototype.a = function () {
var _this = this;
var lamda = function (_super) {
return function (x) { return _this; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
Foo.prototype.b = function (_super) {
var _this = this;
var lambda = function () {
return function (x) { return _this; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
Object.defineProperty(Foo.prototype, "c", {
set: function (_super) {
@@ -101,6 +101,25 @@ var Foo = /** @class */ (function () {
}());
var Foo2 = /** @class */ (function (_super_1) {
__extends(Foo2, _super_1);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
function Foo2(_super) {
var _this = _super_1.call(this) || this;
_this.prop4 = {
@@ -108,18 +127,19 @@ var Foo2 = /** @class */ (function (_super_1) {
}
};
return _this;
- }
- Foo2.prototype.x = function () {
+ }Foo2.prototype.x = function () {
var _this = this;
var lamda = function (_super) {
return function (x) { return _this; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
Foo2.prototype.y = function (_super) {
var _this = this;
var lambda = function () {
return function (x) { return _this; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
Object.defineProperty(Foo2.prototype, "z", {
set: function (_super) {
@@ -129,16 +149,20 @@ var Foo2 = /** @class */ (function (_super_1) {
});
return Foo2;
}(Foo));
+
var Foo4 = /** @class */ (function (_super_1) {
__extends(Foo4, _super_1);
+
function Foo4(_super) {
return _super_1.call(this) || this;
}
+
Foo4.prototype.y = function (_super) {
var _this = this;
var lambda = function () {
return function (x) { return _this; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
return Foo4;
}(Foo));
diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js
index e06489e356a..ef82c44dbe5 100644
--- a/tests/baselines/reference/collisionSuperAndParameter1.js
+++ b/tests/baselines/reference/collisionSuperAndParameter1.js
@@ -22,20 +22,18 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var Foo = /** @class */ (function () {
+})();var Foo = /** @class */ (function () {
function Foo() {
}
return Foo;
}());
var Foo2 = /** @class */ (function (_super_1) {
- __extends(Foo2, _super_1);
- function Foo2() {
+ __extends(Foo2, _super_1);function Foo2() {
return _super_1 !== null && _super_1.apply(this, arguments) || this;
- }
- Foo2.prototype.x = function () {
+ }Foo2.prototype.x = function () {
var lambda = function (_super) {
- };
+ }
+ ;
};
return Foo2;
}(Foo));
diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js
index 5e066b7ad09..e1c79fa2c21 100644
--- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js
+++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js
@@ -43,8 +43,7 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var a = /** @class */ (function () {
+})();var a = /** @class */ (function () {
function a() {
}
return a;
@@ -67,6 +66,7 @@ var b2 = /** @class */ (function (_super_1) {
}(a));
var b3 = /** @class */ (function (_super_1) {
__extends(b3, _super_1);
+
function b3(_super) {
return _super_1.call(this) || this;
}
@@ -74,6 +74,7 @@ var b3 = /** @class */ (function (_super_1) {
}(a));
var b4 = /** @class */ (function (_super_1) {
__extends(b4, _super_1);
+
function b4(_super) {
var _this = _super_1.call(this) || this;
_this._super = _super;
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js
index fd782ed9273..49cd2939882 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js
@@ -54,8 +54,11 @@ var class1 = /** @class */ (function () {
doStuff: function (callback) { return function () {
var _this = 2;
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+
+ ;
return 10;
},
set: function (val) {
@@ -64,8 +67,12 @@ var class1 = /** @class */ (function () {
doStuff: function (callback) { return function () {
var _this = 2;
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+
+ ;
+
},
enumerable: false,
configurable: true
@@ -82,8 +89,11 @@ var class2 = /** @class */ (function () {
var x2 = {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+
+ ;
return 10;
},
set: function (val) {
@@ -92,8 +102,12 @@ var class2 = /** @class */ (function () {
var x2 = {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+
+ ;
+
},
enumerable: false,
configurable: true
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js
index e5e2a92d9d1..3d74ea4ebc1 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js
@@ -29,8 +29,10 @@ var class1 = /** @class */ (function () {
doStuff: function (callback) { return function () {
var _this = 2;
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+ ;
}
return class1;
}());
@@ -41,8 +43,10 @@ var class2 = /** @class */ (function () {
var x2 = {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+ ;
}
return class2;
}());
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js
index 27de7125b8e..2c1fbe16c4b 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js
@@ -8,9 +8,11 @@ function x() {
}
//// [collisionThisExpressionAndLocalVarInFunction.js]
-var console;
+var console
+;
function x() {
var _this_1 = this;
var _this = 5;
- (function (x) { console.log(_this_1.x); });
+ (
+ function (x) { console.log(_this_1.x); });
}
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js
index be2785ddfba..b4c2d0aae71 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js
@@ -11,10 +11,13 @@ alert(x.doStuff(x => alert(x)));
//// [collisionThisExpressionAndLocalVarInLambda.js]
var _this_1 = this;
+
var x = {
doStuff: function (callback) { return function () {
var _this = 2;
return callback(_this_1);
- }; }
-};
+ };
+ }
+}
+;
alert(x.doStuff(function (x) { return alert(x); }));
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js
index 16f288174a5..6eebda086ce 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js
@@ -21,14 +21,14 @@ class a {
//// [collisionThisExpressionAndLocalVarInMethod.js]
var a = /** @class */ (function () {
function a() {
- }
- a.prototype.method1 = function () {
+ }a.prototype.method1 = function () {
var _this_1 = this;
return {
doStuff: function (callback) { return function () {
var _this = 2;
return callback(_this_1);
- }; }
+ };
+ }
};
};
a.prototype.method2 = function () {
@@ -37,7 +37,8 @@ var a = /** @class */ (function () {
return {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
+ };
+ }
};
};
return a;
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js
index 70760396df6..86df15224cb 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js
@@ -27,7 +27,8 @@ var class1 = /** @class */ (function () {
doStuff: function (callback) { return function () {
var _this = 2;
return callback(_this_1);
- }; }
+ };
+ }
};
}
return class1;
@@ -38,7 +39,8 @@ var class2 = /** @class */ (function () {
this.prop1 = {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
+ };
+ }
};
var _this = 2;
}
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js
index 0c952a75e2c..f237557ea1d 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js
@@ -31,20 +31,16 @@ var __extends = (this && this.__extends) || (function () {
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
-})();
-var a = /** @class */ (function () {
+})();var a = /** @class */ (function () {
function a() {
- }
- a.prototype.foo = function () {
+ }a.prototype.foo = function () {
};
return a;
}());
var b = /** @class */ (function (_super) {
- __extends(b, _super);
- function b() {
+ __extends(b, _super);function b() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- b.prototype.foo = function () {
+ }b.prototype.foo = function () {
var _this_1 = this;
var _this = 10;
var f = function () { return _super.prototype.foo.call(_this_1); };
@@ -52,16 +48,15 @@ var b = /** @class */ (function (_super) {
return b;
}(a));
var b2 = /** @class */ (function (_super) {
- __extends(b2, _super);
- function b2() {
+ __extends(b2, _super);function b2() {
return _super !== null && _super.apply(this, arguments) || this;
- }
- b2.prototype.foo = function () {
+ }b2.prototype.foo = function () {
var _this_1 = this;
var f = function () {
var _this = 10;
return _super.prototype.foo.call(_this_1);
- };
+ }
+ ;
};
return b2;
}(a));
diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js
index 380449edc21..db7acca4c6b 100644
--- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js
+++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js
@@ -13,11 +13,11 @@ class Foo {
}
//// [collisionThisExpressionAndNameResolution.js]
-var console;
+var console
+;
var Foo = /** @class */ (function () {
function Foo() {
- }
- Foo.prototype.x = function () {
+ }Foo.prototype.x = function () {
var _this = 10; // Local var. No this capture in x(), so no conflict.
function inner() {
var _this_1 = this;
diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.js b/tests/baselines/reference/collisionThisExpressionAndParameter.js
index b6367480e02..5e659849216 100644
--- a/tests/baselines/reference/collisionThisExpressionAndParameter.js
+++ b/tests/baselines/reference/collisionThisExpressionAndParameter.js
@@ -96,8 +96,7 @@ declare function f4(_this: string); // no code gen - no error
//// [collisionThisExpressionAndParameter.js]
var Foo = /** @class */ (function () {
function Foo() {
- }
- Foo.prototype.x = function () {
+ }Foo.prototype.x = function () {
var _this = 10; // Local var. No this capture in x(), so no conflict.
function inner(_this) {
var _this_1 = this;
@@ -108,14 +107,17 @@ var Foo = /** @class */ (function () {
var _this_1 = this;
var lamda = function (_this) {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
Foo.prototype.z = function (_this) {
var _this_1 = this;
var lambda = function () {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
+
Foo.prototype.x1 = function () {
var _this = 10; // Local var. No this capture in x(), so no conflict.
function inner(_this) {
@@ -123,11 +125,13 @@ var Foo = /** @class */ (function () {
};
Foo.prototype.y1 = function () {
var lamda = function (_this) {
- };
+ }
+ ;
};
Foo.prototype.z1 = function (_this) {
var lambda = function () {
- };
+ }
+ ;
};
return Foo;
}());
@@ -137,33 +141,48 @@ var Foo1 = /** @class */ (function () {
var x2 = {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+ ;
}
return Foo1;
}());
+
function f1(_this) {
var _this_1 = this;
- (function (x) { console.log(_this_1.x); });
+ (
+ function (x) { console.log(_this_1.x); });
}
+
+
var Foo3 = /** @class */ (function () {
function Foo3(_this) {
var _this_1 = this;
var x2 = {
doStuff: function (callback) { return function () {
return callback(_this_1);
- }; }
- };
+ };
+ }
+ }
+ ;
}
+
+
Foo3.prototype.z = function (_this) {
var _this_1 = this;
var lambda = function () {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
};
return Foo3;
}());
+
function f3(_this) {
var _this_1 = this;
- (function (x) { console.log(_this_1.x); });
+ (
+ function (x) { console.log(_this_1.x); });
}
+
+
diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js
index 360b147ad24..97737ed5308 100644
--- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js
+++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js
@@ -41,7 +41,8 @@ var Foo2 = /** @class */ (function () {
var _this_1 = this;
var lambda = function () {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
}
return Foo2;
}());
@@ -51,7 +52,8 @@ var Foo3 = /** @class */ (function () {
this._this = _this;
var lambda = function () {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
}
return Foo3;
}());
@@ -60,7 +62,8 @@ var Foo4 = /** @class */ (function () {
var _this_1 = this;
var lambda = function () {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
}
return Foo4;
}());
@@ -70,7 +73,8 @@ var Foo5 = /** @class */ (function () {
this._this = _this;
var lambda = function () {
return function (x) { return _this_1; }; // New scope. So should inject new _this capture
- };
+ }
+ ;
}
return Foo5;
}());
diff --git a/tests/baselines/reference/commaOperatorInvalidAssignmentType.js b/tests/baselines/reference/commaOperatorInvalidAssignmentType.js
index 0d6b9389cfc..ef090994139 100644
--- a/tests/baselines/reference/commaOperatorInvalidAssignmentType.js
+++ b/tests/baselines/reference/commaOperatorInvalidAssignmentType.js
@@ -22,13 +22,20 @@ resultIsString = (STRING, NUMBER);
var BOOLEAN;
var NUMBER;
var STRING;
-var resultIsBoolean;
-var resultIsNumber;
-var resultIsString;
+
+var resultIsBoolean
+;
+var resultIsNumber
+;
+var resultIsString
+
+;
//Expect errors when the results type is different form the second operand
resultIsBoolean = (BOOLEAN, STRING);
resultIsBoolean = (BOOLEAN, NUMBER);
+
resultIsNumber = (NUMBER, BOOLEAN);
resultIsNumber = (NUMBER, STRING);
+
resultIsString = (STRING, BOOLEAN);
resultIsString = (STRING, NUMBER);
diff --git a/tests/baselines/reference/commaOperatorLeftSideUnused.js b/tests/baselines/reference/commaOperatorLeftSideUnused.js
index 3ca4abfa8cd..884d707f2c4 100644
--- a/tests/baselines/reference/commaOperatorLeftSideUnused.js
+++ b/tests/baselines/reference/commaOperatorLeftSideUnused.js
@@ -56,6 +56,7 @@ xx = (xx as any, 100);
//// [commaOperatorLeftSideUnused.js]
var xx;
var yy;
+
function fn() {
var arr = [];
switch (arr.length) {
@@ -66,8 +67,10 @@ function fn() {
return 'more than one';
}
}
+
// Should error
var x = Math.pow((3, 5), 2);
+
// Should error
var a = [(3 + 4), ((1 + 1, 8) * 4)];
// Error cases
@@ -91,6 +94,7 @@ xx = (!xx, 10);
xx = (~xx, 10);
xx = (-xx, 10);
xx = (+xx, 10);
+
// OK cases
xx = (xx ? x++ : 4, 10);
xx = (--xx, 3);
diff --git a/tests/baselines/reference/commaOperatorOtherInvalidOperation.js b/tests/baselines/reference/commaOperatorOtherInvalidOperation.js
index d14dec67709..cb3a912560e 100644
--- a/tests/baselines/reference/commaOperatorOtherInvalidOperation.js
+++ b/tests/baselines/reference/commaOperatorOtherInvalidOperation.js
@@ -20,6 +20,8 @@ function foo(x, y) {
return x, y;
}
var resultIsString = foo(1, "123"); //error here
+
+
//TypeParameters
function foo1() {
var x;
diff --git a/tests/baselines/reference/commaOperatorOtherValidOperation.js b/tests/baselines/reference/commaOperatorOtherValidOperation.js
index 383b7c5058e..c37bb94040b 100644
--- a/tests/baselines/reference/commaOperatorOtherValidOperation.js
+++ b/tests/baselines/reference/commaOperatorOtherValidOperation.js
@@ -25,11 +25,13 @@ function foo1()
//Comma operator in for loop
for (var i = 0, j = 10; i < j; i++, j--) {
}
+
//Comma operator in fuction arguments and return
function foo(x, y) {
return x, y;
}
var resultIsString = foo(1, "123");
+
//TypeParameters
function foo1() {
var x;
diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js
index 522bbbe4e19..f4669c1b208 100644
--- a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js
+++ b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js
@@ -55,6 +55,7 @@ var resultIsAny2 = (BOOLEAN, ANY);
var resultIsAny3 = (NUMBER, ANY);
var resultIsAny4 = (STRING, ANY);
var resultIsAny5 = (OBJECT, ANY);
+
//Literal and expression
var x;
1, ANY;
diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js
index 905eb8b7d6a..30797a75e4f 100644
--- a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js
+++ b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js
@@ -45,6 +45,7 @@ var BOOLEAN;
var NUMBER;
var STRING;
var OBJECT;
+
var CLASS = /** @class */ (function () {
function CLASS() {
}
diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js
index 412e9e83121..ac28e5a5eeb 100644
--- a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js
+++ b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js
@@ -43,6 +43,7 @@ var BOOLEAN;
var NUMBER;
var STRING;
var OBJECT;
+
var resultIsString;
//The second operand is string
ANY, STRING;
diff --git a/tests/baselines/reference/commaOperatorWithoutOperand.js b/tests/baselines/reference/commaOperatorWithoutOperand.js
index d52b8212344..c73ee70277b 100644
--- a/tests/baselines/reference/commaOperatorWithoutOperand.js
+++ b/tests/baselines/reference/commaOperatorWithoutOperand.js
@@ -36,11 +36,13 @@ var OBJECT;
(NUMBER, );
(STRING, );
(OBJECT, );
+
// Missing the first operand
(, ANY);
(, BOOLEAN);
(, NUMBER);
(, STRING);
(, OBJECT);
+
// Missing all operands
(, );
diff --git a/tests/baselines/reference/commentEmittingInPreserveJsx1.js b/tests/baselines/reference/commentEmittingInPreserveJsx1.js
index 45e2148e007..3c786974d8d 100644
--- a/tests/baselines/reference/commentEmittingInPreserveJsx1.js
+++ b/tests/baselines/reference/commentEmittingInPreserveJsx1.js
@@ -37,11 +37,13 @@ var React = require("react");
// Not Comment
;
+
// Not Comment
// Another not Comment
;
+
// Not Comment
{
@@ -49,6 +51,7 @@ var React = require("react");
"Hi"}
// Another not Comment
;
+