++classStaticBlock5.ts(8,22): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
++classStaticBlock5.ts(12,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
++classStaticBlock5.ts(13,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
++
++
++==== classStaticBlock5.ts (3 errors) ====
++ class B {
++ static a = 1;
++ static b = 2;
++ }
++
++ class C extends B {
++ static b = 3;
++ static c = super.a
++ ~
++!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
++
++ static {
++ this.b;
++ super.b;
++ ~
++!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
++ super.a;
++ ~
++!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
++ }
++ }
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlock5(target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlock5(target=es5).js.diff
index 523a9b1e11..0db565f1d0 100644
--- a/testdata/baselines/reference/submodule/conformance/classStaticBlock5(target=es5).js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classStaticBlock5(target=es5).js.diff
@@ -4,23 +4,21 @@
//// [classStaticBlock5.js]
--let B = (() => {
-- class B {
-- }
-- B.a = 1;
-- B.b = 2;
-- return B;
+-var _a, _b;
+ class B {
+-}
+-B.a = 1;
+-B.b = 2;
+-class C extends (_b = B) {
+-}
+-_a = C;
+-C.b = 3;
+-C.c = Reflect.get(_b, "a", _a);
+-(() => {
+- _a.b;
+- Reflect.get(_b, "b", _a);
+- Reflect.get(_b, "a", _a);
-})();
--let C = (() => {
-- var _a;
-- class C extends B {
-- }
-- _a = C;
-- C.b = 3;
-- C.c = super.a;
-- (() => {
-- _a.b;
-+class B {
+ static a = 1;
+ static b = 2;
+}
@@ -29,10 +27,7 @@
+ static c = super.a;
+ static {
+ this.b;
- super.b;
- super.a;
-- })();
-- return C;
--})();
++ super.b;
++ super.a;
+ }
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlock6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlock6.errors.txt.diff
deleted file mode 100644
index 5e113bc0ec..0000000000
--- a/testdata/baselines/reference/submodule/conformance/classStaticBlock6.errors.txt.diff
+++ /dev/null
@@ -1,27 +0,0 @@
---- old.classStaticBlock6.errors.txt
-+++ new.classStaticBlock6.errors.txt
-@@= skipped -9, +9 lines =@@
- classStaticBlock6.ts(41,13): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
- classStaticBlock6.ts(42,13): error TS18037: 'await' expression cannot be used inside a class static block.
- classStaticBlock6.ts(42,18): error TS1109: Expression expected.
--classStaticBlock6.ts(45,17): error TS2522: The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method.
- classStaticBlock6.ts(46,22): error TS1109: Expression expected.
- classStaticBlock6.ts(55,13): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
- classStaticBlock6.ts(66,14): error TS2729: Property 'b' is used before its initialization.
- classStaticBlock6.ts(69,18): error TS2729: Property 'b' is used before its initialization.
-
-
--==== classStaticBlock6.ts (17 errors) ====
-+==== classStaticBlock6.ts (16 errors) ====
- class B {
- static a = 1;
- }
-@@= skipped -77, +76 lines =@@
-
- async function ff () {
- arguments;
-- ~~~~~~~~~
--!!! error TS2522: The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method.
- await;
- ~
- !!! error TS1109: Expression expected.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlock6.js.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlock6.js.diff
index 4193dfb70e..4a7a3db40e 100644
--- a/testdata/baselines/reference/submodule/conformance/classStaticBlock6.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classStaticBlock6.js.diff
@@ -13,16 +13,29 @@
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
--let B = (() => {
-- class B {
+-var _a, _b, _c;
+ class B {
+-}
+-B.a = 1;
+-class C extends (_b = B) {
+-}
+-_a = C;
+-(() => {
+- let await = 1;
+- let arguments = 1;
+- let eval = 1;
+-})();
+-(() => {
+- yield ;
+- if (true) {
- }
-- B.a = 1;
-- return B;
+- arguments;
+- yield ;
+- super();
-})();
-+class B {
+ static a = 1;
+}
- class C extends B {
++class C extends B {
+ static {
+ let await = 1;
+ let arguments = 1;
@@ -36,46 +49,38 @@
+ await ;
+ super();
+ }
- }
--(() => {
-- let await = 1;
-- let arguments = 1;
-- let eval = 1;
--})();
--(() => {
-- yield ;
-- if (true) {
-- }
-- arguments;
-- yield ;
-- super();
--})();
++}
class CC {
constructor() {
- class C extends B {
+- var _d, _e;
+- class C extends (_e = B) {
- }
+- _d = C;
- (() => {
- class CC extends B {
- constructor() {
- super();
+- }
+- }
+- super();
+- })();
+- }
+-}
+-function foo() {
+- return __awaiter(this, void 0, void 0, function* () {
+ class C extends B {
+ static {
+ class CC extends B {
+ constructor() {
+ super();
+ }
- }
++ }
+ super();
- }
-- super();
-- })();
-+ }
- }
- }
--function foo() {
-- return __awaiter(this, void 0, void 0, function* () {
-- class C extends B {
-- }
++ }
+ }
- (() => {
++ }
++}
+async function foo() {
+ class C extends B {
+ static {
@@ -112,25 +117,22 @@
- })();
+ }
}
--let foo2 = (() => {
-- var _a;
-- class foo2 {
-- }
-- _a = foo2;
-- (() => {
-- _a.b; // should error
-+class foo2 {
+ class foo2 {
+-}
+-_c = foo2;
+-(() => {
+- _c.b; // should error
+- let b; // ok
+- if (1) {
+- _c.b; // should error
+ static {
+ this.b; // should error
- let b; // ok
- if (1) {
-- _a.b; // should error
++ let b; // ok
++ if (1) {
+ this.b; // should error
- }
-- })();
-- foo2.b = 1;
-- return foo2;
++ }
+ }
-})();
-+ }
+-foo2.b = 1;
+ static b = 1;
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classStaticBlock9(target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/classStaticBlock9(target=es5).js.diff
index 00a878e394..409ed7e65f 100644
--- a/testdata/baselines/reference/submodule/conformance/classStaticBlock9(target=es5).js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classStaticBlock9(target=es5).js.diff
@@ -1,22 +1,17 @@
--- old.classStaticBlock9(target=es5).js
+++ new.classStaticBlock9(target=es5).js
-@@= skipped -10, +10 lines =@@
-
+@@= skipped -11, +11 lines =@@
//// [classStaticBlock9.js]
--let A = (() => {
-- class A {
-- }
-- A.bar = A.foo + 1;
-- (() => {
-+class A {
+ class A {
+ static bar = A.foo + 1;
+ static {
- A.foo + 2;
-- })();
-- A.foo = 1;
-- return A;
--})();
++ A.foo + 2;
+ }
+ static foo = 1;
-+}
\ No newline at end of file
+ }
+-A.bar = A.foo + 1;
+-(() => {
+- A.foo + 2;
+-})();
+-A.foo = 1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classWithPrivateProperty.js.diff b/testdata/baselines/reference/submodule/conformance/classWithPrivateProperty.js.diff
index 5e302ae489..2623009813 100644
--- a/testdata/baselines/reference/submodule/conformance/classWithPrivateProperty.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classWithPrivateProperty.js.diff
@@ -1,32 +1,24 @@
--- old.classWithPrivateProperty.js
+++ new.classWithPrivateProperty.js
-@@= skipped -25, +25 lines =@@
-
+@@= skipped -26, +26 lines =@@
//// [classWithPrivateProperty.js]
// accessing any private outside the class is an error
--let C = (() => {
-- class C {
-- constructor() {
-- this.a = '';
-- this.b = '';
-- this.d = () => '';
-- }
-- c() { return ''; }
-- static f() { return ''; }
+ class C {
+- constructor() {
+- this.a = '';
+- this.b = '';
+- this.d = () => '';
- }
-- C.g = () => '';
-- return C;
--})();
-+class C {
+ x;
+ a = '';
+ b = '';
-+ c() { return ''; }
+ c() { return ''; }
+ d = () => '';
+ static e;
-+ static f() { return ''; }
+ static f() { return ''; }
+ static g = () => '';
-+}
+ }
+-C.g = () => '';
var c = new C();
var r1 = c.x;
var r2 = c.a;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classWithProtectedProperty.js.diff b/testdata/baselines/reference/submodule/conformance/classWithProtectedProperty.js.diff
index 825229b1b7..1b148e2dac 100644
--- a/testdata/baselines/reference/submodule/conformance/classWithProtectedProperty.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classWithProtectedProperty.js.diff
@@ -1,32 +1,24 @@
--- old.classWithProtectedProperty.js
+++ new.classWithProtectedProperty.js
-@@= skipped -30, +30 lines =@@
-
+@@= skipped -31, +31 lines =@@
//// [classWithProtectedProperty.js]
// accessing any protected outside the class is an error
--let C = (() => {
-- class C {
-- constructor() {
-- this.a = '';
-- this.b = '';
-- this.d = () => '';
-- }
-- c() { return ''; }
-- static f() { return ''; }
+ class C {
+- constructor() {
+- this.a = '';
+- this.b = '';
+- this.d = () => '';
- }
-- C.g = () => '';
-- return C;
--})();
-+class C {
+ x;
+ a = '';
+ b = '';
-+ c() { return ''; }
+ c() { return ''; }
+ d = () => '';
+ static e;
-+ static f() { return ''; }
+ static f() { return ''; }
+ static g = () => '';
-+}
+ }
+-C.g = () => '';
class D extends C {
method() {
// No errors
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classWithPublicProperty.js.diff b/testdata/baselines/reference/submodule/conformance/classWithPublicProperty.js.diff
index 4e0d8e5aa1..69631df5d6 100644
--- a/testdata/baselines/reference/submodule/conformance/classWithPublicProperty.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classWithPublicProperty.js.diff
@@ -1,32 +1,24 @@
--- old.classWithPublicProperty.js
+++ new.classWithPublicProperty.js
-@@= skipped -23, +23 lines =@@
- var r8: string = C.g();
+@@= skipped -24, +24 lines =@@
//// [classWithPublicProperty.js]
--let C = (() => {
-- class C {
-- constructor() {
-- this.a = '';
-- this.b = '';
-- this.d = () => '';
-- }
-- c() { return ''; }
-- static f() { return ''; }
+ class C {
+- constructor() {
+- this.a = '';
+- this.b = '';
+- this.d = () => '';
- }
-- C.g = () => '';
-- return C;
--})();
-+class C {
+ x;
+ a = '';
+ b = '';
-+ c() { return ''; }
+ c() { return ''; }
+ d = () => '';
+ static e;
-+ static f() { return ''; }
+ static f() { return ''; }
+ static g = () => '';
-+}
+ }
+-C.g = () => '';
// all of these are valid
var c = new C();
var r1 = c.x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterBindingPattern(target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterBindingPattern(target=es5).js.diff
index bbfc9e85ff..1d22c3734e 100644
--- a/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterBindingPattern(target=es5).js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterBindingPattern(target=es5).js.diff
@@ -4,10 +4,10 @@
//// [classWithStaticFieldInParameterBindingPattern.js]
// https://github.com/microsoft/TypeScript/issues/36295
--(({ [(_a = class {
+-((_a) => { var _b; var { [(_b = class {
- },
-- _a.x = 1,
-- _a).x]: b = "" }) => { var _a; })();
+- _b.x = 1,
+- _b).x]: b = "" } = _a; })();
+(({ [class {
+ static x = 1;
+}.x]: b = "" }) => { })();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterInitializer(target=es5).js.diff b/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterInitializer(target=es5).js.diff
index 6f097ea891..546679a441 100644
--- a/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterInitializer(target=es5).js.diff
+++ b/testdata/baselines/reference/submodule/conformance/classWithStaticFieldInParameterInitializer(target=es5).js.diff
@@ -9,11 +9,11 @@
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
-};
// https://github.com/microsoft/TypeScript/issues/36295
--((b = (_a = class {
+-((b) => { var _a; if (b === void 0) { b = (_a = class {
- },
- __setFunctionName(_a, "b"),
- _a.x = 1,
-- _a)) => { var _a; })();
+- _a); } })();
+((b = class {
+ static x = 1;
+}) => { })();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/commentEmittingInPreserveJsx1.js.diff b/testdata/baselines/reference/submodule/conformance/commentEmittingInPreserveJsx1.js.diff
index 31d438d002..37406ad7e8 100644
--- a/testdata/baselines/reference/submodule/conformance/commentEmittingInPreserveJsx1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/commentEmittingInPreserveJsx1.js.diff
@@ -1,13 +1,6 @@
--- old.commentEmittingInPreserveJsx1.js
+++ new.commentEmittingInPreserveJsx1.js
-@@= skipped -34, +34 lines =@@
- //// [file.jsx]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--var React = require("react");
-+const React = require("react");
-
- // Not Comment
+@@= skipped -40, +40 lines =@@
;
// Not Comment
diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportAsPrimaryExpression.js.diff b/testdata/baselines/reference/submodule/conformance/commonJSImportAsPrimaryExpression.js.diff
index 9aaab82ee3..a625f6f3e1 100644
--- a/testdata/baselines/reference/submodule/conformance/commonJSImportAsPrimaryExpression.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/commonJSImportAsPrimaryExpression.js.diff
@@ -1,28 +1,17 @@
--- old.commonJSImportAsPrimaryExpression.js
+++ new.commonJSImportAsPrimaryExpression.js
-@@= skipped -16, +16 lines =@@
- "use strict";
+@@= skipped -17, +17 lines =@@
Object.defineProperty(exports, "__esModule", { value: true });
exports.C1 = void 0;
--let C1 = (() => {
-- class C1 {
-- constructor() {
-- this.m1 = 42;
-- }
+ class C1 {
+- constructor() {
+- this.m1 = 42;
- }
-- C1.s1 = true;
-- return C1;
--})();
-+class C1 {
+ m1 = 42;
+ static s1 = true;
-+}
+ }
exports.C1 = C1;
+-C1.s1 = true;
//// [foo_1.js]
"use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--var foo = require("./foo_0");
-+const foo = require("./foo_0");
- if (foo.C1.s1) {
- // Should cause runtime import
- }
\ No newline at end of file
+ Object.defineProperty(exports, "__esModule", { value: true });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportNotAsPrimaryExpression.js.diff b/testdata/baselines/reference/submodule/conformance/commonJSImportNotAsPrimaryExpression.js.diff
index c6c120a3c8..eb51d10bf4 100644
--- a/testdata/baselines/reference/submodule/conformance/commonJSImportNotAsPrimaryExpression.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/commonJSImportNotAsPrimaryExpression.js.diff
@@ -1,22 +1,17 @@
--- old.commonJSImportNotAsPrimaryExpression.js
+++ new.commonJSImportNotAsPrimaryExpression.js
-@@= skipped -34, +34 lines =@@
- "use strict";
+@@= skipped -35, +35 lines =@@
Object.defineProperty(exports, "__esModule", { value: true });
exports.E1 = exports.C1 = void 0;
--let C1 = (() => {
-- class C1 {
-- constructor() {
-- this.m1 = 42;
-- }
+ class C1 {
+- constructor() {
+- this.m1 = 42;
- }
-- C1.s1 = true;
-- return C1;
--})();
-+class C1 {
+ m1 = 42;
+ static s1 = true;
-+}
+ }
exports.C1 = C1;
+-C1.s1 = true;
var E1;
- (function (E1) {
\ No newline at end of file
+ (function (E1) {
+ E1[E1["A"] = 0] = "A";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.js.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.js.diff
index 2e9693def1..b204a546c9 100644
--- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames12_ES5.js.diff
@@ -1,23 +1,19 @@
--- old.computedPropertyNames12_ES5.js
+++ new.computedPropertyNames12_ES5.js
-@@= skipped -21, +21 lines =@@
+@@= skipped -18, +18 lines =@@
+ }
+
+ //// [computedPropertyNames12_ES5.js]
+-var _a, _b, _c;
var s;
var n;
var a;
--let C = (() => {
-- var _a, _b, _c;
-- class C {
-- constructor() {
-- this[_a] = n;
-- this[_b] = 2;
-- this[`hello bye`] = 0;
-- }
+ class C {
+- constructor() {
+- this[_a] = n;
+- this[_b] = 2;
+- this[`hello bye`] = 0;
- }
-- _a = n, s + s, _b = s + n, +s, _c = `hello ${a} bye`;
-- C[_c] = 0;
-- return C;
--})();
-+class C {
+ [s];
+ [n] = n;
+ static [s + s];
@@ -29,4 +25,6 @@
+ static [true];
+ [`hello bye`] = 0;
+ static [`hello ${a} bye`] = 0;
-+}
\ No newline at end of file
+ }
+-_a = n, s + s, _b = s + n, +s, _c = `hello ${a} bye`;
+-C[_c] = 0;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/constructableDecoratorOnClass01.js.diff b/testdata/baselines/reference/submodule/conformance/constructableDecoratorOnClass01.js.diff
index c1022c137b..9024205d48 100644
--- a/testdata/baselines/reference/submodule/conformance/constructableDecoratorOnClass01.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/constructableDecoratorOnClass01.js.diff
@@ -12,14 +12,11 @@
-};
class CtorDtor {
}
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- CtorDtor
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+-C = __decorate([
+- CtorDtor
+-], C);
+@CtorDtor
+class C {
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/contextuallyTypedStringLiteralsInJsxAttributes02.js.diff b/testdata/baselines/reference/submodule/conformance/contextuallyTypedStringLiteralsInJsxAttributes02.js.diff
deleted file mode 100644
index 781946ee07..0000000000
--- a/testdata/baselines/reference/submodule/conformance/contextuallyTypedStringLiteralsInJsxAttributes02.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.contextuallyTypedStringLiteralsInJsxAttributes02.js
-+++ new.contextuallyTypedStringLiteralsInJsxAttributes02.js
-@@= skipped -44, +44 lines =@@
- exports.MainButton = MainButton;
- exports.NoOverload = NoOverload;
- exports.NoOverload1 = NoOverload1;
--var React = require("react");
-+const React = require("react");
- function MainButton(props) {
- const linkProps = props;
- if (linkProps.goTo) {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/declarationFileForJsonImport(resolvejsonmodule=false).js.diff b/testdata/baselines/reference/submodule/conformance/declarationFileForJsonImport(resolvejsonmodule=false).js.diff
deleted file mode 100644
index 74e4eda0b3..0000000000
--- a/testdata/baselines/reference/submodule/conformance/declarationFileForJsonImport(resolvejsonmodule=false).js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.declarationFileForJsonImport(resolvejsonmodule=false).js
-+++ new.declarationFileForJsonImport(resolvejsonmodule=false).js
-@@= skipped -14, +14 lines =@@
- return (mod && mod.__esModule) ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
--var data_json_1 = __importDefault(require("./data.json"));
-+const data_json_1 = __importDefault(require("./data.json"));
- let x = data_json_1.default;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/declarationFileForJsonImport(resolvejsonmodule=true).js.diff b/testdata/baselines/reference/submodule/conformance/declarationFileForJsonImport(resolvejsonmodule=true).js.diff
deleted file mode 100644
index 034ad0eca5..0000000000
--- a/testdata/baselines/reference/submodule/conformance/declarationFileForJsonImport(resolvejsonmodule=true).js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.declarationFileForJsonImport(resolvejsonmodule=true).js
-+++ new.declarationFileForJsonImport(resolvejsonmodule=true).js
-@@= skipped -14, +14 lines =@@
- return (mod && mod.__esModule) ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
--var data_json_1 = __importDefault(require("./data.json"));
-+const data_json_1 = __importDefault(require("./data.json"));
- let x = data_json_1.default;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass1.js.diff
index 3c117371c4..1c1412c2cc 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass1.js.diff
@@ -10,25 +10,20 @@
- 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 Foo_1;
function decorator() {
return (target) => { };
}
--let Foo = (() => {
-- var Foo_1;
-- let Foo = Foo_1 = class Foo {
-- static func() {
-- return new Foo_1();
-- }
-- };
-- Foo = Foo_1 = __decorate([
-- decorator()
-- ], Foo);
-- return Foo;
--})();
+-let Foo = Foo_1 = class Foo {
+@decorator()
+class Foo {
-+ static func() {
+ static func() {
+- return new Foo_1();
+ return new Foo();
-+ }
+ }
+-};
+-Foo = Foo_1 = __decorate([
+- decorator()
+-], Foo);
+}
Foo.func();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass2.js.diff
index 6f7d73cf8f..8d1623a8e0 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass2.js.diff
@@ -10,27 +10,22 @@
- 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 Foo_1;
function decorator() {
return (target) => { };
}
try {
-- let Foo = (() => {
-- var Foo_1;
-- let Foo = Foo_1 = class Foo {
-- static func() {
-- return new Foo_1();
-- }
-- };
-- Foo = Foo_1 = __decorate([
-- decorator()
-- ], Foo);
-- return Foo;
-- })();
+- let Foo = Foo_1 = class Foo {
+ @decorator()
+ class Foo {
-+ static func() {
+ static func() {
+- return new Foo_1();
+ return new Foo();
-+ }
+ }
+- };
+- Foo = Foo_1 = __decorate([
+- decorator()
+- ], Foo);
+ }
Foo.func();
}
diff --git a/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass3.js.diff b/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass3.js.diff
index 6385159499..b899d74585 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratedBlockScopedClass3.js.diff
@@ -10,46 +10,35 @@
- 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 Foo_1, Foo_2;
function decorator() {
return (target) => { };
}
--let Foo = (() => {
-- var Foo_1;
-- let Foo = Foo_1 = class Foo {
-- static func() {
-- return new Foo_1();
-- }
-- };
-- Foo = Foo_1 = __decorate([
-- decorator()
-- ], Foo);
-- return Foo;
--})();
+-let Foo = Foo_1 = class Foo {
+@decorator()
+class Foo {
-+ static func() {
+ static func() {
+- return new Foo_1();
+ return new Foo();
-+ }
+ }
+-};
+-Foo = Foo_1 = __decorate([
+- decorator()
+-], Foo);
+}
Foo.func();
try {
-- let Foo = (() => {
-- var Foo_2;
-- let Foo = Foo_2 = class Foo {
-- static func() {
-- return new Foo_2();
-- }
-- };
-- Foo = Foo_2 = __decorate([
-- decorator()
-- ], Foo);
-- return Foo;
-- })();
+- let Foo = Foo_2 = class Foo {
+ @decorator()
+ class Foo {
-+ static func() {
+ static func() {
+- return new Foo_2();
+ return new Foo();
-+ }
+ }
+- };
+- Foo = Foo_2 = __decorate([
+- decorator()
+- ], Foo);
+ }
Foo.func();
}
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorCallGeneric.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorCallGeneric.js.diff
index 073be92c9f..b2d88f00ca 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorCallGeneric.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorCallGeneric.js.diff
@@ -11,17 +11,13 @@
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
function dec(c) { }
--let C = (() => {
-- let C = class C {
-- static m() { }
-- };
-- C = __decorate([
-- dec
-- ], C);
-- return C;
--})();
+-let C = class C {
+@dec
+class C {
+ _brand;
-+ static m() { }
+ static m() { }
+-};
+-C = __decorate([
+- dec
+-], C);
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorChecksFunctionBodies.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorChecksFunctionBodies.js.diff
index 2dc1988295..b3531137d4 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorChecksFunctionBodies.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorChecksFunctionBodies.js.diff
@@ -13,25 +13,18 @@
// from #2971
function func(s) {
}
--let A = (() => {
-- class A {
-- m() {
-- }
-+class A {
+ class A {
+- m() {
+- }
+-}
+-__decorate([
+- ((x, p, d) => {
+ @((x, p, d) => {
-+ var a = 3;
-+ func(a);
-+ return d;
-+ })
+ var a = 3;
+ func(a);
+ return d;
+ })
+-], A.prototype, "m", null);
+ m() {
- }
-- __decorate([
-- ((x, p, d) => {
-- var a = 3;
-- func(a);
-- return d;
-- })
-- ], A.prototype, "m", null);
-- return A;
--})();
++ }
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorInstantiateModulesInFunctionBodies.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorInstantiateModulesInFunctionBodies.js.diff
index f5ccf42754..8f5e18b058 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorInstantiateModulesInFunctionBodies.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorInstantiateModulesInFunctionBodies.js.diff
@@ -11,26 +11,17 @@
- return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
Object.defineProperty(exports, "__esModule", { value: true });
--var a_1 = require("./a");
-+const a_1 = require("./a");
+ const a_1 = require("./a");
function filter(handler) {
- return function (target, propertyKey) {
- // ...
+@@= skipped -14, +8 lines =@@
};
}
--let Wat = (() => {
-- class Wat {
-- static whatever() {
-- // ...
-- }
-+class Wat {
+ class Wat {
+ @filter(() => a_1.test == 'abc')
-+ static whatever() {
-+ // ...
+ static whatever() {
+ // ...
}
-- __decorate([
-- filter(() => a_1.test == 'abc')
-- ], Wat, "whatever", null);
-- return Wat;
--})();
-+}
\ No newline at end of file
+ }
+-__decorate([
+- filter(() => a_1.test == 'abc')
+-], Wat, "whatever", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorMetadata-jsdoc.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorMetadata-jsdoc.js.diff
index 5a35ecf91a..d29122da2c 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorMetadata-jsdoc.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorMetadata-jsdoc.js.diff
@@ -13,28 +13,23 @@
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
--let X = (() => {
-- class X {
-- }
-- __decorate([
-- decorator(),
-- __metadata("design:type", String)
-- ], X.prototype, "a", void 0);
-- __decorate([
-- decorator(),
-- __metadata("design:type", String)
-- ], X.prototype, "b", void 0);
-- __decorate([
-- decorator(),
-- __metadata("design:type", Object)
-- ], X.prototype, "c", void 0);
-- return X;
--})();
-+class X {
+ class X {
+ @decorator()
+ a;
+ @decorator()
+ b;
+ @decorator()
+ c;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- decorator(),
+- __metadata("design:type", String)
+-], X.prototype, "a", void 0);
+-__decorate([
+- decorator(),
+- __metadata("design:type", String)
+-], X.prototype, "b", void 0);
+-__decorate([
+- decorator(),
+- __metadata("design:type", Object)
+-], X.prototype, "c", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorMetadata.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorMetadata.js.diff
index 2d34a137e6..32004d5b91 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorMetadata.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorMetadata.js.diff
@@ -17,34 +17,26 @@
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
Object.defineProperty(exports, "__esModule", { value: true });
--var service_1 = __importDefault(require("./service"));
--let MyComponent = (() => {
-- let MyComponent = class MyComponent {
-- constructor(Service) {
-- this.Service = Service;
-- }
-- method(x) {
-- }
-- };
-- __decorate([
-- decorator,
-- __metadata("design:type", Function),
-- __metadata("design:paramtypes", [Object]),
-- __metadata("design:returntype", void 0)
-- ], MyComponent.prototype, "method", null);
-- MyComponent = __decorate([
-- decorator,
-- __metadata("design:paramtypes", [service_1.default])
-- ], MyComponent);
-- return MyComponent;
--})();
+-const service_1 = __importDefault(require("./service"));
+-let MyComponent = class MyComponent {
+@decorator
+class MyComponent {
+ Service;
-+ constructor(Service) {
-+ this.Service = Service;
-+ }
+ constructor(Service) {
+ this.Service = Service;
+ }
+ @decorator
-+ method(x) {
-+ }
+ method(x) {
+ }
+-};
+-__decorate([
+- decorator,
+- __metadata("design:type", Function),
+- __metadata("design:paramtypes", [Object]),
+- __metadata("design:returntype", void 0)
+-], MyComponent.prototype, "method", null);
+-MyComponent = __decorate([
+- decorator,
+- __metadata("design:paramtypes", [service_1.default])
+-], MyComponent);
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport.js.diff
index 58081e0546..93ca747425 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport.js.diff
@@ -14,33 +14,25 @@
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
Object.defineProperty(exports, "__esModule", { value: true });
--let MyComponent = (() => {
-- let MyComponent = class MyComponent {
-- constructor(Service) {
-- this.Service = Service;
-- }
-- method(x) {
-- }
-- };
-- __decorate([
-- decorator,
-- __metadata("design:type", Function),
-- __metadata("design:paramtypes", [Object]),
-- __metadata("design:returntype", void 0)
-- ], MyComponent.prototype, "method", null);
-- MyComponent = __decorate([
-- decorator,
-- __metadata("design:paramtypes", [Function])
-- ], MyComponent);
-- return MyComponent;
--})();
+-let MyComponent = class MyComponent {
+@decorator
+class MyComponent {
+ Service;
-+ constructor(Service) {
-+ this.Service = Service;
-+ }
+ constructor(Service) {
+ this.Service = Service;
+ }
+ @decorator
-+ method(x) {
-+ }
+ method(x) {
+ }
+-};
+-__decorate([
+- decorator,
+- __metadata("design:type", Function),
+- __metadata("design:paramtypes", [Object]),
+- __metadata("design:returntype", void 0)
+-], MyComponent.prototype, "method", null);
+-MyComponent = __decorate([
+- decorator,
+- __metadata("design:paramtypes", [Function])
+-], MyComponent);
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport2.js.diff
index 17b6594784..e74b30c114 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorMetadataWithTypeOnlyImport2.js.diff
@@ -15,17 +15,12 @@
-};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Main = void 0;
--let Main = (() => {
-- class Main {
-- }
-- __decorate([
-- decorator(),
-- __metadata("design:type", Function)
-- ], Main.prototype, "field", void 0);
-- return Main;
--})();
-+class Main {
+ class Main {
+ @decorator()
+ field;
-+}
- exports.Main = Main;
\ No newline at end of file
+ }
+ exports.Main = Main;
+-__decorate([
+- decorator(),
+- __metadata("design:type", Function)
+-], Main.prototype, "field", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass1.js.diff
index f2a9840f2e..4f1fae8dbb 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass1.js.diff
@@ -10,14 +10,11 @@
- 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;
-};
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- dec
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+-C = __decorate([
+- dec
+-], C);
+@dec
+class C {
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass2.js.diff
index 249db075af..8d0066242b 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass2.js.diff
@@ -12,15 +12,12 @@
-};
Object.defineProperty(exports, "__esModule", { value: true });
exports.C = void 0;
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- dec
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+@dec
+class C {
+}
- exports.C = C;
\ No newline at end of file
+ exports.C = C;
+-exports.C = C = __decorate([
+- dec
+-], C);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass3.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass3.js.diff
index 7e87afffe2..b42f0fbb50 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass3.js.diff
@@ -12,15 +12,12 @@
-};
Object.defineProperty(exports, "__esModule", { value: true });
exports.C = void 0;
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- dec
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+@dec
+class C {
+}
- exports.C = C;
\ No newline at end of file
+ exports.C = C;
+-exports.C = C = __decorate([
+- dec
+-], C);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass4.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass4.js.diff
index c6b1696e64..7320044436 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass4.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass4.js.diff
@@ -10,14 +10,11 @@
- 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;
-};
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- dec()
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+-C = __decorate([
+- dec()
+-], C);
+@dec()
+class C {
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass5.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass5.js.diff
index b5347807cb..a3f13b1e8f 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass5.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass5.js.diff
@@ -10,14 +10,11 @@
- 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;
-};
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- dec()
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+-C = __decorate([
+- dec()
+-], C);
+@dec()
+class C {
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass8.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass8.js.diff
index 7387496147..a2ed7b28c3 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass8.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass8.js.diff
@@ -10,14 +10,11 @@
- 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;
-};
--let C = (() => {
-- let C = class C {
-- };
-- C = __decorate([
-- dec()
-- ], C);
-- return C;
--})();
+-let C = class C {
+-};
+-C = __decorate([
+- dec()
+-], C);
+@dec()
+class C {
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClass9.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClass9.js.diff
index 97c3f2306f..7e9aeb9df4 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClass9.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClass9.js.diff
@@ -10,28 +10,23 @@
- 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 B_1;
class A {
}
// https://github.com/Microsoft/TypeScript/issues/16417
--let B = (() => {
-- var B_1;
-- let B = B_1 = class B extends A {
-- m() {
-- return B_1.x;
-- }
-- };
-- B.x = 1;
-- B.y = B_1.x;
-- B = B_1 = __decorate([
-- dec
-- ], B);
-- return B;
--})();
+-let B = B_1 = class B extends A {
+@dec
+class B extends A {
+ static x = 1;
+ static y = B.x;
-+ m() {
+ m() {
+- return B_1.x;
+ return B.x;
-+ }
+ }
+-};
+-B.x = 1;
+-B.y = B_1.x;
+-B = B_1 = __decorate([
+- dec
+-], B);
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor1.js.diff
index c80135eb6c..9e0d1d9ed5 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor1.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- get accessor() { return 1; }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "accessor", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ get accessor() { return 1; }
-+}
\ No newline at end of file
+ get accessor() { return 1; }
+ }
+-__decorate([
+- dec
+-], C.prototype, "accessor", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor2.js.diff
index aba606be47..046c57b72e 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor2.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- get accessor() { return 1; }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "accessor", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ get accessor() { return 1; }
-+}
\ No newline at end of file
+ get accessor() { return 1; }
+ }
+-__decorate([
+- dec
+-], C.prototype, "accessor", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor3.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor3.js.diff
index 0fdb569a9c..c268412736 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor3.js.diff
@@ -10,17 +10,11 @@
- 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;
-};
--let C = (() => {
-- class C {
-- get accessor() { return 1; }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "accessor", null);
-- return C;
--})();
-+class C {
+ class C {
+ public;
+ @dec
-+ get accessor() { return 1; }
-+}
\ No newline at end of file
+ get accessor() { return 1; }
+ }
+-__decorate([
+- dec
+-], C.prototype, "accessor", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor4.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor4.js.diff
index 236a08fb25..82d844f7df 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor4.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor4.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- set accessor(value) { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "accessor", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ set accessor(value) { }
-+}
\ No newline at end of file
+ set accessor(value) { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "accessor", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor5.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor5.js.diff
index fe1996677b..7764796191 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor5.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor5.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- set accessor(value) { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "accessor", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ set accessor(value) { }
-+}
\ No newline at end of file
+ set accessor(value) { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "accessor", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor6.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor6.js.diff
index d293a64507..23fe11fc7c 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor6.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor6.js.diff
@@ -10,17 +10,11 @@
- 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;
-};
--let C = (() => {
-- class C {
-- set accessor(value) { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "accessor", null);
-- return C;
--})();
-+class C {
+ class C {
+ public;
+ @dec
-+ set accessor(value) { }
-+}
\ No newline at end of file
+ set accessor(value) { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "accessor", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor7.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor7.js.diff
index 135e7ae81d..f0cfcf4091 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor7.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor7.js.diff
@@ -10,95 +10,53 @@
- 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;
-};
--let A = (() => {
-- class A {
-- get x() { return 0; }
-- set x(value) { }
-- }
-- __decorate([
-- dec1
-- ], A.prototype, "x", null);
-- return A;
--})();
--let B = (() => {
-- class B {
-- get x() { return 0; }
-- set x(value) { }
-- }
-- __decorate([
-- dec2
-- ], B.prototype, "x", null);
-- return B;
--})();
--let C = (() => {
-- class C {
-- set x(value) { }
-- get x() { return 0; }
-- }
-- __decorate([
-- dec1
-- ], C.prototype, "x", null);
-- return C;
--})();
--let D = (() => {
-- class D {
-- set x(value) { }
-- get x() { return 0; }
-- }
-- __decorate([
-- dec2
-- ], D.prototype, "x", null);
-- return D;
--})();
--let E = (() => {
-- class E {
-- get x() { return 0; }
-- set x(value) { }
-- }
-- __decorate([
-- dec1
-- ], E.prototype, "x", null);
-- return E;
--})();
--let F = (() => {
-- class F {
-- set x(value) { }
-- get x() { return 0; }
-- }
-- __decorate([
-- dec1
-- ], F.prototype, "x", null);
-- return F;
--})();
-+class A {
+ class A {
+ @dec1
-+ get x() { return 0; }
-+ set x(value) { }
-+}
-+class B {
-+ get x() { return 0; }
+ get x() { return 0; }
+ set x(value) { }
+ }
+-__decorate([
+- dec1
+-], A.prototype, "x", null);
+ class B {
+ get x() { return 0; }
+ @dec2
-+ set x(value) { }
-+}
-+class C {
+ set x(value) { }
+ }
+-__decorate([
+- dec2
+-], B.prototype, "x", null);
+ class C {
+ @dec1
-+ set x(value) { }
-+ get x() { return 0; }
-+}
-+class D {
-+ set x(value) { }
+ set x(value) { }
+ get x() { return 0; }
+ }
+-__decorate([
+- dec1
+-], C.prototype, "x", null);
+ class D {
+ set x(value) { }
+ @dec2
-+ get x() { return 0; }
-+}
-+class E {
+ get x() { return 0; }
+ }
+-__decorate([
+- dec2
+-], D.prototype, "x", null);
+ class E {
+ @dec1
-+ get x() { return 0; }
+ get x() { return 0; }
+ @dec2
-+ set x(value) { }
-+}
-+class F {
+ set x(value) { }
+ }
+-__decorate([
+- dec1
+-], E.prototype, "x", null);
+ class F {
+ @dec1
-+ set x(value) { }
+ set x(value) { }
+ @dec2
-+ get x() { return 0; }
-+}
\ No newline at end of file
+ get x() { return 0; }
+ }
+-__decorate([
+- dec1
+-], F.prototype, "x", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor8.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor8.js.diff
index 774fead849..71968ac8ff 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor8.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassAccessor8.js.diff
@@ -13,101 +13,61 @@
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
--let A = (() => {
-- class A {
-- get x() { return 0; }
-- set x(value) { }
-- }
-- __decorate([
-- dec,
-- __metadata("design:type", Number),
-- __metadata("design:paramtypes", [Number])
-- ], A.prototype, "x", null);
-- return A;
--})();
--let B = (() => {
-- class B {
-- get x() { return 0; }
-- set x(value) { }
-- }
-- __decorate([
-- dec,
-- __metadata("design:type", Number),
-- __metadata("design:paramtypes", [Number])
-- ], B.prototype, "x", null);
-- return B;
--})();
--let C = (() => {
-- class C {
-- set x(value) { }
-- get x() { return 0; }
-- }
-- __decorate([
-- dec,
-- __metadata("design:type", Number),
-- __metadata("design:paramtypes", [Number])
-- ], C.prototype, "x", null);
-- return C;
--})();
--let D = (() => {
-- class D {
-- set x(value) { }
-- get x() { return 0; }
-- }
-- __decorate([
-- dec,
-- __metadata("design:type", Number),
-- __metadata("design:paramtypes", [Number])
-- ], D.prototype, "x", null);
-- return D;
--})();
--let E = (() => {
-- class E {
-- get x() { return 0; }
-- }
-- __decorate([
-- dec,
-- __metadata("design:type", Object),
-- __metadata("design:paramtypes", [])
-- ], E.prototype, "x", null);
-- return E;
--})();
--let F = (() => {
-- class F {
-- set x(value) { }
-- }
-- __decorate([
-- dec,
-- __metadata("design:type", Number),
-- __metadata("design:paramtypes", [Number])
-- ], F.prototype, "x", null);
-- return F;
--})();
-+class A {
+ class A {
+ @dec
-+ get x() { return 0; }
-+ set x(value) { }
-+}
-+class B {
-+ get x() { return 0; }
+ get x() { return 0; }
+ set x(value) { }
+ }
+-__decorate([
+- dec,
+- __metadata("design:type", Number),
+- __metadata("design:paramtypes", [Number])
+-], A.prototype, "x", null);
+ class B {
+ get x() { return 0; }
+ @dec
-+ set x(value) { }
-+}
-+class C {
+ set x(value) { }
+ }
+-__decorate([
+- dec,
+- __metadata("design:type", Number),
+- __metadata("design:paramtypes", [Number])
+-], B.prototype, "x", null);
+ class C {
+ @dec
-+ set x(value) { }
-+ get x() { return 0; }
-+}
-+class D {
-+ set x(value) { }
+ set x(value) { }
+ get x() { return 0; }
+ }
+-__decorate([
+- dec,
+- __metadata("design:type", Number),
+- __metadata("design:paramtypes", [Number])
+-], C.prototype, "x", null);
+ class D {
+ set x(value) { }
+ @dec
-+ get x() { return 0; }
-+}
-+class E {
+ get x() { return 0; }
+ }
+-__decorate([
+- dec,
+- __metadata("design:type", Number),
+- __metadata("design:paramtypes", [Number])
+-], D.prototype, "x", null);
+ class E {
+ @dec
-+ get x() { return 0; }
-+}
-+class F {
+ get x() { return 0; }
+ }
+-__decorate([
+- dec,
+- __metadata("design:type", Object),
+- __metadata("design:paramtypes", [])
+-], E.prototype, "x", null);
+ class F {
+ @dec
-+ set x(value) { }
-+}
\ No newline at end of file
+ set x(value) { }
+ }
+-__decorate([
+- dec,
+- __metadata("design:type", Number),
+- __metadata("design:paramtypes", [Number])
+-], F.prototype, "x", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor2.js.diff
index 83d945a9a9..7ef0e732dd 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor2.js.diff
@@ -15,24 +15,16 @@
-};
Object.defineProperty(exports, "__esModule", { value: true });
exports.C = void 0;
--var _0_ts_1 = require("./0.ts");
--var _0_ts_2 = require("./0.ts");
--let C = (() => {
-- let C = class C extends _0_ts_1.base {
-- constructor(prop) {
-- super();
-- }
-- };
-- C = __decorate([
-- __param(0, _0_ts_2.foo)
-- ], C);
-- return C;
--})();
-+const _0_ts_1 = require("./0.ts");
-+const _0_ts_2 = require("./0.ts");
+ const _0_ts_1 = require("./0.ts");
+ const _0_ts_2 = require("./0.ts");
+-let C = class C extends _0_ts_1.base {
+class C extends _0_ts_1.base {
-+ constructor(prop) {
-+ super();
-+ }
+ constructor(prop) {
+ super();
+ }
+-};
+}
- exports.C = C;
\ No newline at end of file
+ exports.C = C;
+-exports.C = C = __decorate([
+- __param(0, _0_ts_2.foo)
+-], C);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor3.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor3.js.diff
index 87f903bfa2..1c016adbb6 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor3.js.diff
@@ -15,25 +15,17 @@
-};
Object.defineProperty(exports, "__esModule", { value: true });
exports.C = void 0;
--var _0_1 = require("./0");
--var _0_2 = require("./0");
-+const _0_1 = require("./0");
-+const _0_2 = require("./0");
+ const _0_1 = require("./0");
+ const _0_2 = require("./0");
/* Comment on the Class Declaration */
--let C = (() => {
-- let C = class C extends _0_1.base {
-- constructor(prop) {
-- super();
-- }
-- };
-- C = __decorate([
-- __param(0, _0_2.foo)
-- ], C);
-- return C;
--})();
+-let C = class C extends _0_1.base {
+class C extends _0_1.base {
-+ constructor(prop) {
-+ super();
-+ }
+ constructor(prop) {
+ super();
+ }
+-};
+}
- exports.C = C;
\ No newline at end of file
+ exports.C = C;
+-exports.C = C = __decorate([
+- __param(0, _0_2.foo)
+-], C);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor4.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor4.js.diff
index 5bcfb28d26..0eacc39dfb 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor4.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor4.js.diff
@@ -13,38 +13,28 @@
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
--let A = (() => {
-- let A = class A {
-- };
-- A = __decorate([
-- dec
-- ], A);
-- return A;
--})();
--let B = (() => {
-- let B = class B {
-- constructor(x) { }
-- };
-- B = __decorate([
-- dec,
-- __metadata("design:paramtypes", [Number])
-- ], B);
-- return B;
--})();
--let C = (() => {
-- let C = class C extends A {
-- };
-- C = __decorate([
-- dec
-- ], C);
-- return C;
--})();
+-let A = class A {
+-};
+-A = __decorate([
+- dec
+-], A);
+-let B = class B {
+@dec
+class A {
+}
+@dec
+class B {
-+ constructor(x) { }
+ constructor(x) { }
+-};
+-B = __decorate([
+- dec,
+- __metadata("design:paramtypes", [Number])
+-], B);
+-let C = class C extends A {
+-};
+-C = __decorate([
+- dec
+-], C);
+}
+@dec
+class C extends A {
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter1.js.diff
index 722b033654..afcd3a66b9 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter1.js.diff
@@ -13,15 +13,11 @@
-var __param = (this && this.__param) || function (paramIndex, decorator) {
- return function (target, key) { decorator(target, key, paramIndex); }
-};
--let C = (() => {
-- let C = class C {
-- constructor(p) { }
-- };
-- C = __decorate([
-- __param(0, dec)
-- ], C);
-- return C;
--})();
+-let C = class C {
+class C {
-+ constructor(p) { }
+ constructor(p) { }
+-};
+-C = __decorate([
+- __param(0, dec)
+-], C);
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter4.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter4.js.diff
index f793a2ac37..88a98dece1 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter4.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter4.js.diff
@@ -13,15 +13,11 @@
-var __param = (this && this.__param) || function (paramIndex, decorator) {
- return function (target, key) { decorator(target, key, paramIndex); }
-};
--let C = (() => {
-- let C = class C {
-- constructor(public, p) { }
-- };
-- C = __decorate([
-- __param(1, dec)
-- ], C);
-- return C;
--})();
+-let C = class C {
+class C {
-+ constructor(public, p) { }
+ constructor(public, p) { }
+-};
+-C = __decorate([
+- __param(1, dec)
+-], C);
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod1.js.diff
index 9a7ecb850b..08ece11d24 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod1.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- method() { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ method() { }
-+}
\ No newline at end of file
+ method() { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod10.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod10.js.diff
index 06d9d6e355..04a8e3112e 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod10.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod10.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- method() { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ method() { }
-+}
\ No newline at end of file
+ method() { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod11.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod11.js.diff
index def840c6c7..7e3ed70f92 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod11.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod11.js.diff
@@ -12,19 +12,12 @@
-};
var M;
(function (M) {
-- let C = (() => {
-- class C {
-- decorator(target, key) { }
-- method() { }
-- }
-- __decorate([
-- (this.decorator)
-- ], C.prototype, "method", null);
-- return C;
-- })();
-+ class C {
-+ decorator(target, key) { }
+ class C {
+ decorator(target, key) { }
+ @(this.decorator)
-+ method() { }
-+ }
+ method() { }
+ }
+- __decorate([
+- (this.decorator)
+- ], C.prototype, "method", null);
})(M || (M = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod12.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod12.js.diff
index d4e9a30c5b..51aa8f8d94 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod12.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod12.js.diff
@@ -15,17 +15,11 @@
class S {
decorator(target, key) { }
}
-- let C = (() => {
-- class C extends S {
-- method() { }
-- }
-- __decorate([
-- (super.decorator)
-- ], C.prototype, "method", null);
-- return C;
-- })();
-+ class C extends S {
+ class C extends S {
+ @(super.decorator)
-+ method() { }
-+ }
+ method() { }
+ }
+- __decorate([
+- (super.decorator)
+- ], C.prototype, "method", null);
})(M || (M = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod2.js.diff
index 17d34bc117..31cc2d9a47 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod2.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- method() { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ method() { }
-+}
\ No newline at end of file
+ method() { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod3.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod3.js.diff
index 6d884820ee..b15836bff3 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod3.js.diff
@@ -10,17 +10,11 @@
- 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;
-};
--let C = (() => {
-- class C {
-- method() { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
+ class C {
+ public;
+ @dec
-+ method() { }
-+}
\ No newline at end of file
+ method() { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod8.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod8.js.diff
index 405d6ae694..88f81bd6fc 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod8.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod8.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- method() { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ method() { }
-+}
\ No newline at end of file
+ method() { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodOverload2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodOverload2.js.diff
index 6b52333d77..5ba85df626 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodOverload2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodOverload2.js.diff
@@ -10,16 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- method() { }
-- }
-- __decorate([
-- dec
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
-+ method() { }
-+}
\ No newline at end of file
+ method() { }
+ }
+-__decorate([
+- dec
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter1.js.diff
index cc475a2c38..4e2f3f7d6d 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter1.js.diff
@@ -13,15 +13,9 @@
-var __param = (this && this.__param) || function (paramIndex, decorator) {
- return function (target, key) { decorator(target, key, paramIndex); }
-};
--let C = (() => {
-- class C {
-- method(p) { }
-- }
-- __decorate([
-- __param(0, dec)
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
-+ method(p) { }
-+}
\ No newline at end of file
+ class C {
+ method(p) { }
+ }
+-__decorate([
+- __param(0, dec)
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter2.js.diff
index c072c40a65..4c211acff0 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodParameter2.js.diff
@@ -13,15 +13,9 @@
-var __param = (this && this.__param) || function (paramIndex, decorator) {
- return function (target, key) { decorator(target, key, paramIndex); }
-};
--let C = (() => {
-- class C {
-- method(p) { }
-- }
-- __decorate([
-- __param(0, dec)
-- ], C.prototype, "method", null);
-- return C;
--})();
-+class C {
-+ method(p) { }
-+}
\ No newline at end of file
+ class C {
+ method(p) { }
+ }
+-__decorate([
+- __param(0, dec)
+-], C.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodThisParameter.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodThisParameter.js.diff
index 7b7995f68c..f4ed3ff3b5 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodThisParameter.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodThisParameter.js.diff
@@ -16,15 +16,9 @@
class C {
method() { }
}
--let C2 = (() => {
-- class C2 {
-- method(allowed) { }
-- }
-- __decorate([
-- __param(0, dec)
-- ], C2.prototype, "method", null);
-- return C2;
--})();
-+class C2 {
-+ method(allowed) { }
-+}
\ No newline at end of file
+ class C2 {
+ method(allowed) { }
+ }
+-__decorate([
+- __param(0, dec)
+-], C2.prototype, "method", null);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty1.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty1.js.diff
index 10fda8fd22..488ed54f91 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty1.js.diff
@@ -10,15 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty10.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty10.js.diff
index db7b94f909..5acca3027e 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty10.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty10.js.diff
@@ -10,15 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec()
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ @dec()
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec()
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty11.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty11.js.diff
index 19dba33461..a4293943b7 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty11.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty11.js.diff
@@ -10,15 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty12.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty12.js.diff
index d7b5870497..3997cf7a3b 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty12.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty12.js.diff
@@ -13,16 +13,11 @@
-var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
-};
--let A = (() => {
-- class A {
-- }
-- __decorate([
-- dec(),
-- __metadata("design:type", String)
-- ], A.prototype, "foo", void 0);
-- return A;
--})();
-+class A {
+ class A {
+ @dec()
+ foo;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec(),
+- __metadata("design:type", String)
+-], A.prototype, "foo", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty2.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty2.js.diff
index 92490e211c..85a5313c91 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty2.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty2.js.diff
@@ -10,15 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty3.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty3.js.diff
index b48e2fd9a7..f01ee48335 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty3.js.diff
@@ -10,16 +10,11 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ public;
+ @dec
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty6.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty6.js.diff
index fe3607664c..02a0067d10 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty6.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty6.js.diff
@@ -10,15 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty7.js.diff b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty7.js.diff
index 91e6fb9d39..3576a2a766 100644
--- a/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty7.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty7.js.diff
@@ -10,15 +10,10 @@
- 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;
-};
--let C = (() => {
-- class C {
-- }
-- __decorate([
-- dec
-- ], C.prototype, "prop", void 0);
-- return C;
--})();
-+class C {
+ class C {
+ @dec
+ prop;
-+}
\ No newline at end of file
+ }
+-__decorate([
+- dec
+-], C.prototype, "prop", void 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge01.js.diff b/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge01.js.diff
deleted file mode 100644
index 814a926d09..0000000000
--- a/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge01.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.defaultExportsCannotMerge01.js
-+++ new.defaultExportsCannotMerge01.js
-@@= skipped -45, +45 lines =@@
- return (mod && mod.__esModule) ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
--var m1_1 = __importDefault(require("m1"));
-+const m1_1 = __importDefault(require("m1"));
- (0, m1_1.default)();
- var x;
- var y;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge02.js.diff b/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge02.js.diff
deleted file mode 100644
index 8f01b23170..0000000000
--- a/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge02.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.defaultExportsCannotMerge02.js
-+++ new.defaultExportsCannotMerge02.js
-@@= skipped -35, +35 lines =@@
- return (mod && mod.__esModule) ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
--var m1_1 = __importDefault(require("m1"));
-+const m1_1 = __importDefault(require("m1"));
- (0, m1_1.default)();
- var x;
- var y;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge03.js.diff b/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge03.js.diff
deleted file mode 100644
index 21c1332789..0000000000
--- a/testdata/baselines/reference/submodule/conformance/defaultExportsCannotMerge03.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.defaultExportsCannotMerge03.js
-+++ new.defaultExportsCannotMerge03.js
-@@= skipped -35, +35 lines =@@
- return (mod && mod.__esModule) ? mod : { "default": mod };
- };
- Object.defineProperty(exports, "__esModule", { value: true });
--var m1_1 = __importDefault(require("m1"));
-+const m1_1 = __importDefault(require("m1"));
- (0, m1_1.default)();
- var x;
- var y;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/derivedClassSuperProperties.js.diff b/testdata/baselines/reference/submodule/conformance/derivedClassSuperProperties.js.diff
index 86fe018540..d9a651cfe6 100644
--- a/testdata/baselines/reference/submodule/conformance/derivedClassSuperProperties.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/derivedClassSuperProperties.js.diff
@@ -97,14 +97,11 @@
class DerivedWithDecoratorOnClass extends Base {
+ prop = true;
constructor() {
-- let InnerClass = (() => {
-- let InnerClass = class InnerClass {
-- };
-- InnerClass = __decorate([
-- decorate(this)
-- ], InnerClass);
-- return InnerClass;
-- })();
+- let InnerClass = class InnerClass {
+- };
+- InnerClass = __decorate([
+- decorate(this)
+- ], InnerClass);
+ @decorate(this)
+ class InnerClass {
+ }
@@ -115,19 +112,13 @@
class DerivedWithDecoratorOnClassMethod extends Base {
+ prop = true;
constructor() {
-- let InnerClass = (() => {
-- class InnerClass {
-- innerMethod() { }
-- }
-- __decorate([
-- decorate(this)
-- ], InnerClass.prototype, "innerMethod", null);
-- return InnerClass;
-- })();
-+ class InnerClass {
+ class InnerClass {
+ @decorate(this)
-+ innerMethod() { }
-+ }
+ innerMethod() { }
+ }
+- __decorate([
+- decorate(this)
+- ], InnerClass.prototype, "innerMethod", null);
super();
- this.prop = true;
}
@@ -135,21 +126,16 @@
class DerivedWithDecoratorOnClassProperty extends Base {
+ prop = true;
constructor() {
-- let InnerClass = (() => {
-- class InnerClass {
-- constructor() {
-- this.innerProp = true;
-- }
+ class InnerClass {
+- constructor() {
+- this.innerProp = true;
- }
-- __decorate([
-- decorate(this)
-- ], InnerClass.prototype, "innerProp", void 0);
-- return InnerClass;
-- })();
-+ class InnerClass {
+ @decorate(this)
+ innerProp = true;
-+ }
+ }
+- __decorate([
+- decorate(this)
+- ], InnerClass.prototype, "innerProp", void 0);
super();
- this.prop = true;
}
@@ -297,7 +283,7 @@
constructor() {
console.log(new class extends Base {
constructor() {
-@@= skipped -255, +233 lines =@@
+@@= skipped -246, +233 lines =@@
}
}());
super();
diff --git a/testdata/baselines/reference/submodule/conformance/destructuringSpread.js.diff b/testdata/baselines/reference/submodule/conformance/destructuringSpread.js.diff
new file mode 100644
index 0000000000..b3f3943950
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/destructuringSpread.js.diff
@@ -0,0 +1,27 @@
+--- old.destructuringSpread.js
++++ new.destructuringSpread.js
+@@= skipped -30, +30 lines =@@
+
+
+ //// [destructuringSpread.js]
+-const { x } = Object.assign({}, { x: 0 });
+-const { y } = Object.assign({ y: 0 }, {});
+-const { z, a, b } = Object.assign({ z: 0 }, { a: 0, b: 0 });
+-const { c, d, e, f, g } = Object.assign(Object.assign({}, Object.assign(Object.assign({}, Object.assign({
++var __assign = (this && this.__assign) || function () {
++ __assign = Object.assign || function(t) {
++ for (var s, i = 1, n = arguments.length; i < n; i++) {
++ s = arguments[i];
++ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
++ t[p] = s[p];
++ }
++ return t;
++ };
++ return __assign.apply(this, arguments);
++};
++const { x } = __assign({}, { x: 0 });
++const { y } = __assign({ y: 0 }, {});
++const { z, a, b } = __assign({ z: 0 }, { a: 0, b: 0 });
++const { c, d, e, f, g } = __assign(__assign({}, __assign(__assign({}, __assign({
+ c: 0,
+ }, { d: 0 })), { e: 0 })), { f: 0 });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.errors.txt.diff
index a340d2332b..5796e564fa 100644
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.errors.txt.diff
@@ -1,32 +1,26 @@
--- old.emitArrowFunctionWhenUsingArguments01.errors.txt
+++ new.emitArrowFunctionWhenUsingArguments01.errors.txt
@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments01.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--emitArrowFunctionWhenUsingArguments01.ts(7,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--emitArrowFunctionWhenUsingArguments01.ts(13,13): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--emitArrowFunctionWhenUsingArguments01.ts(19,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
+-emitArrowFunctionWhenUsingArguments01.ts(2,15): error TS2304: Cannot find name 'arguments'.
+-emitArrowFunctionWhenUsingArguments01.ts(19,15): error TS2304: Cannot find name 'arguments'.
-
-
--==== emitArrowFunctionWhenUsingArguments01.ts (4 errors) ====
+-==== emitArrowFunctionWhenUsingArguments01.ts (2 errors) ====
- var a = () => {
- var arg = arguments[0]; // error
- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
+-!!! error TS2304: Cannot find name 'arguments'.
- }
-
- var b = function () {
- var a = () => {
- var arg = arguments[0]; // error
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
- }
- }
-
- function baz() {
- () => {
- var arg = arguments[0];
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
- }
- }
-
@@ -34,7 +28,7 @@
- foo(() => {
- var arg = arguments[0]; // error
- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
+-!!! error TS2304: Cannot find name 'arguments'.
- });
-
- function bar() {
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.symbols.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.symbols.diff
new file mode 100644
index 0000000000..f50f6e39ec
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.symbols.diff
@@ -0,0 +1,17 @@
+--- old.emitArrowFunctionWhenUsingArguments01.symbols
++++ new.emitArrowFunctionWhenUsingArguments01.symbols
+@@= skipped -5, +5 lines =@@
+
+ var arg = arguments[0]; // error
+ >arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01.ts, 1, 7))
++>arguments : Symbol(arguments)
+ }
+
+ var b = function () {
+@@= skipped -33, +34 lines =@@
+
+ var arg = arguments[0]; // error
+ >arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01.ts, 18, 7))
++>arguments : Symbol(arguments)
+
+ });
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.types.diff
new file mode 100644
index 0000000000..91c00616a2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.types.diff
@@ -0,0 +1,20 @@
+--- old.emitArrowFunctionWhenUsingArguments01.types
++++ new.emitArrowFunctionWhenUsingArguments01.types
+@@= skipped -7, +7 lines =@@
+ var arg = arguments[0]; // error
+ >arg : any
+ >arguments[0] : any
+->arguments : any
++>arguments : IArguments
+ >0 : 0
+ }
+
+@@= skipped -46, +46 lines =@@
+ var arg = arguments[0]; // error
+ >arg : any
+ >arguments[0] : any
+->arguments : any
++>arguments : IArguments
+ >0 : 0
+
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.errors.txt.diff
index 15d8c38f28..8d3f5fed3a 100644
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.errors.txt.diff
@@ -1,11 +1,11 @@
--- old.emitArrowFunctionWhenUsingArguments02.errors.txt
+++ new.emitArrowFunctionWhenUsingArguments02.errors.txt
@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments02.ts(1,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
+-emitArrowFunctionWhenUsingArguments02.ts(1,15): error TS2304: Cannot find name 'arguments'.
-
-
-==== emitArrowFunctionWhenUsingArguments02.ts (1 errors) ====
- var a = () => arguments;
- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
+-!!! error TS2304: Cannot find name 'arguments'.
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.symbols.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.symbols.diff
new file mode 100644
index 0000000000..92998a338d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.symbols.diff
@@ -0,0 +1,7 @@
+--- old.emitArrowFunctionWhenUsingArguments02.symbols
++++ new.emitArrowFunctionWhenUsingArguments02.symbols
+@@= skipped -2, +2 lines =@@
+ === emitArrowFunctionWhenUsingArguments02.ts ===
+ var a = () => arguments;
+ >a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments02.ts, 0, 3))
++>arguments : Symbol(arguments)
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.types.diff
new file mode 100644
index 0000000000..b93e135843
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.types.diff
@@ -0,0 +1,12 @@
+--- old.emitArrowFunctionWhenUsingArguments02.types
++++ new.emitArrowFunctionWhenUsingArguments02.types
+@@= skipped -1, +1 lines =@@
+
+ === emitArrowFunctionWhenUsingArguments02.ts ===
+ var a = () => arguments;
+->a : () => any
+->() => arguments : () => any
+->arguments : any
++>a : () => IArguments
++>() => arguments : () => IArguments
++>arguments : IArguments
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.errors.txt.diff
deleted file mode 100644
index 8014273cf1..0000000000
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.errors.txt.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- old.emitArrowFunctionWhenUsingArguments03.errors.txt
-+++ new.emitArrowFunctionWhenUsingArguments03.errors.txt
-@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments03.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--
--
--==== emitArrowFunctionWhenUsingArguments03.ts (1 errors) ====
-- var arguments;
-- var a = () => arguments;
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.symbols.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.symbols.diff
new file mode 100644
index 0000000000..8ebc255628
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.symbols.diff
@@ -0,0 +1,8 @@
+--- old.emitArrowFunctionWhenUsingArguments03.symbols
++++ new.emitArrowFunctionWhenUsingArguments03.symbols
+@@= skipped -5, +5 lines =@@
+
+ var a = () => arguments;
+ >a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3))
+->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3))
++>arguments : Symbol(arguments)
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.types.diff
new file mode 100644
index 0000000000..5395fc8ee1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.types.diff
@@ -0,0 +1,12 @@
+--- old.emitArrowFunctionWhenUsingArguments03.types
++++ new.emitArrowFunctionWhenUsingArguments03.types
+@@= skipped -4, +4 lines =@@
+ >arguments : any
+
+ var a = () => arguments;
+->a : () => any
+->() => arguments : () => any
+->arguments : any
++>a : () => IArguments
++>() => arguments : () => IArguments
++>arguments : IArguments
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.errors.txt.diff
deleted file mode 100644
index e361e55bcb..0000000000
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.errors.txt.diff
+++ /dev/null
@@ -1,14 +0,0 @@
---- old.emitArrowFunctionWhenUsingArguments04.errors.txt
-+++ new.emitArrowFunctionWhenUsingArguments04.errors.txt
-@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments04.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--
--
--==== emitArrowFunctionWhenUsingArguments04.ts (1 errors) ====
-- function f() {
-- var arguments;
-- var a = () => arguments;
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
-- }
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.symbols.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.symbols.diff
new file mode 100644
index 0000000000..ebb9afe41c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.symbols.diff
@@ -0,0 +1,9 @@
+--- old.emitArrowFunctionWhenUsingArguments04.symbols
++++ new.emitArrowFunctionWhenUsingArguments04.symbols
+@@= skipped -8, +8 lines =@@
+
+ var a = () => arguments;
+ >a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7))
+->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7))
++>arguments : Symbol(arguments)
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.types.diff
new file mode 100644
index 0000000000..1c9f4db83f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.types.diff
@@ -0,0 +1,13 @@
+--- old.emitArrowFunctionWhenUsingArguments04.types
++++ new.emitArrowFunctionWhenUsingArguments04.types
+@@= skipped -7, +7 lines =@@
+ >arguments : any
+
+ var a = () => arguments;
+->a : () => any
+->() => arguments : () => any
+->arguments : any
++>a : () => IArguments
++>() => arguments : () => IArguments
++>arguments : IArguments
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.errors.txt.diff
deleted file mode 100644
index 2c0422a7bd..0000000000
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.errors.txt.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- old.emitArrowFunctionWhenUsingArguments05.errors.txt
-+++ new.emitArrowFunctionWhenUsingArguments05.errors.txt
-@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments05.ts(2,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--
--
--==== emitArrowFunctionWhenUsingArguments05.ts (1 errors) ====
-- function f(arguments) {
-- var a = () => arguments;
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
-- }
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.symbols.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.symbols.diff
new file mode 100644
index 0000000000..feba3ab297
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.symbols.diff
@@ -0,0 +1,9 @@
+--- old.emitArrowFunctionWhenUsingArguments05.symbols
++++ new.emitArrowFunctionWhenUsingArguments05.symbols
+@@= skipped -6, +6 lines =@@
+
+ var a = () => arguments;
+ >a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7))
+->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11))
++>arguments : Symbol(arguments)
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.types.diff
new file mode 100644
index 0000000000..5c8ce2bf31
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.types.diff
@@ -0,0 +1,13 @@
+--- old.emitArrowFunctionWhenUsingArguments05.types
++++ new.emitArrowFunctionWhenUsingArguments05.types
+@@= skipped -5, +5 lines =@@
+ >arguments : any
+
+ var a = () => arguments;
+->a : () => any
+->() => arguments : () => any
+->arguments : any
++>a : () => IArguments
++>() => arguments : () => IArguments
++>arguments : IArguments
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.errors.txt.diff
deleted file mode 100644
index 6450b091b1..0000000000
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.errors.txt.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- old.emitArrowFunctionWhenUsingArguments06.errors.txt
-+++ new.emitArrowFunctionWhenUsingArguments06.errors.txt
-@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments06.ts(2,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--
--
--==== emitArrowFunctionWhenUsingArguments06.ts (1 errors) ====
-- function f(arguments) {
-- var a = () => () => arguments;
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
-- }
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.symbols.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.symbols.diff
new file mode 100644
index 0000000000..053d3e6465
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.symbols.diff
@@ -0,0 +1,9 @@
+--- old.emitArrowFunctionWhenUsingArguments06.symbols
++++ new.emitArrowFunctionWhenUsingArguments06.symbols
+@@= skipped -6, +6 lines =@@
+
+ var a = () => () => arguments;
+ >a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7))
+->arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11))
++>arguments : Symbol(arguments)
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.types.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.types.diff
new file mode 100644
index 0000000000..49ac5271a9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.types.diff
@@ -0,0 +1,15 @@
+--- old.emitArrowFunctionWhenUsingArguments06.types
++++ new.emitArrowFunctionWhenUsingArguments06.types
+@@= skipped -5, +5 lines =@@
+ >arguments : any
+
+ var a = () => () => arguments;
+->a : () => () => any
+->() => () => arguments : () => () => any
+->() => arguments : () => any
+->arguments : any
++>a : () => () => IArguments
++>() => () => arguments : () => () => IArguments
++>() => arguments : () => IArguments
++>arguments : IArguments
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments07.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments07.errors.txt.diff
deleted file mode 100644
index d66b35b44c..0000000000
--- a/testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments07.errors.txt.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- old.emitArrowFunctionWhenUsingArguments07.errors.txt
-+++ new.emitArrowFunctionWhenUsingArguments07.errors.txt
-@@= skipped -0, +0 lines =@@
--emitArrowFunctionWhenUsingArguments07.ts(2,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
--
--
--==== emitArrowFunctionWhenUsingArguments07.ts (1 errors) ====
-- function f(arguments) {
-- var a = (arguments) => () => arguments;
-- ~~~~~~~~~
--!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
-- }
-+