From 3d40881d374917087c99c4deb64ed34047d91a35 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 15 Jun 2023 18:33:43 +0300 Subject: [PATCH 01/11] feat(53461): add es decorators metadata --- src/compiler/factory/emitHelpers.ts | 23 +- src/compiler/transformers/esDecorators.ts | 69 +++- ...tion-accessors-nonStatic(target=es2015).js | 14 +- ...tion-accessors-nonStatic(target=es2022).js | 14 +- ...aration-accessors-nonStatic(target=es5).js | 14 +- ...cessors-nonStaticPrivate(target=es2015).js | 6 +- ...cessors-nonStaticPrivate(target=es2022).js | 6 +- ...aration-accessors-static(target=es2015).js | 14 +- ...aration-accessors-static(target=es2022).js | 14 +- ...eclaration-accessors-static(target=es5).js | 14 +- ...-accessors-staticPrivate(target=es2015).js | 10 +- ...-accessors-staticPrivate(target=es2022).js | 10 +- ...ecorators-classDeclaration-classSuper.1.js | 4 +- ...ecorators-classDeclaration-classSuper.2.js | 12 +- ...ecorators-classDeclaration-classSuper.3.js | 4 +- ...ecorators-classDeclaration-classSuper.4.js | 4 +- ...ecorators-classDeclaration-classSuper.5.js | 12 +- ...ecorators-classDeclaration-classSuper.6.js | 4 +- ...ecorators-classDeclaration-classSuper.7.js | 12 +- ...ation-classThisReference(target=es2015).js | 4 +- ...ation-classThisReference(target=es2022).js | 4 +- ...classDeclaration-classThisReference.es5.js | 4 +- ...ervation(module=commonjs,target=es2015).js | 40 +- ...ervation(module=commonjs,target=es2022).js | 40 +- ...eservation(module=esnext,target=es2015).js | 40 +- ...eservation(module=esnext,target=es2022).js | 40 +- ...eclaration-commonjs-classNamespaceMerge.js | 4 +- .../esDecorators-classDeclaration-commonjs.js | 4 +- ...t=es2015,usedefineforclassfields=false).js | 8 +- ...et=es2015,usedefineforclassfields=true).js | 8 +- ...t=es2022,usedefineforclassfields=false).js | 8 +- ...et=es2022,usedefineforclassfields=true).js | 8 +- ...rget=es5,usedefineforclassfields=false).js | 9 +- ...arget=es5,usedefineforclassfields=true).js | 9 +- ...t=esnext,usedefineforclassfields=false).js | 8 +- ...fields-nonStaticAccessor(target=es2015).js | 8 +- ...fields-nonStaticAccessor(target=es2022).js | 8 +- ...-fields-nonStaticPrivate(target=es2015).js | 6 +- ...-fields-nonStaticPrivate(target=es2022).js | 4 +- ...nonStaticPrivateAccessor(target=es2015).js | 4 +- ...nonStaticPrivateAccessor(target=es2022).js | 4 +- ...t=es2015,usedefineforclassfields=false).js | 8 +- ...et=es2015,usedefineforclassfields=true).js | 8 +- ...t=es2022,usedefineforclassfields=false).js | 8 +- ...et=es2022,usedefineforclassfields=true).js | 8 +- ...rget=es5,usedefineforclassfields=false).js | 8 +- ...arget=es5,usedefineforclassfields=true).js | 8 +- ...t=esnext,usedefineforclassfields=false).js | 8 +- ...on-fields-staticAccessor(target=es2015).js | 12 +- ...on-fields-staticAccessor(target=es2022).js | 12 +- ...ion-fields-staticPrivate(target=es2015).js | 8 +- ...ion-fields-staticPrivate(target=es2022).js | 8 +- ...ds-staticPrivateAccessor(target=es2015).js | 8 +- ...ds-staticPrivateAccessor(target=es2022).js | 8 +- ...ration-methods-nonStatic(target=es2015).js | 8 +- ...ration-methods-nonStatic(target=es2022).js | 8 +- ...claration-methods-nonStatic(target=es5).js | 8 +- ...methods-nonStaticPrivate(target=es2015).js | 4 +- ...methods-nonStaticPrivate(target=es2022).js | 4 +- ...claration-methods-static(target=es2015).js | 8 +- ...claration-methods-static(target=es2022).js | 8 +- ...sDeclaration-methods-static(target=es5).js | 8 +- ...on-methods-staticPrivate(target=es2015).js | 8 +- ...on-methods-staticPrivate(target=es2022).js | 8 +- ...ion-missingEmitHelpers-classDecorator.1.js | 4 +- ...ion-missingEmitHelpers-classDecorator.2.js | 4 +- ...ion-missingEmitHelpers-classDecorator.3.js | 4 +- ...mitHelpers-nonStaticPrivateAutoAccessor.js | 4 +- ...issingEmitHelpers-nonStaticPrivateField.js | 4 +- ...ssingEmitHelpers-nonStaticPrivateGetter.js | 4 +- ...ssingEmitHelpers-nonStaticPrivateMethod.js | 4 +- ...ssingEmitHelpers-nonStaticPrivateSetter.js | 4 +- ...gEmitHelpers-staticComputedAutoAccessor.js | 4 +- ...-missingEmitHelpers-staticComputedField.js | 4 +- ...missingEmitHelpers-staticComputedGetter.js | 4 +- ...missingEmitHelpers-staticComputedMethod.js | 4 +- ...missingEmitHelpers-staticComputedSetter.js | 4 +- ...ngEmitHelpers-staticPrivateAutoAccessor.js | 4 +- ...n-missingEmitHelpers-staticPrivateField.js | 4 +- ...-missingEmitHelpers-staticPrivateGetter.js | 4 +- ...-missingEmitHelpers-staticPrivateMethod.js | 4 +- ...-missingEmitHelpers-staticPrivateSetter.js | 4 +- ...ation-multipleDecorators(target=es2015).js | 4 +- ...ation-multipleDecorators(target=es2022).js | 4 +- ...laration-multipleDecorators(target=es5).js | 4 +- ...ation-outerThisReference(target=es2015).js | 18 +- ...ation-outerThisReference(target=es2021).js | 18 +- ...ation-outerThisReference(target=es2022).js | 18 +- ...t=es2015,usedefineforclassfields=false).js | 4 +- ...et=es2015,usedefineforclassfields=true).js | 4 +- ...t=es2022,usedefineforclassfields=false).js | 4 +- ...et=es2022,usedefineforclassfields=true).js | 4 +- ...rget=es5,usedefineforclassfields=false).js | 4 +- ...arget=es5,usedefineforclassfields=true).js | 4 +- ...t=esnext,usedefineforclassfields=false).js | 4 +- ...laration-setFunctionName(target=es2015).js | 12 +- ...laration-setFunctionName(target=es2022).js | 12 +- ...Declaration-setFunctionName(target=es5).js | 12 +- ...ion-simpleTransformation(target=es2015).js | 4 +- ...ion-simpleTransformation(target=es2022).js | 4 +- ...ration-simpleTransformation(target=es5).js | 4 +- ...assDeclaration-sourceMap(target=es2015).js | 24 +- ...eclaration-sourceMap(target=es2015).js.map | 4 +- ...ion-sourceMap(target=es2015).sourcemap.txt | 296 +++++++------- ...assDeclaration-sourceMap(target=es2022).js | 24 +- ...eclaration-sourceMap(target=es2022).js.map | 4 +- ...ion-sourceMap(target=es2022).sourcemap.txt | 370 +++++++++--------- ...Decorators-classExpression-classSuper.1.js | 4 +- ...Decorators-classExpression-classSuper.2.js | 12 +- ...Decorators-classExpression-classSuper.3.js | 4 +- ...Decorators-classExpression-classSuper.4.js | 4 +- ...Decorators-classExpression-classSuper.5.js | 12 +- ...Decorators-classExpression-classSuper.6.js | 4 +- ...sion-commentPreservation(target=es2015).js | 24 +- ...sion-commentPreservation(target=es2022).js | 24 +- ...ion-missingEmitHelpers-classDecorator.1.js | 4 +- ...on-missingEmitHelpers-classDecorator.10.js | 4 +- ...on-missingEmitHelpers-classDecorator.11.js | 4 +- ...on-missingEmitHelpers-classDecorator.12.js | 4 +- ...on-missingEmitHelpers-classDecorator.13.js | 4 +- ...on-missingEmitHelpers-classDecorator.14.js | 4 +- ...on-missingEmitHelpers-classDecorator.15.js | 4 +- ...on-missingEmitHelpers-classDecorator.16.js | 4 +- ...on-missingEmitHelpers-classDecorator.17.js | 4 +- ...ion-missingEmitHelpers-classDecorator.2.js | 4 +- ...ion-missingEmitHelpers-classDecorator.3.js | 4 +- ...ion-missingEmitHelpers-classDecorator.4.js | 4 +- ...ion-missingEmitHelpers-classDecorator.5.js | 4 +- ...ion-missingEmitHelpers-classDecorator.6.js | 4 +- ...ion-missingEmitHelpers-classDecorator.7.js | 4 +- ...ion-missingEmitHelpers-classDecorator.8.js | 4 +- ...ion-missingEmitHelpers-classDecorator.9.js | 4 +- ...ators-classExpression-namedEvaluation.1.js | 32 +- ...tors-classExpression-namedEvaluation.10.js | 72 +++- ...tors-classExpression-namedEvaluation.11.js | 16 +- ...ators-classExpression-namedEvaluation.2.js | 60 ++- ...ators-classExpression-namedEvaluation.3.js | 24 +- ...ators-classExpression-namedEvaluation.4.js | 24 +- ...ators-classExpression-namedEvaluation.5.js | 8 +- ...ators-classExpression-namedEvaluation.6.js | 8 +- ...ators-classExpression-namedEvaluation.7.js | 8 +- ...ators-classExpression-namedEvaluation.8.js | 8 +- ...ators-classExpression-namedEvaluation.9.js | 8 +- ...rs-emitDecoratorMetadata(target=es2015).js | 32 +- ...rs-emitDecoratorMetadata(target=es2022).js | 32 +- ...ators-emitDecoratorMetadata(target=es5).js | 32 +- .../esDecoratorsMetadata1(target=es2015).js | 94 +++++ .../esDecoratorsMetadata1(target=es2022).js | 89 +++++ .../esDecoratorsMetadata2(target=es2015).js | 123 ++++++ .../esDecoratorsMetadata2(target=es2022).js | 116 ++++++ .../esDecoratorsMetadata3(target=es2015).js | 106 +++++ .../esDecoratorsMetadata3(target=es2022).js | 99 +++++ .../esDecoratorsMetadata4(target=es2015).js | 109 ++++++ .../esDecoratorsMetadata4(target=es2022).js | 104 +++++ ...tes-diagnostics-and-emit-for-decorators.js | 4 +- .../metadata/esDecoratorsMetadata1.ts | 22 ++ .../metadata/esDecoratorsMetadata2.ts | 30 ++ .../metadata/esDecoratorsMetadata3.ts | 23 ++ .../metadata/esDecoratorsMetadata4.ts | 31 ++ 159 files changed, 2320 insertions(+), 802 deletions(-) create mode 100644 tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js create mode 100644 tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js create mode 100644 tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts create mode 100644 tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts create mode 100644 tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts create mode 100644 tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts index e14652a3ab4b8..503f94e8077d4 100644 --- a/src/compiler/factory/emitHelpers.ts +++ b/src/compiler/factory/emitHelpers.ts @@ -59,6 +59,8 @@ export interface ESDecorateClassContext { * The name of the decorated element. */ name: Expression; + + metadata?: Expression; } /** @@ -75,6 +77,7 @@ export interface ESDecorateClassElementContext { static: boolean; private: boolean; access: ESDecorateClassElementAccess; + metadata?: Expression; } /** @internal */ @@ -245,12 +248,14 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel // ES Decorators Helpers function createESDecorateClassContextObject(contextIn: ESDecorateClassContext) { - return factory.createObjectLiteralExpression([ + const properties = [ factory.createPropertyAssignment(factory.createIdentifier("kind"), factory.createStringLiteral("class")), - factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name) - ]); - } + factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name), + ]; + if (contextIn.metadata) properties.push(factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata)); + return factory.createObjectLiteralExpression(properties); + } function createESDecorateClassElementAccessGetMethod(elementName: ESDecorateName) { const accessor = elementName.computed ? @@ -344,13 +349,16 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel } function createESDecorateClassElementContextObject(contextIn: ESDecorateClassElementContext) { - return factory.createObjectLiteralExpression([ + const properties = [ factory.createPropertyAssignment(factory.createIdentifier("kind"), factory.createStringLiteral(contextIn.kind)), factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory.createStringLiteralFromNode(contextIn.name.name)), factory.createPropertyAssignment(factory.createIdentifier("static"), contextIn.static ? factory.createTrue() : factory.createFalse()), factory.createPropertyAssignment(factory.createIdentifier("private"), contextIn.private ? factory.createTrue() : factory.createFalse()), - factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)) - ]); + factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + ]; + + if (contextIn.metadata) properties.push(factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata)); + return factory.createObjectLiteralExpression(properties); } function createESDecorateContextObject(contextIn: ESDecorateContext) { @@ -381,7 +389,6 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel value ? [thisArg, initializers, value] : [thisArg, initializers] ); } - // ES2018 Helpers function createAssignHelper(attributesSegments: Expression[]) { diff --git a/src/compiler/transformers/esDecorators.ts b/src/compiler/transformers/esDecorators.ts index cdb69e6298752..c2c501bf3bf6f 100644 --- a/src/compiler/transformers/esDecorators.ts +++ b/src/compiler/transformers/esDecorators.ts @@ -220,6 +220,7 @@ interface ClassInfo { classExtraInitializersName?: Identifier; // used in step 13 classThis?: Identifier; // `_classThis`, if needed. classSuper?: Identifier; // `_classSuper`, if needed. + metadataReference?: Identifier; memberInfos?: Map; // used in step 4.a, 12, and construction @@ -726,8 +727,11 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // - The second pass visits the constructor to add instance initializers. // // NOTE: If there are no constructors, but there are instance initializers, a synthetic constructor is added. - enterClass(classInfo); + + classInfo.metadataReference = factory.createIdentifier("metadata"); + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo.metadataReference, !!heritageClauses)); + let members = visitNodes(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { let outerThis: Identifier | undefined; @@ -841,7 +845,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc if (classInfo.classDescriptorName && classInfo.classDecoratorsName && classInfo.classExtraInitializersName && classInfo.classThis) { leadingBlockStatements ??= []; - // __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, _classExtraInitializers); + // __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata }, _classExtraInitializers); const valueProperty = factory.createPropertyAssignment("value", factory.createThis()); const classDescriptor = factory.createObjectLiteralExpression([valueProperty]); const classDescriptorAssignment = factory.createAssignment(classInfo.classDescriptorName, classDescriptor); @@ -850,7 +854,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc factory.createNull(), classDescriptorAssignment, classInfo.classDecoratorsName, - { kind: "class", name: classNameReference }, + { kind: "class", name: classNameReference, metadata: classInfo.metadataReference }, factory.createNull(), classInfo.classExtraInitializersName ); @@ -865,6 +869,9 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc leadingBlockStatements.push(factory.createExpressionStatement(classReferenceAssignment)); } + // if (metadata) Object.defineProperty(C, Symbol.metadata, { configurable: true, writable: true, value: metadata }); + leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo.metadataReference)); + // 11. Static extra initializers are evaluated if (classInfo.staticExtraInitializersName) { const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo.staticExtraInitializersName); @@ -1212,6 +1219,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) }, + metadata: classInfo.metadataReference, }; const extraInitializers = isStatic(member) ? @@ -2332,4 +2340,59 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc factory.createStringLiteral("default") : factory.createStringLiteralFromNode(name); } + + function createMetadata(name: Identifier, hasProto: boolean) { + const varDecl = factory.createVariableDeclaration( + name, + /*exclamationToken*/ undefined, + /*type*/ undefined, + factory.createConditionalExpression( + factory.createBinaryExpression( + factory.createBinaryExpression(factory.createTypeOfExpression(factory.createIdentifier("Symbol")), factory.createToken(SyntaxKind.EqualsEqualsEqualsToken), factory.createStringLiteral("function")), + factory.createToken(SyntaxKind.AmpersandAmpersandToken), + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), factory.createIdentifier("metadata")), + ), + factory.createToken(SyntaxKind.QuestionToken), + factory.createCallExpression( + factory.createPropertyAccessExpression(factory.createIdentifier("Object"), factory.createIdentifier("create")), + /*typeArguments*/ undefined, + [hasProto ? createSymbolMetadataReference() : factory.createNull()] + ), + factory.createToken(SyntaxKind.ColonToken), + factory.createIdentifier("undefined"), + ), + ); + return factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); + } + + function createSymbolMetadata(target: Identifier | ThisExpression, value: Identifier) { + const properties = [ + factory.createPropertyAssignment("configurable", factory.createTrue()), + factory.createPropertyAssignment("writable", factory.createTrue()), + factory.createPropertyAssignment("enumerable", factory.createTrue()), + factory.createPropertyAssignment("value", value), + ]; + + const defineProperty = factory.createCallExpression( + factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, + [ + target, + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), factory.createIdentifier("metadata")), + factory.createObjectLiteralExpression(properties, /*multiLine*/ false), + ] + ); + + return setEmitFlags( + factory.createIfStatement(value, factory.createExpressionStatement(defineProperty)), + EmitFlags.SingleLine, + ); + } + + function createSymbolMetadataReference() { + return factory.createElementAccessExpression( + factory.createThis(), + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), factory.createIdentifier("metadata")), + ); + } } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js index 172a83f05ceb3..5c1c7237b72b6 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js @@ -39,12 +39,14 @@ let C = (() => { } }, (() => { - __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } } }, null, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js index bb976329b0eba..3fe7a0be321a5 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js @@ -28,12 +28,14 @@ let C = (() => { let _set_member_decorators_1; return class C { static { - __esDecorate(this, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_member_decorators_1, { kind: "getter", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_member_decorators_1, { kind: "setter", name: _b, static: false, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } } }, null, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(this, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_member_decorators_1, { kind: "getter", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_member_decorators_1, { kind: "setter", name: _b, static: false, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } get method1() { return 0; } set method1(value) { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js index 2a06295af0f20..bfa7b5365150e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js @@ -57,12 +57,14 @@ var C = function () { return C; }()), (function () { - __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } } }, null, _instanceExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js index fe070ffbd8b3f..7e171c69b96d2 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js @@ -27,10 +27,12 @@ let C = (() => { _C_method1_get = function _C_method1_get() { return _private_get_method1_descriptor.get.call(this); }, _C_method1_set = function _C_method1_set(value) { return _private_set_method1_descriptor.set.call(this, value); }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_get_method1_decorators = [dec(1)]; _private_set_method1_decorators = [dec(2)]; - __esDecorate(_a, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) } }, null, _instanceExtraInitializers); - __esDecorate(_a, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_method1_set); } } }, null, _instanceExtraInitializers); + __esDecorate(_a, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_method1_set); } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js index 68413f945ceec..57e863f01caa0 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js @@ -18,10 +18,12 @@ let C = (() => { let _private_set_method1_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_get_method1_decorators = [dec(1)]; _private_set_method1_decorators = [dec(2)]; - __esDecorate(this, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 } }, null, _instanceExtraInitializers); - __esDecorate(this, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } } }, null, _instanceExtraInitializers); + __esDecorate(this, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } get #method1() { return _private_get_method1_descriptor.get.call(this); } set #method1(value) { return _private_set_method1_descriptor.set.call(this, value); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js index b1a2340b3f914..c7db78231a922 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js @@ -36,12 +36,14 @@ let C = (() => { static set [(_static_set_member_decorators_1 = [dec(32)], _c = __propKey(method3))](value) { } }, (() => { - __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js index a2f43c826f1a5..f6b5ea2748b53 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js @@ -28,12 +28,14 @@ let C = (() => { let _static_set_member_decorators_1; return class C { static { - __esDecorate(this, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_get_member_decorators_1, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_member_decorators_1, { kind: "setter", name: _b, static: true, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(this, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_get_member_decorators_1, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_member_decorators_1, { kind: "setter", name: _b, static: true, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static get method1() { return 0; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js index 4b2145d6f919f..a9816c94c5f61 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js @@ -56,12 +56,14 @@ var C = function () { return C; }()), (function () { - __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } } }, null, _staticExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js index 99000eedb6c06..69b0a684c8080 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js @@ -32,10 +32,12 @@ let C = (() => { _C_method1_get = function _C_method1_get() { return _static_private_get_method1_descriptor.get.call(this); }, _C_method1_set = function _C_method1_set(value) { return _static_private_set_method1_descriptor.set.call(this, value); }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_get_method1_decorators = [dec(1)]; _static_private_set_method1_decorators = [dec(2)]; - __esDecorate(_a, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) } }, null, _staticExtraInitializers); - __esDecorate(_a, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_method1_set); } } }, null, _staticExtraInitializers); + __esDecorate(_a, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_method1_set); } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; @@ -52,8 +54,10 @@ let D = (() => { _method1_set = function _method1_set(value) { }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(); (() => { __classPrivateFieldGet(_classThis, _classThis, "a", _method1_get); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js index 9c6884476cd75..5fca9df5bd4c6 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js @@ -28,10 +28,12 @@ let C = (() => { let _static_private_set_method1_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_get_method1_decorators = [dec(1)]; _static_private_set_method1_decorators = [dec(2)]; - __esDecorate(this, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } } }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static get #method1() { return _static_private_get_method1_descriptor.get.call(this); } @@ -48,8 +50,10 @@ let D = (() => { static { __setFunctionName(this, "D"); } static { _method1_get = function _method1_get() { return 0; }, _method1_set = function _method1_set(value) { }; } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { __classPrivateFieldGet(_classThis, _classThis, "a", _method1_get); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js index 9c19a1b1c3f9e..be8d2a2912059 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js @@ -33,8 +33,10 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js index 09a3a34b0b835..77ba20cfb6b52 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js @@ -39,8 +39,10 @@ let C1 = (() => { }); var C1 = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper, "name", _classThis); @@ -60,8 +62,10 @@ let C2 = (() => { let _classSuper_1 = (0, function () { }); var C2 = class extends _classSuper_1 { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper_1, "name", _classThis_1); @@ -81,8 +85,10 @@ let C3 = (() => { let _classSuper_2 = (0, (() => { })); var C3 = class extends _classSuper_2 { static { - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper_2, "name", _classThis_2); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js index bb7b5c3890bc1..d2de86b775581 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js @@ -55,8 +55,10 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js index 7f79fba3112c4..d91847410cac7 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js @@ -30,8 +30,10 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper, "method", _classThis).call(_classThis); static b = Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js index 7bcc607444fb4..eadcd2b3ec532 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js @@ -59,8 +59,10 @@ let C1 = (() => { let _classSuper = Base; var C1 = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper, "x", _classThis); static b = (() => { @@ -103,8 +105,10 @@ let C2 = (() => { let _classSuper_1 = Base; var C2 = class extends _classSuper_1 { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper_1, "x", _classThis_1); static b = (() => { @@ -147,8 +151,10 @@ let C3 = (() => { let _classSuper_2 = Base; var C3 = class extends _classSuper_2 { static { - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper_2, x, _classThis_2); static b = (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js index def3ef1208dc0..35bf6aa610206 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js @@ -36,8 +36,10 @@ let C = (() => { let _classThis; var C = class extends Base { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } static m() { super.method(); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js index 0072e715044bc..950e81bb0b8f4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js @@ -50,8 +50,10 @@ let B = (() => { let _m_decorators; return class B extends A { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; _m_decorators = [foo]; - __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m } }, null, _instanceExtraInitializers); + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } constructor() { 'inject'; @@ -75,8 +77,10 @@ let C = (() => { let _get_val_decorators; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _get_val_decorators = [foo]; - __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val } }, null, _instanceExtraInitializers_1); + __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: metadata }, null, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } constructor() { __runInitializers(this, _instanceExtraInitializers_1); @@ -90,8 +94,10 @@ let D = (() => { let _get_val_decorators; return class D extends A { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; _get_val_decorators = [foo]; - __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val } }, null, _instanceExtraInitializers_2); + __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: metadata }, null, _instanceExtraInitializers_2); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } constructor() { super(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js index ec04ba624335f..7ebb1dd0cf073 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js @@ -28,8 +28,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(); (() => { _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js index 616b3afdff5dc..038dfdf2141c8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js @@ -23,8 +23,10 @@ let C = (() => { var C = class { static { __setFunctionName(this, "C"); } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { _classThis; } static x = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js index 8e7ed7b6511b8..a0831e54bf62a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js @@ -32,8 +32,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(); (function () { _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js index bc92f15ecde04..1195be088374c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js @@ -171,6 +171,7 @@ let C = (() => { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; __setFunctionName(_classThis, "C"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -181,18 +182,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); /*28*/ @@ -217,8 +219,10 @@ let D = exports.D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return D = _classThis; @@ -232,8 +236,10 @@ exports.default = (() => { }; __setFunctionName(_classThis_1, "E"); (() => { - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return E = _classThis_1; @@ -252,8 +258,10 @@ let F = exports.F = (() => { }; __setFunctionName(_classThis, "F"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return F = _classThis; @@ -267,8 +275,10 @@ exports.default = (() => { }; __setFunctionName(_classThis_1, "G"); (() => { - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return G = _classThis_1; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js index 812dcb28249c2..a32490fb634ba 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js @@ -151,6 +151,7 @@ let C = (() => { static { __setFunctionName(this, "C"); } static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -161,18 +162,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); } /*4*/ @@ -212,8 +214,10 @@ let D = exports.D = (() => { let _classThis; var D = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -226,8 +230,10 @@ exports.default = (() => { let _classThis_1; var E = class { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -245,8 +251,10 @@ let F = exports.F = (() => { let _classThis; var F = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -259,8 +267,10 @@ exports.default = (() => { let _classThis_1; var G = class { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js index 98eb2ad7ac31a..af116ea299273 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js @@ -171,6 +171,7 @@ let C = (() => { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; __setFunctionName(_classThis, "C"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -181,18 +182,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); /*28*/ @@ -215,8 +217,10 @@ export let D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return D = _classThis; @@ -231,8 +235,10 @@ export default (() => { }; __setFunctionName(_classThis_1, "E"); (() => { - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return E = _classThis_1; @@ -248,8 +254,10 @@ export let F = (() => { }; __setFunctionName(_classThis, "F"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return F = _classThis; @@ -264,8 +272,10 @@ export default (() => { }; __setFunctionName(_classThis_1, "G"); (() => { - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return G = _classThis_1; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js index fb04f31ae345d..dd49087d88cc3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js @@ -151,6 +151,7 @@ let C = (() => { static { __setFunctionName(this, "C"); } static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -161,18 +162,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); } /*4*/ @@ -210,8 +212,10 @@ export let D = (() => { let _classThis; var D = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -225,8 +229,10 @@ export default (() => { let _classThis_1; var E = class { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -241,8 +247,10 @@ export let F = (() => { let _classThis; var F = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -256,8 +264,10 @@ export default (() => { let _classThis_1; var G = class { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js b/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js index 0d52e9f2854ed..b74455918625b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js @@ -59,8 +59,10 @@ let Example = exports.Example = (() => { let _classThis; var Example = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); Example = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } static foo() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js b/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js index d354b8480487b..651eef4be2983 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js @@ -55,8 +55,10 @@ let Example = exports.Example = (() => { let _classThis; var Example = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); Example = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } static foo() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js index 258efea904410..f03f4133924ed 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js @@ -36,9 +36,11 @@ let C = (() => { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js index 45bf678a9432b..c1adbc8d5af47 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js @@ -51,9 +51,11 @@ let C = (() => { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js index 0b69451c77b71..9633b92671bb8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js @@ -31,9 +31,11 @@ let C = (() => { } static { _field1_decorators = [dec(1)], _member_decorators = [dec(2)], _member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } }; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js index cb90b1c3ecfb3..39a73420e2bb8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js @@ -25,9 +25,11 @@ let C = (() => { let _member_initializers_1 = []; return class C { static { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } field1 = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _field1_initializers, 1)); ["field2"] = __runInitializers(this, _member_initializers, 2); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js index f4d9394fa7b1f..0f039ab52ddd8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js @@ -13,6 +13,7 @@ class C { //// [esDecorators-classDeclaration-fields-nonStatic.js] +var _this = this; var field3 = "field3"; var C = function () { var _a; @@ -37,9 +38,11 @@ var C = function () { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js index 4091a6d708c92..334009691caf5 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js @@ -13,6 +13,7 @@ class C { //// [esDecorators-classDeclaration-fields-nonStatic.js] +var _this = this; var field3 = "field3"; var C = function () { var _a; @@ -52,9 +53,11 @@ var C = function () { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js index 0b69451c77b71..9633b92671bb8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js @@ -31,9 +31,11 @@ let C = (() => { } static { _field1_decorators = [dec(1)], _member_decorators = [dec(2)], _member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } }; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js index cfd40fa026417..ee606b3513894 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js @@ -38,9 +38,11 @@ let C = (() => { set [_b](value) { __classPrivateFieldSet(this, _C__b_accessor_storage, value, "f"); } }, (() => { - __esDecorate(_a, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators_1, { kind: "accessor", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators_1, { kind: "accessor", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js index 208e68dd8231f..74b592d5d0d01 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js @@ -25,9 +25,11 @@ let C = (() => { let _member_initializers_1 = []; return class C { static { - __esDecorate(this, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _member_initializers, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators_1, { kind: "accessor", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _member_initializers_1, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(this, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators_1, { kind: "accessor", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } #field1_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _field1_initializers, 1)); get field1() { return this.#field1_accessor_storage; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js index e93d45e8903b3..b1290216b7486 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js @@ -10,7 +10,7 @@ class C { //// [esDecorators-classDeclaration-fields-nonStaticPrivate.js] let C = (() => { - var _C_field1, _a; + var _a, _C_field1; let _instanceExtraInitializers = []; let _private_field1_decorators; let _private_field1_initializers = []; @@ -21,8 +21,10 @@ let C = (() => { }, _C_field1 = new WeakMap(), (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_field1_decorators = [dec]; - __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_field1, obj), get: obj => __classPrivateFieldGet(obj, _C_field1, "f"), set: (obj, value) => { __classPrivateFieldSet(obj, _C_field1, value, "f"); } } }, _private_field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_field1, obj), get: obj => __classPrivateFieldGet(obj, _C_field1, "f"), set: (obj, value) => { __classPrivateFieldSet(obj, _C_field1, value, "f"); } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js index 722ec97c9de1f..dd5886acd5d6e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js @@ -15,8 +15,10 @@ let C = (() => { let _private_field1_initializers = []; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_field1_decorators = [dec]; - __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } } }, _private_field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } #field1 = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _private_field1_initializers, 0)); }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js index 55d8de19510cb..4aec9a0be1735 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js @@ -26,8 +26,10 @@ let C = (() => { _C_field1_get = function _C_field1_get() { return _private_field1_descriptor.get.call(this); }, _C_field1_set = function _C_field1_set(value) { return _private_field1_descriptor.set.call(this, value); }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_field1_decorators = [dec]; - __esDecorate(_a, _private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _C_field1_accessor_storage, "f"); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _C_field1_accessor_storage, value, "f"); }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_field1_set); } } }, _private_field1_initializers, _instanceExtraInitializers); + __esDecorate(_a, _private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _C_field1_accessor_storage, "f"); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _C_field1_accessor_storage, value, "f"); }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_field1_set); } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js index c459824c7799c..12be8cfaf3853 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js @@ -16,8 +16,10 @@ let C = (() => { let _private_field1_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_field1_decorators = [dec]; - __esDecorate(this, _private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } } }, _private_field1_initializers, _instanceExtraInitializers); + __esDecorate(this, _private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } #field1_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _private_field1_initializers, 0)); get #field1() { return _private_field1_descriptor.get.call(this); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js index ba2a908cdcdfa..fc1eea0048cf9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js @@ -31,9 +31,11 @@ let C = (() => { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a.field1 = __runInitializers(_a, _static_field1_initializers, 1), diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js index 35fc2a30e9da6..ccadc8bc018ef 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js @@ -31,9 +31,11 @@ let C = (() => { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), Object.defineProperty(_a, "field1", { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js index f0ec33054d68b..b70fa437a741c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js @@ -26,9 +26,11 @@ let C = (() => { return class C { static { _static_field1_decorators = [dec(1)], _static_member_decorators = [dec(2)], _static_member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static { this.field1 = __runInitializers(this, _static_field1_initializers, 1); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js index fcc8837be7fe1..98f9feca0cee4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js @@ -25,9 +25,11 @@ let C = (() => { let _static_member_initializers_1 = []; return class C { static { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static field1 = __runInitializers(this, _static_field1_initializers, 1); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js index b720fd675289e..574cc13e112ed 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js @@ -35,9 +35,11 @@ var C = function () { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a.field1 = __runInitializers(_a, _static_field1_initializers, 1), diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js index d2194ff469a63..84c8d114d7876 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js @@ -35,9 +35,11 @@ var C = function () { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), Object.defineProperty(_a, "field1", { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js index f0ec33054d68b..b70fa437a741c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js @@ -26,9 +26,11 @@ let C = (() => { return class C { static { _static_field1_decorators = [dec(1)], _static_member_decorators = [dec(2)], _static_member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static { this.field1 = __runInitializers(this, _static_field1_initializers, 1); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js index a914c0d06dc06..feb056ff74655 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js @@ -41,9 +41,11 @@ let C = (() => { static set [_b](value) { __classPrivateFieldSet(this, _a, value, "f", _C__b_accessor_storage); } }, (() => { - __esDecorate(_a, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators_1, { kind: "accessor", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators_1, { kind: "accessor", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _C_field1_accessor_storage = { value: __runInitializers(_a, _static_field1_initializers, 1) }, @@ -63,8 +65,10 @@ let D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(); _field1_accessor_storage = { value: 1 }; (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js index 15e126bf87c56..b554228b3572b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js @@ -33,9 +33,11 @@ let C = (() => { let _static_member_initializers_1 = []; return class C { static { - __esDecorate(this, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } } }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } } }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators_1, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _static_member_initializers_1, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(this, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators_1, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static #field1_accessor_storage = __runInitializers(this, _static_field1_initializers, 1); @@ -58,8 +60,10 @@ let D = (() => { var D = class { static { __setFunctionName(this, "D"); } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { _field1_accessor_storage = { value: 1 }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js index 70c22ebd6d38d..b02ec2578dba9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js @@ -26,8 +26,10 @@ let C = (() => { return _a = class C { }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_field1_decorators = [dec]; - __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "f", _C_field1), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "f", _C_field1); } } }, _static_private_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "f", _C_field1), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "f", _C_field1); } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _C_field1 = { value: __runInitializers(_a, _static_private_field1_initializers, 0) }, @@ -43,8 +45,10 @@ let D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(); _field1 = { value: 0 }; (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js index cbb231f1416e5..56f23b8c04f3e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js @@ -24,8 +24,10 @@ let C = (() => { let _static_private_field1_initializers = []; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_field1_decorators = [dec]; - __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } } }, _static_private_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static #field1 = __runInitializers(this, _static_private_field1_initializers, 0); @@ -40,8 +42,10 @@ let D = (() => { var D = class { static { __setFunctionName(this, "D"); } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { _field1 = { value: 0 }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js index 70faeb7dec516..556cae54991f1 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js @@ -29,8 +29,10 @@ let C = (() => { _C_field1_get = function _C_field1_get() { return _static_private_field1_descriptor.get.call(this); }, _C_field1_set = function _C_field1_set(value) { return _static_private_field1_descriptor.set.call(this, value); }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_field1_decorators = [dec]; - __esDecorate(_a, _static_private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_a, _a, "f", _C_field1_accessor_storage); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C_field1_accessor_storage); }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_field1_set); } } }, _static_private_field1_initializers, _staticExtraInitializers); + __esDecorate(_a, _static_private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_a, _a, "f", _C_field1_accessor_storage); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C_field1_accessor_storage); }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_field1_set); } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _C_field1_accessor_storage = { value: __runInitializers(this, _static_private_field1_initializers, 0) }, @@ -48,8 +50,10 @@ let D = (() => { _field1_set = function _field1_set(value) { __classPrivateFieldSet(this, _classThis, value, "f", _field1_accessor_storage); }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(); _field1_accessor_storage = { value: 0 }; (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js index 1337c1f57aa28..75e4fda9e3e53 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js @@ -25,8 +25,10 @@ let C = (() => { let _static_private_field1_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_field1_decorators = [dec]; - __esDecorate(this, _static_private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } } }, _static_private_field1_initializers, _staticExtraInitializers); + __esDecorate(this, _static_private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static #field1_accessor_storage = __runInitializers(this, _static_private_field1_initializers, 0); @@ -44,8 +46,10 @@ let D = (() => { static { __setFunctionName(this, "D"); } static { _field1_get = function _field1_get() { return __classPrivateFieldGet(this, _classThis, "f", _field1_accessor_storage); }, _field1_set = function _field1_set(value) { __classPrivateFieldSet(this, _classThis, value, "f", _field1_accessor_storage); }; } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { _field1_accessor_storage = { value: 0 }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js index 08bf58097fc89..0ddee29bffe2d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js @@ -30,9 +30,11 @@ let C = (() => { } }, (() => { - __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] } }, null, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js index 2c394adcb8718..e70164a8e4820 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js @@ -22,9 +22,11 @@ let C = (() => { let _member_decorators_1; return class C { static { - __esDecorate(this, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators_1, { kind: "method", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] } }, null, _instanceExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(this, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators_1, { kind: "method", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } method1() { } ["method2"]() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js index ee0e92d4500d5..1c87001510eb2 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js @@ -32,9 +32,11 @@ var C = function () { return C; }()), (function () { - __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } } }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } } }, null, _instanceExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js index af23087afaaff..6a2d50106bd2e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js @@ -23,8 +23,10 @@ let C = (() => { _C_instances = new WeakSet(), _C_method1_get = function _C_method1_get() { return _private_method1_descriptor.value; }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_method1_decorators = [dec]; - __esDecorate(_a, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) } }, null, _instanceExtraInitializers); + __esDecorate(_a, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js index a557eec5aff24..d7d911fe4d731 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js @@ -15,8 +15,10 @@ let C = (() => { let _private_method1_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_method1_decorators = [dec]; - __esDecorate(this, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 } }, null, _instanceExtraInitializers); + __esDecorate(this, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } get #method1() { return _private_method1_descriptor.value; } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js index a1d57096c546c..bef0e2c65e202 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js @@ -27,9 +27,11 @@ let C = (() => { static [(_static_method1_decorators = [dec(1)], _static_member_decorators = [dec(2)], _static_member_decorators_1 = [dec(3)], _b = __propKey(method3))]() { } }, (() => { - __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js index c761b27efd8eb..b7d4318e988a3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js @@ -22,9 +22,11 @@ let C = (() => { let _static_member_decorators_1; return class C { static { - __esDecorate(this, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators_1, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(this, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators_1, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static method1() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js index 301743dd21f7e..7079f24eaf8f4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js @@ -31,9 +31,11 @@ var C = function () { return C; }()), (function () { - __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } } }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } } }, null, _staticExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js index 71a531d10ef03..352c7bb4309fb 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js @@ -23,8 +23,10 @@ let C = (() => { }, _C_method1_get = function _C_method1_get() { return _static_private_method1_descriptor.value; }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_method1_decorators = [dec]; - __esDecorate(_a, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) } }, null, _staticExtraInitializers); + __esDecorate(_a, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; @@ -40,8 +42,10 @@ let D = (() => { _method1 = function _method1() { }; __setFunctionName(_classThis, "D"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return D = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js index efc4f2e83a377..60e0494e5d0a3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js @@ -20,8 +20,10 @@ let C = (() => { let _static_private_method1_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_method1_decorators = [dec]; - __esDecorate(this, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 } }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static get #method1() { return _static_private_method1_descriptor.value; } @@ -37,8 +39,10 @@ let D = (() => { static { __setFunctionName(this, "D"); } static { _method1 = function _method1() { }; } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js index d5480454cf474..7d9fbad9b275f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js @@ -24,8 +24,10 @@ let C = (() => { let _classThis; var C = class { static { - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js index c39b9a4c0a89d..c94616281952d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js @@ -24,8 +24,10 @@ exports.default = (() => { var default_1 = class { static { tslib_1.__setFunctionName(this, "default"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js index 75f96af51fcdc..e0fe4d88b9f3a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js @@ -29,8 +29,10 @@ let C = (() => { static { tslib_1.__setFunctionName(this, "C"); } static { _foo = function _foo() { }; } static { - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js index 4f49df19148bb..95e5d0c409894 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js @@ -26,8 +26,10 @@ let C = (() => { let _private_x_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_x_decorators = [dec]; - tslib_1.__esDecorate(this, _private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _private_x_decorators, { kind: "accessor", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } } }, _private_x_initializers, _instanceExtraInitializers); + tslib_1.__esDecorate(this, _private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _private_x_decorators, { kind: "accessor", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _private_x_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } #x_accessor_storage = (tslib_1.__runInitializers(this, _instanceExtraInitializers), tslib_1.__runInitializers(this, _private_x_initializers, void 0)); get #x() { return _private_x_descriptor.get.call(this); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js index bab1ad1f850f8..3c73ecf5723d2 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js @@ -25,8 +25,10 @@ let C = (() => { let _private_x_initializers = []; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_x_decorators = [dec]; - tslib_1.__esDecorate(null, null, _private_x_decorators, { kind: "field", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } } }, _private_x_initializers, _instanceExtraInitializers); + tslib_1.__esDecorate(null, null, _private_x_decorators, { kind: "field", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _private_x_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } #x = (tslib_1.__runInitializers(this, _instanceExtraInitializers), tslib_1.__runInitializers(this, _private_x_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js index a09598198dccf..6c01135db9249 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js @@ -25,8 +25,10 @@ let C = (() => { let _private_get_foo_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_get_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _private_get_foo_decorators, { kind: "getter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo } }, null, _instanceExtraInitializers); + tslib_1.__esDecorate(this, _private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _private_get_foo_decorators, { kind: "getter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } get #foo() { return _private_get_foo_descriptor.get.call(this); } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js index 441fb54802e54..0c35b93d8c9ec 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js @@ -25,8 +25,10 @@ let C = (() => { let _private_foo_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _private_foo_decorators, { kind: "method", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo } }, null, _instanceExtraInitializers); + tslib_1.__esDecorate(this, _private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _private_foo_decorators, { kind: "method", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } get #foo() { return _private_foo_descriptor.value; } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js index 8e2b532516727..c309208699407 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js @@ -25,8 +25,10 @@ let C = (() => { let _private_set_foo_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _private_set_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _private_set_foo_decorators, { kind: "setter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } } }, null, _instanceExtraInitializers); + tslib_1.__esDecorate(this, _private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _private_set_foo_decorators, { kind: "setter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } set #foo(value) { return _private_set_foo_descriptor.set.call(this, value); } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js index 7d65543207b93..c551d7b4868b2 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js @@ -27,7 +27,9 @@ let C = (() => { let _static_member_initializers = []; return class C { static { - tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _static_member_initializers, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static #_a_accessor_storage = tslib_1.__runInitializers(this, _static_member_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js index 15d020f661fb8..aab5f9174e78c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js @@ -27,7 +27,9 @@ let C = (() => { let _static_member_initializers = []; return class C { static { - tslib_1.__esDecorate(null, null, _static_member_decorators, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } } }, _static_member_initializers, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, null, _static_member_decorators, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static [(_static_member_decorators = [dec], _a = tslib_1.__propKey(x))] = tslib_1.__runInitializers(this, _static_member_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js index 627e14485bfb8..eb961ca90b69a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js @@ -26,7 +26,9 @@ let C = (() => { let _static_get_member_decorators; return class C { static { - tslib_1.__esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static get [(_static_get_member_decorators = [dec], _a = tslib_1.__propKey(x))]() { return 1; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js index 95fde00c525aa..31513fe1233b4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js @@ -26,7 +26,9 @@ let C = (() => { let _static_member_decorators; return class C { static { - tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static [(_static_member_decorators = [dec], _a = tslib_1.__propKey(x))]() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js index 9e330847380cc..f711d6afcf7da 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js @@ -26,7 +26,9 @@ let C = (() => { let _static_set_member_decorators; return class C { static { - tslib_1.__esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: _a, static: true, private: false, access: { has: obj => _a in obj, set: (obj, value) => { obj[_a] = value; } } }, null, _staticExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: _a, static: true, private: false, access: { has: obj => _a in obj, set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static set [(_static_set_member_decorators = [dec], _a = tslib_1.__propKey(x))](value) { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js index a7eddaf7d9803..8ae521ffa2e9e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js @@ -26,8 +26,10 @@ let C = (() => { let _static_private_x_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_x_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _static_private_x_decorators, { kind: "accessor", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } } }, _static_private_x_initializers, _staticExtraInitializers); + tslib_1.__esDecorate(this, _static_private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _static_private_x_decorators, { kind: "accessor", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _static_private_x_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static #x_accessor_storage = tslib_1.__runInitializers(this, _static_private_x_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js index 3e9a64ecfad2b..06788a58b6b2b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js @@ -25,8 +25,10 @@ let C = (() => { let _static_private_x_initializers = []; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_x_decorators = [dec]; - tslib_1.__esDecorate(null, null, _static_private_x_decorators, { kind: "field", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } } }, _static_private_x_initializers, _staticExtraInitializers); + tslib_1.__esDecorate(null, null, _static_private_x_decorators, { kind: "field", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _static_private_x_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static #x = tslib_1.__runInitializers(this, _static_private_x_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js index 2f6244e765aee..659f0bd91a5df 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js @@ -25,8 +25,10 @@ let C = (() => { let _static_private_get_foo_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_get_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _static_private_get_foo_decorators, { kind: "getter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo } }, null, _staticExtraInitializers); + tslib_1.__esDecorate(this, _static_private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _static_private_get_foo_decorators, { kind: "getter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static get #foo() { return _static_private_get_foo_descriptor.get.call(this); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js index fc42cb7772d97..134ca7dda77a8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js @@ -25,8 +25,10 @@ let C = (() => { let _static_private_foo_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _static_private_foo_decorators, { kind: "method", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo } }, null, _staticExtraInitializers); + tslib_1.__esDecorate(this, _static_private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _static_private_foo_decorators, { kind: "method", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static get #foo() { return _static_private_foo_descriptor.value; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js index 0de468cf6ebca..2aca3f54193de 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js @@ -25,8 +25,10 @@ let C = (() => { let _static_private_set_foo_descriptor; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_private_set_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _static_private_set_foo_decorators, { kind: "setter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } } }, null, _staticExtraInitializers); + tslib_1.__esDecorate(this, _static_private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _static_private_set_foo_decorators, { kind: "setter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } }, metadata: metadata }, null, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static set #foo(value) { return _static_private_set_foo_descriptor.set.call(this, value); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js index a14fed1ab2a73..8e3c0b04e4831 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js @@ -19,8 +19,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js index 7ee615b20675d..3c2e22e5e0a7a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js @@ -17,8 +17,10 @@ let C = (() => { let _classThis; var C = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js index 83e5ce8484396..0a1a71f66c579 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js @@ -23,8 +23,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js index 4f67275e1af28..f7bb9a52a0f95 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js @@ -55,10 +55,12 @@ let A = (() => { }; __setFunctionName(_classThis, "A"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _b_decorators = [dec(_outerThis)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return A = _classThis; @@ -87,9 +89,11 @@ let B = (() => { _b = (_b_decorators = [dec(this)], f(this)); __setFunctionName(_classThis_1, "B"); (() => { - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); B = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return B = _classThis_1; @@ -115,10 +119,12 @@ let C = (() => { _a = new WeakMap(); __setFunctionName(_classThis_2, "C"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _b_decorators = [dec(_outerThis_1, (x) => __classPrivateFieldGet(x, _a, "f"))]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers_2); - __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name }, null, _classExtraInitializers_2); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_2); + __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name, metadata: metadata }, null, _classExtraInitializers_2); C = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); })(); return C = _classThis_2; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js index 4f67275e1af28..f7bb9a52a0f95 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js @@ -55,10 +55,12 @@ let A = (() => { }; __setFunctionName(_classThis, "A"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _b_decorators = [dec(_outerThis)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return A = _classThis; @@ -87,9 +89,11 @@ let B = (() => { _b = (_b_decorators = [dec(this)], f(this)); __setFunctionName(_classThis_1, "B"); (() => { - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); B = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return B = _classThis_1; @@ -115,10 +119,12 @@ let C = (() => { _a = new WeakMap(); __setFunctionName(_classThis_2, "C"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _b_decorators = [dec(_outerThis_1, (x) => __classPrivateFieldGet(x, _a, "f"))]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers_2); - __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name }, null, _classExtraInitializers_2); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_2); + __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name, metadata: metadata }, null, _classExtraInitializers_2); C = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); })(); return C = _classThis_2; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js index e23eb5b111f45..2dec607617f98 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js @@ -50,10 +50,12 @@ let A = (() => { let _b_initializers = []; var A = class { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _b_decorators = [dec(_outerThis)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } b = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _b_initializers, 2)); @@ -72,9 +74,11 @@ let B = (() => { let _b_initializers = []; var B = class { static { - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); B = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } // @ts-ignore @@ -98,10 +102,12 @@ let C = (() => { let _b_initializers = []; var C = class { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _b_decorators = [dec(_outerThis_1, (x) => x.#a)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } } }, _b_initializers, _instanceExtraInitializers_2); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_2); + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); C = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } #a = (__runInitializers(this, _instanceExtraInitializers_2), 1); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js index ebaf64770e7a2..dc75c1138fbd3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js @@ -24,8 +24,10 @@ let C = (() => { } }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak } }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js index e0f97f0df78e2..e7f789b7d58b3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js @@ -29,8 +29,10 @@ let C = (() => { } }, (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak } }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js index ffbe26789cc5e..7a1515f4d741f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js @@ -17,8 +17,10 @@ let C = (() => { let _speak_decorators; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak } }, null, _instanceExtraInitializers); + __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } constructor(message) { this.message = (__runInitializers(this, _instanceExtraInitializers), message); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js index ad0dae9de24ea..7ec5c2fc999ce 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js @@ -17,8 +17,10 @@ let C = (() => { let _speak_decorators; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak } }, null, _instanceExtraInitializers); + __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } message = (__runInitializers(this, _instanceExtraInitializers), void 0); constructor(message) { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js index b00b1ac7f0671..977a9c5d84deb 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js @@ -26,8 +26,10 @@ var C = function () { return C; }()), (function () { + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } } }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js index a798a3d247644..703b69cbcc20a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js @@ -36,8 +36,10 @@ var C = function () { return C; }()), (function () { + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } } }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js index ffbe26789cc5e..7a1515f4d741f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js @@ -17,8 +17,10 @@ let C = (() => { let _speak_decorators; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _speak_decorators = [bound]; - __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak } }, null, _instanceExtraInitializers); + __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } constructor(message) { this.message = (__runInitializers(this, _instanceExtraInitializers), message); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js index 7702afec3b08f..7de5d12b20b56 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js @@ -33,8 +33,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -50,8 +52,10 @@ export let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -66,8 +70,10 @@ export default (() => { }; (() => { __setFunctionName(_classThis, "default"); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return default_1 = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js index 09eac0a5b6171..3a9f6ebe99fcb 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js @@ -31,8 +31,10 @@ let C = (() => { let _classThis; var C = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -47,8 +49,10 @@ export let C = (() => { let _classThis; var C = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -63,8 +67,10 @@ export default (() => { var default_1 = class { static { __setFunctionName(this, "default"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js index b574caffd3bbf..313bec5e50b94 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js @@ -39,8 +39,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -62,8 +64,10 @@ var C = exports.C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -84,8 +88,10 @@ var default_1 = function () { }()); (function () { __setFunctionName(_classThis, "default_1"); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return default_1 = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js index ccc18bf4b9b2d..3457f6d5b62d1 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js @@ -18,8 +18,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js index f6d99dc429d73..04516d046b5bb 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js @@ -16,8 +16,10 @@ let C = (() => { let _classThis; var C = class { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js index 6567b6fcdf2a1..99526d976452d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js @@ -22,8 +22,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js index d85f8dacc5cf9..a8db8110bf283 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js @@ -147,6 +147,7 @@ let C = (() => { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; __setFunctionName(_classThis, "C"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -157,18 +158,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); _y = { value: __runInitializers(_classThis, _static_private_y_initializers, 1) }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map index 25a35851e66e1..6285591bb25e9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map @@ -1,6 +1,6 @@ //// [esDecorators-classDeclaration-sourceMap.js.map] -{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;YAgBA,MAAC,kGAAG,CAAC,GAAC;YAIG,yEAAI,CAAC,GAAC;QAqBnB,CAAC;QArCG,MAAM,KAAI,CAAC;QAIX,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;QAIrB,IAAI,CAAC,CAAC,KAAa,IAAI,CAAC;QAQxB,IAAS,CAAC,uEAAK;QAAf,IAAS,CAAC,4EAAK;;;;;;;;;;8BAlBd,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;yBAGH,GAAG,EACH,GAAG;yBAGH,GAAG,EACH,GAAG;6CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;wCAGH,GAAG,EACH,GAAG;wCAGH,GAAG,EACH,GAAG;QAfJ,+DA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BQyxHQUFKLENBQUs7O1FBdkNyQix1REFBQyJ9,ZGVjbGFyZSB2YXIgZGVjOiBhbnk7CgpAZGVjCkBkZWMKY2xhc3MgQyB7CiAgICBAZGVjCiAgICBAZGVjCiAgICBtZXRob2QoKSB7fQoKICAgIEBkZWMKICAgIEBkZWMKICAgIGdldCB4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHNldCB4KHZhbHVlOiBudW1iZXIpIHsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHkgPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIGFjY2Vzc29yIHogPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyAjbWV0aG9kKCkge30KCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgZ2V0ICN4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyBzZXQgI3godmFsdWU6IG51bWJlcikgeyB9CgogICAgQGRlYwogICAgQGRlYwogICAgc3RhdGljICN5ID0gMTsKCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgYWNjZXNzb3IgI3ogPSAxOwp9Cg== +{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;YAgBA,MAAC,kGAAG,CAAC,GAAC;YAIG,yEAAI,CAAC,GAAC;QAqBnB,CAAC;QArCG,MAAM,KAAI,CAAC;QAIX,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;QAIrB,IAAI,CAAC,CAAC,KAAa,IAAI,CAAC;QAQxB,IAAS,CAAC,uEAAK;QAAf,IAAS,CAAC,4EAAK;;;;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IEBkZWMKICAgIGdldCB4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHNldCB4KHZhbHVlOiBudW1iZXIpIHsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHkgPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIGFjY2Vzc29yIHogPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyAjbWV0aG9kKCkge30KCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgZ2V0ICN4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyBzZXQgI3godmFsdWU6IG51bWJlcikgeyB9CgogICAgQGRlYwogICAgQGRlYwogICAgc3RhdGljICN5ID0gMTsKCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgYWNjZXNzb3IgI3ogPSAxOwp9Cg== //// [esDecorators-classDeclaration-sourceMap.d.ts.map] {"version":3,"file":"esDecorators-classDeclaration-sourceMap.d.ts","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC;AAErB,cAEM,CAAC;;IAGH,MAAM;IAEN,IAEI,CAAC,IAIQ,MAAM,CAJE;IAErB,IAEI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAIxB,CAAC,SAAK;IAIN,QAAQ,CAAC,CAAC,SAAK;CAqBlB"} diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt index 8598ca0a5dc6d..9ac94b3448d21 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt @@ -318,6 +318,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts >>> _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; >>> __setFunctionName(_classThis, "C"); >>> (() => { +>>> const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; >>> _method_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^ @@ -329,10 +330,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1 >Emitted(99, 31) Source(6, 6) + SourceIndex(0) -2 >Emitted(99, 34) Source(6, 9) + SourceIndex(0) -3 >Emitted(99, 36) Source(7, 6) + SourceIndex(0) -4 >Emitted(99, 39) Source(7, 9) + SourceIndex(0) +1 >Emitted(100, 31) Source(6, 6) + SourceIndex(0) +2 >Emitted(100, 34) Source(6, 9) + SourceIndex(0) +3 >Emitted(100, 36) Source(7, 6) + SourceIndex(0) +4 >Emitted(100, 39) Source(7, 9) + SourceIndex(0) --- >>> _get_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -348,10 +349,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(100, 30) Source(10, 6) + SourceIndex(0) -2 >Emitted(100, 33) Source(10, 9) + SourceIndex(0) -3 >Emitted(100, 35) Source(11, 6) + SourceIndex(0) -4 >Emitted(100, 38) Source(11, 9) + SourceIndex(0) +1->Emitted(101, 30) Source(10, 6) + SourceIndex(0) +2 >Emitted(101, 33) Source(10, 9) + SourceIndex(0) +3 >Emitted(101, 35) Source(11, 6) + SourceIndex(0) +4 >Emitted(101, 38) Source(11, 9) + SourceIndex(0) --- >>> _set_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -366,10 +367,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(101, 30) Source(14, 6) + SourceIndex(0) -2 >Emitted(101, 33) Source(14, 9) + SourceIndex(0) -3 >Emitted(101, 35) Source(15, 6) + SourceIndex(0) -4 >Emitted(101, 38) Source(15, 9) + SourceIndex(0) +1->Emitted(102, 30) Source(14, 6) + SourceIndex(0) +2 >Emitted(102, 33) Source(14, 9) + SourceIndex(0) +3 >Emitted(102, 35) Source(15, 6) + SourceIndex(0) +4 >Emitted(102, 38) Source(15, 9) + SourceIndex(0) --- >>> _y_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -385,10 +386,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1 >Emitted(102, 26) Source(18, 6) + SourceIndex(0) -2 >Emitted(102, 29) Source(18, 9) + SourceIndex(0) -3 >Emitted(102, 31) Source(19, 6) + SourceIndex(0) -4 >Emitted(102, 34) Source(19, 9) + SourceIndex(0) +1 >Emitted(103, 26) Source(18, 6) + SourceIndex(0) +2 >Emitted(103, 29) Source(18, 9) + SourceIndex(0) +3 >Emitted(103, 31) Source(19, 6) + SourceIndex(0) +4 >Emitted(103, 34) Source(19, 9) + SourceIndex(0) --- >>> _z_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -404,10 +405,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(103, 26) Source(22, 6) + SourceIndex(0) -2 >Emitted(103, 29) Source(22, 9) + SourceIndex(0) -3 >Emitted(103, 31) Source(23, 6) + SourceIndex(0) -4 >Emitted(103, 34) Source(23, 9) + SourceIndex(0) +1->Emitted(104, 26) Source(22, 6) + SourceIndex(0) +2 >Emitted(104, 29) Source(22, 9) + SourceIndex(0) +3 >Emitted(104, 31) Source(23, 6) + SourceIndex(0) +4 >Emitted(104, 34) Source(23, 9) + SourceIndex(0) --- >>> _static_private_method_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -423,10 +424,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(104, 46) Source(26, 6) + SourceIndex(0) -2 >Emitted(104, 49) Source(26, 9) + SourceIndex(0) -3 >Emitted(104, 51) Source(27, 6) + SourceIndex(0) -4 >Emitted(104, 54) Source(27, 9) + SourceIndex(0) +1->Emitted(105, 46) Source(26, 6) + SourceIndex(0) +2 >Emitted(105, 49) Source(26, 9) + SourceIndex(0) +3 >Emitted(105, 51) Source(27, 6) + SourceIndex(0) +4 >Emitted(105, 54) Source(27, 9) + SourceIndex(0) --- >>> _static_private_get_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -442,10 +443,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(105, 45) Source(30, 6) + SourceIndex(0) -2 >Emitted(105, 48) Source(30, 9) + SourceIndex(0) -3 >Emitted(105, 50) Source(31, 6) + SourceIndex(0) -4 >Emitted(105, 53) Source(31, 9) + SourceIndex(0) +1->Emitted(106, 45) Source(30, 6) + SourceIndex(0) +2 >Emitted(106, 48) Source(30, 9) + SourceIndex(0) +3 >Emitted(106, 50) Source(31, 6) + SourceIndex(0) +4 >Emitted(106, 53) Source(31, 9) + SourceIndex(0) --- >>> _static_private_set_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -460,10 +461,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(106, 45) Source(34, 6) + SourceIndex(0) -2 >Emitted(106, 48) Source(34, 9) + SourceIndex(0) -3 >Emitted(106, 50) Source(35, 6) + SourceIndex(0) -4 >Emitted(106, 53) Source(35, 9) + SourceIndex(0) +1->Emitted(107, 45) Source(34, 6) + SourceIndex(0) +2 >Emitted(107, 48) Source(34, 9) + SourceIndex(0) +3 >Emitted(107, 50) Source(35, 6) + SourceIndex(0) +4 >Emitted(107, 53) Source(35, 9) + SourceIndex(0) --- >>> _static_private_y_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -479,17 +480,17 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1 >Emitted(107, 41) Source(38, 6) + SourceIndex(0) -2 >Emitted(107, 44) Source(38, 9) + SourceIndex(0) -3 >Emitted(107, 46) Source(39, 6) + SourceIndex(0) -4 >Emitted(107, 49) Source(39, 9) + SourceIndex(0) +1 >Emitted(108, 41) Source(38, 6) + SourceIndex(0) +2 >Emitted(108, 44) Source(38, 9) + SourceIndex(0) +3 >Emitted(108, 46) Source(39, 6) + SourceIndex(0) +4 >Emitted(108, 49) Source(39, 9) + SourceIndex(0) --- >>> _static_private_z_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^ 3 > ^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > static #y = 1; > @@ -498,19 +499,19 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(108, 41) Source(42, 6) + SourceIndex(0) -2 >Emitted(108, 44) Source(42, 9) + SourceIndex(0) -3 >Emitted(108, 46) Source(43, 6) + SourceIndex(0) -4 >Emitted(108, 49) Source(43, 9) + SourceIndex(0) +1->Emitted(109, 41) Source(42, 6) + SourceIndex(0) +2 >Emitted(109, 44) Source(42, 9) + SourceIndex(0) +3 >Emitted(109, 46) Source(43, 6) + SourceIndex(0) +4 >Emitted(109, 49) Source(43, 9) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^^^^^^^^^^^^^ 5 > ^ 6 > ^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > 3 > @@ -518,15 +519,15 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 5 > } 6 > 7 > -1->Emitted(109, 9) Source(28, 5) + SourceIndex(0) -2 >Emitted(109, 72) Source(28, 5) + SourceIndex(0) -3 >Emitted(109, 97) Source(28, 5) + SourceIndex(0) -4 >Emitted(109, 111) Source(28, 23) + SourceIndex(0) -5 >Emitted(109, 112) Source(28, 24) + SourceIndex(0) -6 >Emitted(109, 124) Source(28, 24) + SourceIndex(0) -7 >Emitted(109, 396) Source(28, 24) + SourceIndex(0) +1->Emitted(110, 9) Source(28, 5) + SourceIndex(0) +2 >Emitted(110, 72) Source(28, 5) + SourceIndex(0) +3 >Emitted(110, 97) Source(28, 5) + SourceIndex(0) +4 >Emitted(110, 111) Source(28, 23) + SourceIndex(0) +5 >Emitted(110, 112) Source(28, 24) + SourceIndex(0) +6 >Emitted(110, 124) Source(28, 24) + SourceIndex(0) +7 >Emitted(110, 416) Source(28, 24) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -537,8 +538,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 > ^ 9 > ^ 10> ^^^^^^^^^^^^^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^^^^^^^^^^^^^^^^-> +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -554,19 +555,19 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 9 > } 10> 11> -1 >Emitted(110, 9) Source(32, 5) + SourceIndex(0) -2 >Emitted(110, 71) Source(32, 5) + SourceIndex(0) -3 >Emitted(110, 94) Source(32, 5) + SourceIndex(0) -4 >Emitted(110, 108) Source(32, 23) + SourceIndex(0) -5 >Emitted(110, 115) Source(32, 30) + SourceIndex(0) -6 >Emitted(110, 116) Source(32, 31) + SourceIndex(0) -7 >Emitted(110, 117) Source(32, 32) + SourceIndex(0) -8 >Emitted(110, 118) Source(32, 33) + SourceIndex(0) -9 >Emitted(110, 119) Source(32, 34) + SourceIndex(0) -10>Emitted(110, 133) Source(32, 34) + SourceIndex(0) -11>Emitted(110, 394) Source(32, 34) + SourceIndex(0) +1 >Emitted(111, 9) Source(32, 5) + SourceIndex(0) +2 >Emitted(111, 71) Source(32, 5) + SourceIndex(0) +3 >Emitted(111, 94) Source(32, 5) + SourceIndex(0) +4 >Emitted(111, 108) Source(32, 23) + SourceIndex(0) +5 >Emitted(111, 115) Source(32, 30) + SourceIndex(0) +6 >Emitted(111, 116) Source(32, 31) + SourceIndex(0) +7 >Emitted(111, 117) Source(32, 32) + SourceIndex(0) +8 >Emitted(111, 118) Source(32, 33) + SourceIndex(0) +9 >Emitted(111, 119) Source(32, 34) + SourceIndex(0) +10>Emitted(111, 133) Source(32, 34) + SourceIndex(0) +11>Emitted(111, 414) Source(32, 34) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -575,8 +576,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 6 > ^^^^ 7 > ^ 8 > ^^^^^^^^^^^^^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -590,17 +591,17 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 7 > } 8 > 9 > -1->Emitted(111, 9) Source(36, 5) + SourceIndex(0) -2 >Emitted(111, 71) Source(36, 5) + SourceIndex(0) -3 >Emitted(111, 94) Source(36, 5) + SourceIndex(0) -4 >Emitted(111, 104) Source(36, 19) + SourceIndex(0) -5 >Emitted(111, 109) Source(36, 32) + SourceIndex(0) -6 >Emitted(111, 113) Source(36, 36) + SourceIndex(0) -7 >Emitted(111, 114) Source(36, 37) + SourceIndex(0) -8 >Emitted(111, 128) Source(36, 37) + SourceIndex(0) -9 >Emitted(111, 410) Source(36, 37) + SourceIndex(0) +1->Emitted(112, 9) Source(36, 5) + SourceIndex(0) +2 >Emitted(112, 71) Source(36, 5) + SourceIndex(0) +3 >Emitted(112, 94) Source(36, 5) + SourceIndex(0) +4 >Emitted(112, 104) Source(36, 19) + SourceIndex(0) +5 >Emitted(112, 109) Source(36, 32) + SourceIndex(0) +6 >Emitted(112, 113) Source(36, 36) + SourceIndex(0) +7 >Emitted(112, 114) Source(36, 37) + SourceIndex(0) +8 >Emitted(112, 128) Source(36, 37) + SourceIndex(0) +9 >Emitted(112, 430) Source(36, 37) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -610,7 +611,7 @@ sourceF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10> -1->Emitted(112, 9) Source(44, 5) + SourceIndex(0) -2 >Emitted(112, 67) Source(44, 5) + SourceIndex(0) -3 >Emitted(112, 90) Source(44, 5) + SourceIndex(0) -4 >Emitted(112, 186) Source(44, 28) + SourceIndex(0) -5 >Emitted(112, 200) Source(44, 28) + SourceIndex(0) -6 >Emitted(112, 202) Source(44, 5) + SourceIndex(0) -7 >Emitted(112, 225) Source(44, 5) + SourceIndex(0) -8 >Emitted(112, 326) Source(44, 28) + SourceIndex(0) -9 >Emitted(112, 340) Source(44, 28) + SourceIndex(0) -10>Emitted(112, 712) Source(44, 28) + SourceIndex(0) +1->Emitted(113, 9) Source(44, 5) + SourceIndex(0) +2 >Emitted(113, 67) Source(44, 5) + SourceIndex(0) +3 >Emitted(113, 90) Source(44, 5) + SourceIndex(0) +4 >Emitted(113, 186) Source(44, 28) + SourceIndex(0) +5 >Emitted(113, 200) Source(44, 28) + SourceIndex(0) +6 >Emitted(113, 202) Source(44, 5) + SourceIndex(0) +7 >Emitted(113, 225) Source(44, 5) + SourceIndex(0) +8 >Emitted(113, 326) Source(44, 28) + SourceIndex(0) +9 >Emitted(113, 340) Source(44, 28) + SourceIndex(0) +10>Emitted(113, 732) Source(44, 28) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > method 4 > () {} -1 >Emitted(113, 9) Source(8, 5) + SourceIndex(0) -2 >Emitted(113, 180) Source(8, 5) + SourceIndex(0) -3 >Emitted(113, 186) Source(8, 11) + SourceIndex(0) -4 >Emitted(113, 226) Source(8, 16) + SourceIndex(0) +1 >Emitted(114, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(114, 180) Source(8, 5) + SourceIndex(0) +3 >Emitted(114, 186) Source(8, 11) + SourceIndex(0) +4 >Emitted(114, 246) Source(8, 16) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -668,17 +669,17 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > get 3 > x 4 > () { return 1; } -1 >Emitted(114, 9) Source(12, 5) + SourceIndex(0) -2 >Emitted(114, 169) Source(12, 9) + SourceIndex(0) -3 >Emitted(114, 170) Source(12, 10) + SourceIndex(0) -4 >Emitted(114, 210) Source(12, 26) + SourceIndex(0) +1 >Emitted(115, 9) Source(12, 5) + SourceIndex(0) +2 >Emitted(115, 169) Source(12, 9) + SourceIndex(0) +3 >Emitted(115, 170) Source(12, 10) + SourceIndex(0) +4 >Emitted(115, 230) Source(12, 26) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -687,19 +688,19 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > set 3 > x 4 > (value: number) { } -1->Emitted(115, 9) Source(16, 5) + SourceIndex(0) -2 >Emitted(115, 180) Source(16, 9) + SourceIndex(0) -3 >Emitted(115, 181) Source(16, 10) + SourceIndex(0) -4 >Emitted(115, 232) Source(16, 29) + SourceIndex(0) +1->Emitted(116, 9) Source(16, 5) + SourceIndex(0) +2 >Emitted(116, 180) Source(16, 9) + SourceIndex(0) +3 >Emitted(116, 181) Source(16, 10) + SourceIndex(0) +4 >Emitted(116, 252) Source(16, 29) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -714,16 +715,16 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 4 > 5 > z 6 > = 1; -1->Emitted(116, 9) Source(24, 5) + SourceIndex(0) -2 >Emitted(116, 167) Source(24, 14) + SourceIndex(0) -3 >Emitted(116, 168) Source(24, 15) + SourceIndex(0) -4 >Emitted(116, 197) Source(24, 14) + SourceIndex(0) -5 >Emitted(116, 198) Source(24, 15) + SourceIndex(0) -6 >Emitted(116, 260) Source(24, 20) + SourceIndex(0) +1->Emitted(117, 9) Source(24, 5) + SourceIndex(0) +2 >Emitted(117, 167) Source(24, 14) + SourceIndex(0) +3 >Emitted(117, 168) Source(24, 15) + SourceIndex(0) +4 >Emitted(117, 197) Source(24, 14) + SourceIndex(0) +5 >Emitted(117, 198) Source(24, 15) + SourceIndex(0) +6 >Emitted(117, 280) Source(24, 20) + SourceIndex(0) --- ->>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); +>>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); 1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > @dec @@ -742,32 +743,32 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > @dec > 2 > static #y = 1; -1->Emitted(117, 9) Source(40, 5) + SourceIndex(0) -2 >Emitted(117, 391) Source(40, 19) + SourceIndex(0) +1->Emitted(118, 9) Source(40, 5) + SourceIndex(0) +2 >Emitted(118, 411) Source(40, 19) + SourceIndex(0) --- ->>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); +>>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > y 4 > 5 > y 6 > = 1; -1 >Emitted(118, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(118, 158) Source(20, 5) + SourceIndex(0) -3 >Emitted(118, 159) Source(20, 6) + SourceIndex(0) -4 >Emitted(118, 188) Source(20, 5) + SourceIndex(0) -5 >Emitted(118, 189) Source(20, 6) + SourceIndex(0) -6 >Emitted(118, 251) Source(20, 11) + SourceIndex(0) +1 >Emitted(119, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(119, 158) Source(20, 5) + SourceIndex(0) +3 >Emitted(119, 159) Source(20, 6) + SourceIndex(0) +4 >Emitted(119, 188) Source(20, 5) + SourceIndex(0) +5 >Emitted(119, 189) Source(20, 6) + SourceIndex(0) +6 >Emitted(119, 271) Source(20, 11) + SourceIndex(0) --- ->>> __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); +>>> __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > class C { > @dec @@ -810,17 +811,18 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > @dec > static accessor #z = 1; > } -1 >Emitted(119, 9) Source(5, 1) + SourceIndex(0) -2 >Emitted(119, 161) Source(45, 2) + SourceIndex(0) +1 >Emitted(120, 9) Source(5, 1) + SourceIndex(0) +2 >Emitted(120, 181) Source(45, 2) + SourceIndex(0) --- >>> C = _classThis = _classDescriptor.value; +>>> if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); >>> __runInitializers(_classThis, _staticExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > C -1 >Emitted(121, 9) Source(5, 7) + SourceIndex(0) -2 >Emitted(121, 65) Source(5, 8) + SourceIndex(0) +1 >Emitted(123, 9) Source(5, 7) + SourceIndex(0) +2 >Emitted(123, 65) Source(5, 8) + SourceIndex(0) --- >>> })(); >>> _y = { value: __runInitializers(_classThis, _static_private_y_initializers, 1) }; @@ -870,11 +872,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > 1 4 > 5 > = 1; -1 >Emitted(123, 5) Source(40, 12) + SourceIndex(0) -2 >Emitted(123, 81) Source(40, 17) + SourceIndex(0) -3 >Emitted(123, 82) Source(40, 18) + SourceIndex(0) -4 >Emitted(123, 85) Source(40, 14) + SourceIndex(0) -5 >Emitted(123, 86) Source(40, 19) + SourceIndex(0) +1 >Emitted(125, 5) Source(40, 12) + SourceIndex(0) +2 >Emitted(125, 81) Source(40, 17) + SourceIndex(0) +3 >Emitted(125, 82) Source(40, 18) + SourceIndex(0) +4 >Emitted(125, 85) Source(40, 14) + SourceIndex(0) +5 >Emitted(125, 86) Source(40, 19) + SourceIndex(0) --- >>> _z_accessor_storage = { value: __runInitializers(_classThis, _static_private_z_initializers, 1) }; 1->^^^^ @@ -891,11 +893,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > 1 4 > 5 > = 1; -1->Emitted(124, 5) Source(44, 21) + SourceIndex(0) -2 >Emitted(124, 98) Source(44, 26) + SourceIndex(0) -3 >Emitted(124, 99) Source(44, 27) + SourceIndex(0) -4 >Emitted(124, 102) Source(44, 23) + SourceIndex(0) -5 >Emitted(124, 103) Source(44, 28) + SourceIndex(0) +1->Emitted(126, 5) Source(44, 21) + SourceIndex(0) +2 >Emitted(126, 98) Source(44, 26) + SourceIndex(0) +3 >Emitted(126, 99) Source(44, 27) + SourceIndex(0) +4 >Emitted(126, 102) Source(44, 23) + SourceIndex(0) +5 >Emitted(126, 103) Source(44, 28) + SourceIndex(0) --- >>> (() => { >>> __runInitializers(_classThis, _classExtraInitializers); @@ -903,8 +905,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > C -1 >Emitted(126, 9) Source(5, 7) + SourceIndex(0) -2 >Emitted(126, 64) Source(5, 8) + SourceIndex(0) +1 >Emitted(128, 9) Source(5, 7) + SourceIndex(0) +2 >Emitted(128, 64) Source(5, 8) + SourceIndex(0) --- >>> })(); >>> return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js index 9926b4f5bd491..512265b53a5d4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js @@ -132,6 +132,7 @@ let C = (() => { static { __setFunctionName(this, "C"); } static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -142,18 +143,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); } method() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map index 5752ff8d4310a..d58150cb9dc96 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map @@ -1,6 +1,6 @@ //// [esDecorators-classDeclaration-sourceMap.js.map] -{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAEC,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,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BRyxDQUFDLEdBQUM7UUFJTiwrREFBYSxDQUFDLEVBQUM7UUFBZixJQUFTLENBQUMsdUNBQUs7UUFBZixJQUFTLENBQUMsNkNBQUs7O1lBZ0JSLDRFQUFLLENBQUMsR0FBSixDQUFLOzs7WUFJRSw2RkFBSyxDQUFDLEdBQUosQ0FBSzs7O1lBdkNyQix1REFBQyJ9,ZGVjbGFyZSB2YXIgZGVjOiBhbnk7CgpAZGVjCkBkZWMKY2xhc3MgQyB7CiAgICBAZGVjCiAgICBAZGVjCiAgICBtZXRob2QoKSB7fQoKICAgIEBkZWMKICAgIEBkZWMKICAgIGdldCB4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHNldCB4KHZhbHVlOiBudW1iZXIpIHsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHkgPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIGFjY2Vzc29yIHogPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyAjbWV0aG9kKCkge30KCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgZ2V0ICN4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyBzZXQgI3godmFsdWU6IG51bWJlcikgeyB9CgogICAgQGRlYwogICAgQGRlYwogICAgc3RhdGljICN5ID0gMTsKCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgYWNjZXNzb3IgI3ogPSAxOwp9Cg== +{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAEC,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;iCAGH,GAA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B4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHNldCB4KHZhbHVlOiBudW1iZXIpIHsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHkgPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIGFjY2Vzc29yIHogPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyAjbWV0aG9kKCkge30KCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgZ2V0ICN4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyBzZXQgI3godmFsdWU6IG51bWJlcikgeyB9CgogICAgQGRlYwogICAgQGRlYwogICAgc3RhdGljICN5ID0gMTsKCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgYWNjZXNzb3IgI3ogPSAxOwp9Cg== //// [esDecorators-classDeclaration-sourceMap.d.ts.map] {"version":3,"file":"esDecorators-classDeclaration-sourceMap.d.ts","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC;AAErB,cAEM,CAAC;;IAGH,MAAM;IAEN,IAEI,CAAC,IAIQ,MAAM,CAJE;IAErB,IAEI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAIxB,CAAC,SAAK;IAIN,QAAQ,CAAC,CAAC,SAAK;CAqBlB"} diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt index 05acdcfc7879d..653845d7f5904 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt @@ -117,6 +117,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts >>> static { __setFunctionName(this, "C"); } >>> static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } >>> static { +>>> const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; >>> _method_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^ @@ -130,10 +131,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1 >Emitted(84, 35) Source(6, 6) + SourceIndex(0) -2 >Emitted(84, 38) Source(6, 9) + SourceIndex(0) -3 >Emitted(84, 40) Source(7, 6) + SourceIndex(0) -4 >Emitted(84, 43) Source(7, 9) + SourceIndex(0) +1 >Emitted(85, 35) Source(6, 6) + SourceIndex(0) +2 >Emitted(85, 38) Source(6, 9) + SourceIndex(0) +3 >Emitted(85, 40) Source(7, 6) + SourceIndex(0) +4 >Emitted(85, 43) Source(7, 9) + SourceIndex(0) --- >>> _get_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -149,10 +150,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(85, 34) Source(10, 6) + SourceIndex(0) -2 >Emitted(85, 37) Source(10, 9) + SourceIndex(0) -3 >Emitted(85, 39) Source(11, 6) + SourceIndex(0) -4 >Emitted(85, 42) Source(11, 9) + SourceIndex(0) +1->Emitted(86, 34) Source(10, 6) + SourceIndex(0) +2 >Emitted(86, 37) Source(10, 9) + SourceIndex(0) +3 >Emitted(86, 39) Source(11, 6) + SourceIndex(0) +4 >Emitted(86, 42) Source(11, 9) + SourceIndex(0) --- >>> _set_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -167,10 +168,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(86, 34) Source(14, 6) + SourceIndex(0) -2 >Emitted(86, 37) Source(14, 9) + SourceIndex(0) -3 >Emitted(86, 39) Source(15, 6) + SourceIndex(0) -4 >Emitted(86, 42) Source(15, 9) + SourceIndex(0) +1->Emitted(87, 34) Source(14, 6) + SourceIndex(0) +2 >Emitted(87, 37) Source(14, 9) + SourceIndex(0) +3 >Emitted(87, 39) Source(15, 6) + SourceIndex(0) +4 >Emitted(87, 42) Source(15, 9) + SourceIndex(0) --- >>> _y_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -186,10 +187,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1 >Emitted(87, 30) Source(18, 6) + SourceIndex(0) -2 >Emitted(87, 33) Source(18, 9) + SourceIndex(0) -3 >Emitted(87, 35) Source(19, 6) + SourceIndex(0) -4 >Emitted(87, 38) Source(19, 9) + SourceIndex(0) +1 >Emitted(88, 30) Source(18, 6) + SourceIndex(0) +2 >Emitted(88, 33) Source(18, 9) + SourceIndex(0) +3 >Emitted(88, 35) Source(19, 6) + SourceIndex(0) +4 >Emitted(88, 38) Source(19, 9) + SourceIndex(0) --- >>> _z_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -205,10 +206,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(88, 30) Source(22, 6) + SourceIndex(0) -2 >Emitted(88, 33) Source(22, 9) + SourceIndex(0) -3 >Emitted(88, 35) Source(23, 6) + SourceIndex(0) -4 >Emitted(88, 38) Source(23, 9) + SourceIndex(0) +1->Emitted(89, 30) Source(22, 6) + SourceIndex(0) +2 >Emitted(89, 33) Source(22, 9) + SourceIndex(0) +3 >Emitted(89, 35) Source(23, 6) + SourceIndex(0) +4 >Emitted(89, 38) Source(23, 9) + SourceIndex(0) --- >>> _static_private_method_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -224,10 +225,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(89, 50) Source(26, 6) + SourceIndex(0) -2 >Emitted(89, 53) Source(26, 9) + SourceIndex(0) -3 >Emitted(89, 55) Source(27, 6) + SourceIndex(0) -4 >Emitted(89, 58) Source(27, 9) + SourceIndex(0) +1->Emitted(90, 50) Source(26, 6) + SourceIndex(0) +2 >Emitted(90, 53) Source(26, 9) + SourceIndex(0) +3 >Emitted(90, 55) Source(27, 6) + SourceIndex(0) +4 >Emitted(90, 58) Source(27, 9) + SourceIndex(0) --- >>> _static_private_get_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -243,10 +244,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(90, 49) Source(30, 6) + SourceIndex(0) -2 >Emitted(90, 52) Source(30, 9) + SourceIndex(0) -3 >Emitted(90, 54) Source(31, 6) + SourceIndex(0) -4 >Emitted(90, 57) Source(31, 9) + SourceIndex(0) +1->Emitted(91, 49) Source(30, 6) + SourceIndex(0) +2 >Emitted(91, 52) Source(30, 9) + SourceIndex(0) +3 >Emitted(91, 54) Source(31, 6) + SourceIndex(0) +4 >Emitted(91, 57) Source(31, 9) + SourceIndex(0) --- >>> _static_private_set_x_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -261,10 +262,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(91, 49) Source(34, 6) + SourceIndex(0) -2 >Emitted(91, 52) Source(34, 9) + SourceIndex(0) -3 >Emitted(91, 54) Source(35, 6) + SourceIndex(0) -4 >Emitted(91, 57) Source(35, 9) + SourceIndex(0) +1->Emitted(92, 49) Source(34, 6) + SourceIndex(0) +2 >Emitted(92, 52) Source(34, 9) + SourceIndex(0) +3 >Emitted(92, 54) Source(35, 6) + SourceIndex(0) +4 >Emitted(92, 57) Source(35, 9) + SourceIndex(0) --- >>> _static_private_y_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -280,17 +281,17 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1 >Emitted(92, 45) Source(38, 6) + SourceIndex(0) -2 >Emitted(92, 48) Source(38, 9) + SourceIndex(0) -3 >Emitted(92, 50) Source(39, 6) + SourceIndex(0) -4 >Emitted(92, 53) Source(39, 9) + SourceIndex(0) +1 >Emitted(93, 45) Source(38, 6) + SourceIndex(0) +2 >Emitted(93, 48) Source(38, 9) + SourceIndex(0) +3 >Emitted(93, 50) Source(39, 6) + SourceIndex(0) +4 >Emitted(93, 53) Source(39, 9) + SourceIndex(0) --- >>> _static_private_z_decorators = [dec, dec]; 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^ 3 > ^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > static #y = 1; > @@ -299,19 +300,19 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > > @ 4 > dec -1->Emitted(93, 45) Source(42, 6) + SourceIndex(0) -2 >Emitted(93, 48) Source(42, 9) + SourceIndex(0) -3 >Emitted(93, 50) Source(43, 6) + SourceIndex(0) -4 >Emitted(93, 53) Source(43, 9) + SourceIndex(0) +1->Emitted(94, 45) Source(42, 6) + SourceIndex(0) +2 >Emitted(94, 48) Source(42, 9) + SourceIndex(0) +3 >Emitted(94, 50) Source(43, 6) + SourceIndex(0) +4 >Emitted(94, 53) Source(43, 9) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^^^^^^^^^^^^^ 5 > ^ 6 > ^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > 3 > @@ -319,15 +320,15 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 5 > } 6 > 7 > -1->Emitted(94, 13) Source(28, 5) + SourceIndex(0) -2 >Emitted(94, 70) Source(28, 5) + SourceIndex(0) -3 >Emitted(94, 95) Source(28, 5) + SourceIndex(0) -4 >Emitted(94, 109) Source(28, 23) + SourceIndex(0) -5 >Emitted(94, 110) Source(28, 24) + SourceIndex(0) -6 >Emitted(94, 122) Source(28, 24) + SourceIndex(0) -7 >Emitted(94, 394) Source(28, 24) + SourceIndex(0) +1->Emitted(95, 13) Source(28, 5) + SourceIndex(0) +2 >Emitted(95, 70) Source(28, 5) + SourceIndex(0) +3 >Emitted(95, 95) Source(28, 5) + SourceIndex(0) +4 >Emitted(95, 109) Source(28, 23) + SourceIndex(0) +5 >Emitted(95, 110) Source(28, 24) + SourceIndex(0) +6 >Emitted(95, 122) Source(28, 24) + SourceIndex(0) +7 >Emitted(95, 414) Source(28, 24) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -338,8 +339,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 > ^ 9 > ^ 10> ^^^^^^^^^^^^^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^^^^^^^^^^^^^^^^-> +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -355,19 +356,19 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 9 > } 10> 11> -1 >Emitted(95, 13) Source(32, 5) + SourceIndex(0) -2 >Emitted(95, 69) Source(32, 5) + SourceIndex(0) -3 >Emitted(95, 92) Source(32, 5) + SourceIndex(0) -4 >Emitted(95, 106) Source(32, 23) + SourceIndex(0) -5 >Emitted(95, 113) Source(32, 30) + SourceIndex(0) -6 >Emitted(95, 114) Source(32, 31) + SourceIndex(0) -7 >Emitted(95, 115) Source(32, 32) + SourceIndex(0) -8 >Emitted(95, 116) Source(32, 33) + SourceIndex(0) -9 >Emitted(95, 117) Source(32, 34) + SourceIndex(0) -10>Emitted(95, 131) Source(32, 34) + SourceIndex(0) -11>Emitted(95, 392) Source(32, 34) + SourceIndex(0) +1 >Emitted(96, 13) Source(32, 5) + SourceIndex(0) +2 >Emitted(96, 69) Source(32, 5) + SourceIndex(0) +3 >Emitted(96, 92) Source(32, 5) + SourceIndex(0) +4 >Emitted(96, 106) Source(32, 23) + SourceIndex(0) +5 >Emitted(96, 113) Source(32, 30) + SourceIndex(0) +6 >Emitted(96, 114) Source(32, 31) + SourceIndex(0) +7 >Emitted(96, 115) Source(32, 32) + SourceIndex(0) +8 >Emitted(96, 116) Source(32, 33) + SourceIndex(0) +9 >Emitted(96, 117) Source(32, 34) + SourceIndex(0) +10>Emitted(96, 131) Source(32, 34) + SourceIndex(0) +11>Emitted(96, 412) Source(32, 34) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -376,8 +377,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 6 > ^^^^ 7 > ^ 8 > ^^^^^^^^^^^^^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -391,17 +392,17 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 7 > } 8 > 9 > -1->Emitted(96, 13) Source(36, 5) + SourceIndex(0) -2 >Emitted(96, 69) Source(36, 5) + SourceIndex(0) -3 >Emitted(96, 92) Source(36, 5) + SourceIndex(0) -4 >Emitted(96, 102) Source(36, 19) + SourceIndex(0) -5 >Emitted(96, 107) Source(36, 32) + SourceIndex(0) -6 >Emitted(96, 111) Source(36, 36) + SourceIndex(0) -7 >Emitted(96, 112) Source(36, 37) + SourceIndex(0) -8 >Emitted(96, 126) Source(36, 37) + SourceIndex(0) -9 >Emitted(96, 408) Source(36, 37) + SourceIndex(0) +1->Emitted(97, 13) Source(36, 5) + SourceIndex(0) +2 >Emitted(97, 69) Source(36, 5) + SourceIndex(0) +3 >Emitted(97, 92) Source(36, 5) + SourceIndex(0) +4 >Emitted(97, 102) Source(36, 19) + SourceIndex(0) +5 >Emitted(97, 107) Source(36, 32) + SourceIndex(0) +6 >Emitted(97, 111) Source(36, 36) + SourceIndex(0) +7 >Emitted(97, 112) Source(36, 37) + SourceIndex(0) +8 >Emitted(97, 126) Source(36, 37) + SourceIndex(0) +9 >Emitted(97, 428) Source(36, 37) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^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 1-> > > @dec @@ -430,37 +431,37 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 > static accessor #z = 1; 9 > 10> -1->Emitted(97, 13) Source(44, 5) + SourceIndex(0) -2 >Emitted(97, 65) Source(44, 5) + SourceIndex(0) -3 >Emitted(97, 88) Source(44, 5) + SourceIndex(0) -4 >Emitted(97, 178) Source(44, 28) + SourceIndex(0) -5 >Emitted(97, 192) Source(44, 28) + SourceIndex(0) -6 >Emitted(97, 194) Source(44, 5) + SourceIndex(0) -7 >Emitted(97, 217) Source(44, 5) + SourceIndex(0) -8 >Emitted(97, 312) Source(44, 28) + SourceIndex(0) -9 >Emitted(97, 326) Source(44, 28) + SourceIndex(0) -10>Emitted(97, 698) Source(44, 28) + SourceIndex(0) +1->Emitted(98, 13) Source(44, 5) + SourceIndex(0) +2 >Emitted(98, 65) Source(44, 5) + SourceIndex(0) +3 >Emitted(98, 88) Source(44, 5) + SourceIndex(0) +4 >Emitted(98, 178) Source(44, 28) + SourceIndex(0) +5 >Emitted(98, 192) Source(44, 28) + SourceIndex(0) +6 >Emitted(98, 194) Source(44, 5) + SourceIndex(0) +7 >Emitted(98, 217) Source(44, 5) + SourceIndex(0) +8 >Emitted(98, 312) Source(44, 28) + SourceIndex(0) +9 >Emitted(98, 326) Source(44, 28) + SourceIndex(0) +10>Emitted(98, 718) Source(44, 28) + SourceIndex(0) --- ->>> __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); +>>> __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > method 4 > () {} -1 >Emitted(98, 13) Source(8, 5) + SourceIndex(0) -2 >Emitted(98, 178) Source(8, 5) + SourceIndex(0) -3 >Emitted(98, 184) Source(8, 11) + SourceIndex(0) -4 >Emitted(98, 224) Source(8, 16) + SourceIndex(0) +1 >Emitted(99, 13) Source(8, 5) + SourceIndex(0) +2 >Emitted(99, 178) Source(8, 5) + SourceIndex(0) +3 >Emitted(99, 184) Source(8, 11) + SourceIndex(0) +4 >Emitted(99, 244) Source(8, 16) + SourceIndex(0) --- ->>> __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); +>>> __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -469,17 +470,17 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > get 3 > x 4 > () { return 1; } -1 >Emitted(99, 13) Source(12, 5) + SourceIndex(0) -2 >Emitted(99, 167) Source(12, 9) + SourceIndex(0) -3 >Emitted(99, 168) Source(12, 10) + SourceIndex(0) -4 >Emitted(99, 208) Source(12, 26) + SourceIndex(0) +1 >Emitted(100, 13) Source(12, 5) + SourceIndex(0) +2 >Emitted(100, 167) Source(12, 9) + SourceIndex(0) +3 >Emitted(100, 168) Source(12, 10) + SourceIndex(0) +4 >Emitted(100, 228) Source(12, 26) + SourceIndex(0) --- ->>> __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); +>>> __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -488,19 +489,19 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > set 3 > x 4 > (value: number) { } -1->Emitted(100, 13) Source(16, 5) + SourceIndex(0) -2 >Emitted(100, 178) Source(16, 9) + SourceIndex(0) -3 >Emitted(100, 179) Source(16, 10) + SourceIndex(0) -4 >Emitted(100, 230) Source(16, 29) + SourceIndex(0) +1->Emitted(101, 13) Source(16, 5) + SourceIndex(0) +2 >Emitted(101, 178) Source(16, 9) + SourceIndex(0) +3 >Emitted(101, 179) Source(16, 10) + SourceIndex(0) +4 >Emitted(101, 250) Source(16, 29) + SourceIndex(0) --- ->>> __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); +>>> __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -515,16 +516,16 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 4 > 5 > z 6 > = 1; -1->Emitted(101, 13) Source(24, 5) + SourceIndex(0) -2 >Emitted(101, 165) Source(24, 14) + SourceIndex(0) -3 >Emitted(101, 166) Source(24, 15) + SourceIndex(0) -4 >Emitted(101, 195) Source(24, 14) + SourceIndex(0) -5 >Emitted(101, 196) Source(24, 15) + SourceIndex(0) -6 >Emitted(101, 258) Source(24, 20) + SourceIndex(0) +1->Emitted(102, 13) Source(24, 5) + SourceIndex(0) +2 >Emitted(102, 165) Source(24, 14) + SourceIndex(0) +3 >Emitted(102, 166) Source(24, 15) + SourceIndex(0) +4 >Emitted(102, 195) Source(24, 14) + SourceIndex(0) +5 >Emitted(102, 196) Source(24, 15) + SourceIndex(0) +6 >Emitted(102, 278) Source(24, 20) + SourceIndex(0) --- ->>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); +>>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > @dec @@ -543,32 +544,32 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > @dec > 2 > static #y = 1; -1->Emitted(102, 13) Source(40, 5) + SourceIndex(0) -2 >Emitted(102, 395) Source(40, 19) + SourceIndex(0) +1->Emitted(103, 13) Source(40, 5) + SourceIndex(0) +2 >Emitted(103, 415) Source(40, 19) + SourceIndex(0) --- ->>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); +>>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > y 4 > 5 > y 6 > = 1; -1 >Emitted(103, 13) Source(20, 5) + SourceIndex(0) -2 >Emitted(103, 162) Source(20, 5) + SourceIndex(0) -3 >Emitted(103, 163) Source(20, 6) + SourceIndex(0) -4 >Emitted(103, 192) Source(20, 5) + SourceIndex(0) -5 >Emitted(103, 193) Source(20, 6) + SourceIndex(0) -6 >Emitted(103, 255) Source(20, 11) + SourceIndex(0) +1 >Emitted(104, 13) Source(20, 5) + SourceIndex(0) +2 >Emitted(104, 162) Source(20, 5) + SourceIndex(0) +3 >Emitted(104, 163) Source(20, 6) + SourceIndex(0) +4 >Emitted(104, 192) Source(20, 5) + SourceIndex(0) +5 >Emitted(104, 193) Source(20, 6) + SourceIndex(0) +6 >Emitted(104, 275) Source(20, 11) + SourceIndex(0) --- ->>> __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); +>>> __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); 1 >^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > class C { > @dec @@ -611,17 +612,18 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > @dec > static accessor #z = 1; > } -1 >Emitted(104, 13) Source(5, 1) + SourceIndex(0) -2 >Emitted(104, 153) Source(45, 2) + SourceIndex(0) +1 >Emitted(105, 13) Source(5, 1) + SourceIndex(0) +2 >Emitted(105, 173) Source(45, 2) + SourceIndex(0) --- >>> C = _classThis = _classDescriptor.value; +>>> if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); >>> __runInitializers(_classThis, _staticExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > C -1 >Emitted(106, 13) Source(5, 7) + SourceIndex(0) -2 >Emitted(106, 69) Source(5, 8) + SourceIndex(0) +1 >Emitted(108, 13) Source(5, 7) + SourceIndex(0) +2 >Emitted(108, 69) Source(5, 8) + SourceIndex(0) --- >>> } >>> method() { } @@ -637,10 +639,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > method 3 > () { 4 > } -1 >Emitted(108, 9) Source(8, 5) + SourceIndex(0) -2 >Emitted(108, 15) Source(8, 11) + SourceIndex(0) -3 >Emitted(108, 20) Source(8, 15) + SourceIndex(0) -4 >Emitted(108, 21) Source(8, 16) + SourceIndex(0) +1 >Emitted(110, 9) Source(8, 5) + SourceIndex(0) +2 >Emitted(110, 15) Source(8, 11) + SourceIndex(0) +3 >Emitted(110, 20) Source(8, 15) + SourceIndex(0) +4 >Emitted(110, 21) Source(8, 16) + SourceIndex(0) --- >>> get x() { return 1; } 1->^^^^^^^^ @@ -665,15 +667,15 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 7 > ; 8 > 9 > } -1->Emitted(109, 9) Source(12, 5) + SourceIndex(0) -2 >Emitted(109, 13) Source(12, 9) + SourceIndex(0) -3 >Emitted(109, 14) Source(12, 10) + SourceIndex(0) -4 >Emitted(109, 19) Source(12, 15) + SourceIndex(0) -5 >Emitted(109, 26) Source(12, 22) + SourceIndex(0) -6 >Emitted(109, 27) Source(12, 23) + SourceIndex(0) -7 >Emitted(109, 28) Source(12, 24) + SourceIndex(0) -8 >Emitted(109, 29) Source(12, 25) + SourceIndex(0) -9 >Emitted(109, 30) Source(12, 26) + SourceIndex(0) +1->Emitted(111, 9) Source(12, 5) + SourceIndex(0) +2 >Emitted(111, 13) Source(12, 9) + SourceIndex(0) +3 >Emitted(111, 14) Source(12, 10) + SourceIndex(0) +4 >Emitted(111, 19) Source(12, 15) + SourceIndex(0) +5 >Emitted(111, 26) Source(12, 22) + SourceIndex(0) +6 >Emitted(111, 27) Source(12, 23) + SourceIndex(0) +7 >Emitted(111, 28) Source(12, 24) + SourceIndex(0) +8 >Emitted(111, 29) Source(12, 25) + SourceIndex(0) +9 >Emitted(111, 30) Source(12, 26) + SourceIndex(0) --- >>> set x(value) { } 1 >^^^^^^^^ @@ -695,13 +697,13 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 5 > value: number 6 > ) { 7 > } -1 >Emitted(110, 9) Source(16, 5) + SourceIndex(0) -2 >Emitted(110, 13) Source(16, 9) + SourceIndex(0) -3 >Emitted(110, 14) Source(16, 10) + SourceIndex(0) -4 >Emitted(110, 15) Source(16, 11) + SourceIndex(0) -5 >Emitted(110, 20) Source(16, 24) + SourceIndex(0) -6 >Emitted(110, 24) Source(16, 28) + SourceIndex(0) -7 >Emitted(110, 25) Source(16, 29) + SourceIndex(0) +1 >Emitted(112, 9) Source(16, 5) + SourceIndex(0) +2 >Emitted(112, 13) Source(16, 9) + SourceIndex(0) +3 >Emitted(112, 14) Source(16, 10) + SourceIndex(0) +4 >Emitted(112, 15) Source(16, 11) + SourceIndex(0) +5 >Emitted(112, 20) Source(16, 24) + SourceIndex(0) +6 >Emitted(112, 24) Source(16, 28) + SourceIndex(0) +7 >Emitted(112, 25) Source(16, 29) + SourceIndex(0) --- >>> y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, 1)); 1->^^^^^^^^ @@ -718,11 +720,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > = 4 > 1 5 > ; -1->Emitted(111, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(111, 10) Source(20, 6) + SourceIndex(0) -3 >Emitted(111, 108) Source(20, 9) + SourceIndex(0) -4 >Emitted(111, 109) Source(20, 10) + SourceIndex(0) -5 >Emitted(111, 112) Source(20, 11) + SourceIndex(0) +1->Emitted(113, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(113, 10) Source(20, 6) + SourceIndex(0) +3 >Emitted(113, 108) Source(20, 9) + SourceIndex(0) +4 >Emitted(113, 109) Source(20, 10) + SourceIndex(0) +5 >Emitted(113, 112) Source(20, 11) + SourceIndex(0) --- >>> #z_accessor_storage = __runInitializers(this, _z_initializers, 1); 1 >^^^^^^^^ @@ -737,10 +739,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > accessor z = 3 > 1 4 > ; -1 >Emitted(112, 9) Source(24, 5) + SourceIndex(0) -2 >Emitted(112, 72) Source(24, 18) + SourceIndex(0) -3 >Emitted(112, 73) Source(24, 19) + SourceIndex(0) -4 >Emitted(112, 75) Source(24, 20) + SourceIndex(0) +1 >Emitted(114, 9) Source(24, 5) + SourceIndex(0) +2 >Emitted(114, 72) Source(24, 18) + SourceIndex(0) +3 >Emitted(114, 73) Source(24, 19) + SourceIndex(0) +4 >Emitted(114, 75) Source(24, 20) + SourceIndex(0) --- >>> get z() { return this.#z_accessor_storage; } 1 >^^^^^^^^ @@ -752,10 +754,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > accessor 3 > z 4 > = 1; -1 >Emitted(113, 9) Source(24, 5) + SourceIndex(0) -2 >Emitted(113, 13) Source(24, 14) + SourceIndex(0) -3 >Emitted(113, 14) Source(24, 15) + SourceIndex(0) -4 >Emitted(113, 53) Source(24, 20) + SourceIndex(0) +1 >Emitted(115, 9) Source(24, 5) + SourceIndex(0) +2 >Emitted(115, 13) Source(24, 14) + SourceIndex(0) +3 >Emitted(115, 14) Source(24, 15) + SourceIndex(0) +4 >Emitted(115, 53) Source(24, 20) + SourceIndex(0) --- >>> set z(value) { this.#z_accessor_storage = value; } 1->^^^^^^^^ @@ -766,10 +768,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > accessor 3 > z 4 > = 1; -1->Emitted(114, 9) Source(24, 5) + SourceIndex(0) -2 >Emitted(114, 13) Source(24, 14) + SourceIndex(0) -3 >Emitted(114, 14) Source(24, 15) + SourceIndex(0) -4 >Emitted(114, 59) Source(24, 20) + SourceIndex(0) +1->Emitted(116, 9) Source(24, 5) + SourceIndex(0) +2 >Emitted(116, 13) Source(24, 14) + SourceIndex(0) +3 >Emitted(116, 14) Source(24, 15) + SourceIndex(0) +4 >Emitted(116, 59) Source(24, 20) + SourceIndex(0) --- >>> static { >>> _y = { value: __runInitializers(_classThis, _static_private_y_initializers, 1) }; @@ -799,11 +801,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > 1 4 > 5 > = 1; -1 >Emitted(116, 13) Source(40, 12) + SourceIndex(0) -2 >Emitted(116, 89) Source(40, 17) + SourceIndex(0) -3 >Emitted(116, 90) Source(40, 18) + SourceIndex(0) -4 >Emitted(116, 93) Source(40, 14) + SourceIndex(0) -5 >Emitted(116, 94) Source(40, 19) + SourceIndex(0) +1 >Emitted(118, 13) Source(40, 12) + SourceIndex(0) +2 >Emitted(118, 89) Source(40, 17) + SourceIndex(0) +3 >Emitted(118, 90) Source(40, 18) + SourceIndex(0) +4 >Emitted(118, 93) Source(40, 14) + SourceIndex(0) +5 >Emitted(118, 94) Source(40, 19) + SourceIndex(0) --- >>> } >>> static { @@ -822,11 +824,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 > 1 4 > 5 > = 1; -1 >Emitted(119, 13) Source(44, 21) + SourceIndex(0) -2 >Emitted(119, 106) Source(44, 26) + SourceIndex(0) -3 >Emitted(119, 107) Source(44, 27) + SourceIndex(0) -4 >Emitted(119, 110) Source(44, 23) + SourceIndex(0) -5 >Emitted(119, 111) Source(44, 28) + SourceIndex(0) +1 >Emitted(121, 13) Source(44, 21) + SourceIndex(0) +2 >Emitted(121, 106) Source(44, 26) + SourceIndex(0) +3 >Emitted(121, 107) Source(44, 27) + SourceIndex(0) +4 >Emitted(121, 110) Source(44, 23) + SourceIndex(0) +5 >Emitted(121, 111) Source(44, 28) + SourceIndex(0) --- >>> } >>> static { @@ -835,8 +837,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > C -1 >Emitted(122, 13) Source(5, 7) + SourceIndex(0) -2 >Emitted(122, 68) Source(5, 8) + SourceIndex(0) +1 >Emitted(124, 13) Source(5, 7) + SourceIndex(0) +2 >Emitted(124, 68) Source(5, 8) + SourceIndex(0) --- >>> } >>> }; diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js index dfa5dd90a90ad..1f94026e17066 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js @@ -32,8 +32,10 @@ const method = "method"; let _classSuper = Base; var C = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js index e4ea7908a78b2..c3f5930ea5d99 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js @@ -39,8 +39,10 @@ class C3 extends ((() => {}) as any) { }); var C1 = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper, "name", _classThis); @@ -60,8 +62,10 @@ class C3 extends ((() => {}) as any) { let _classSuper_1 = (0, function () { }); var C2 = class extends _classSuper_1 { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper_1, "name", _classThis_1); @@ -81,8 +85,10 @@ class C3 extends ((() => {}) as any) { let _classSuper_2 = (0, (() => { })); var C3 = class extends _classSuper_2 { static { - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { Reflect.get(_classSuper_2, "name", _classThis_2); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js index aa4104c48a88d..f8046a13e3ca3 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js @@ -55,8 +55,10 @@ const x = "x"; let _classSuper = Base; var C = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js index 73aa13f6ee380..ceaf9630126f7 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js @@ -30,8 +30,10 @@ const method = "method"; let _classSuper = Base; var C = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper, "method", _classThis).call(_classThis); static b = Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js index 6e528ea497959..5c035f00444be 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js @@ -59,8 +59,10 @@ const x = "x"; let _classSuper = Base; var C1 = class extends _classSuper { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper, "x", _classThis); static b = (() => { @@ -103,8 +105,10 @@ const x = "x"; let _classSuper_1 = Base; var C2 = class extends _classSuper_1 { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper_1, "x", _classThis_1); static b = (() => { @@ -147,8 +151,10 @@ const x = "x"; let _classSuper_2 = Base; var C3 = class extends _classSuper_2 { static { - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } static a = Reflect.get(_classSuper_2, x, _classThis_2); static b = (() => { diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js index 881208b12d432..7dee3db7850b2 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js @@ -36,8 +36,10 @@ class C extends Base { let _classThis; var C = class extends Base { static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } static m() { super.method(); } diff --git a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js index 3acbc6dbb6e1d..9f54045d09db2 100644 --- a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js @@ -136,6 +136,7 @@ class C { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }, __setFunctionName(_classThis, "C"), (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -146,18 +147,19 @@ class C { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(), /*29*/ diff --git a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js index 16d4e1c12ff32..101aab4418634 100644 --- a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js @@ -115,6 +115,7 @@ class C { var C = (_a = class { static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -125,18 +126,19 @@ class C { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } } }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } } }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } } }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } } }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); } /*5*/ diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js index 50b51a2c16037..0b5ee1892a11f 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js @@ -24,8 +24,10 @@ exports.C = (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js index 197a8d003d7ba..c6e3d19ae5cb0 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js @@ -27,8 +27,10 @@ C &&= (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js index 3f059fb32ab25..332f05c0deeda 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js @@ -27,8 +27,10 @@ C ??= (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js index c5b94a7fee6d5..f0aceb4b5046f 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js @@ -24,8 +24,10 @@ function f(C = (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js index 838ba46d2d42c..e88523252e544 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js @@ -24,8 +24,10 @@ exports.C = (((() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js index d1b27d09603f9..00d8a118653f4 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js @@ -26,8 +26,10 @@ const tslib_1 = require("tslib"); var class_1 = class { static { tslib_1.__setFunctionName(this, _a); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js index 76e9f13ae66a2..516f52356b662 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js @@ -25,8 +25,10 @@ class C { var class_1 = class { static { tslib_1.__setFunctionName(this, "D"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js index e61323d969d00..b065d740b9927 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js @@ -27,8 +27,10 @@ class C { var class_1 = class { static { tslib_1.__setFunctionName(this, _a); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js index 0c3cc126a9c3a..3ca0d0b78a816 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js @@ -28,8 +28,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js index a6ab301b3cdfa..9b4259196fcfe 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js @@ -23,8 +23,10 @@ exports.C = (() => { let _classThis; var C = class { static { - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js index bd13effbc5b9e..375284fb6a791 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js @@ -23,8 +23,10 @@ exports.default = ((() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "default"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js index 1e5e1f8b11b5f..583fa12c3352b 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js @@ -27,8 +27,10 @@ C = (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js index e772afc6a295a..ddbf5cc852285 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js @@ -27,8 +27,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js index 6206e34b9b454..42bcd245a2250 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js @@ -24,8 +24,10 @@ const tslib_1 = require("tslib"); var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js index d428e95b2f5d5..6e3d1cfa1fa54 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js @@ -27,8 +27,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js index e5118d682d071..83f2bac583153 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js @@ -27,8 +27,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js index 12695aac79984..1181a52a25ed4 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js @@ -27,8 +27,10 @@ C ||= (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js index 9a3cb19e24222..b316f6f14f287 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js @@ -42,8 +42,10 @@ x = (() => { var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -56,8 +58,10 @@ x = (() => { return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -72,8 +76,10 @@ x &&= (() => { var class_2 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -86,8 +92,10 @@ x &&= (() => { return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -102,8 +110,10 @@ x ||= (() => { var class_3 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -116,8 +126,10 @@ x ||= (() => { return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_2); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; @@ -132,8 +144,10 @@ x ??= (() => { var class_4 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name }, null, _classExtraInitializers_3); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_3); class_4 = _classThis_3 = _classDescriptor_3.value; + if (metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_3, _classExtraInitializers_3); } }; @@ -146,8 +160,10 @@ x ??= (() => { return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_3); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_3); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_3), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js index 1649959a176ce..f413aab01a0f6 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js @@ -48,8 +48,10 @@ var _a, _b; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -67,8 +69,10 @@ var _a, _b; var class_2 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -86,8 +90,10 @@ var _a, _b; var class_3 = class { static { __setFunctionName(this, "0"); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -105,8 +111,10 @@ var _a, _b; var class_4 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name }, null, _classExtraInitializers_3); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_3); class_4 = _classThis_3 = _classDescriptor_3.value; + if (metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_3, _classExtraInitializers_3); } }; @@ -124,8 +132,10 @@ var _a, _b; var class_5 = class { static { __setFunctionName(this, "0"); - __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name }, null, _classExtraInitializers_4); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_4); class_5 = _classThis_4 = _classDescriptor_4.value; + if (metadata) Object.defineProperty(_classThis_4, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_4, _classExtraInitializers_4); } }; @@ -144,8 +154,10 @@ var _a, _b; var class_6 = class { static { __setFunctionName(this, _a); - __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name }, null, _classExtraInitializers_5); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_5); class_6 = _classThis_5 = _classDescriptor_5.value; + if (metadata) Object.defineProperty(_classThis_5, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_5, _classExtraInitializers_5); } }; @@ -164,8 +176,10 @@ var _a, _b; var class_7 = class { static { __setFunctionName(this, "__proto__"); - __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name }, null, _classExtraInitializers_6); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_6); class_7 = _classThis_6 = _classDescriptor_6.value; + if (metadata) Object.defineProperty(_classThis_6, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_6, _classExtraInitializers_6); } }; @@ -183,8 +197,10 @@ var _a, _b; var class_8 = class { static { __setFunctionName(this, "__proto__"); - __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name }, null, _classExtraInitializers_7); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_7); class_8 = _classThis_7 = _classDescriptor_7.value; + if (metadata) Object.defineProperty(_classThis_7, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_7, _classExtraInitializers_7); } }; @@ -201,8 +217,10 @@ var _a, _b; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -218,8 +236,10 @@ var _a, _b; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -235,8 +255,10 @@ var _a, _b; return class { static { __setFunctionName(this, "0"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_2); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; @@ -252,8 +274,10 @@ var _a, _b; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_3); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_3); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_3), __runInitializers(this, _y_initializers, void 0)); }; @@ -269,8 +293,10 @@ var _a, _b; return class { static { __setFunctionName(this, "0"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_4); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_4); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_4), __runInitializers(this, _y_initializers, void 0)); }; @@ -288,8 +314,10 @@ var _a, _b; var class_9 = class { static { __setFunctionName(this, _b); - __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name }, null, _classExtraInitializers_8); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_8); class_9 = _classThis_8 = _classDescriptor_8.value; + if (metadata) Object.defineProperty(_classThis_8, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_8, _classExtraInitializers_8); } }; @@ -307,8 +335,10 @@ var _a, _b; return class { static { __setFunctionName(this, "__proto__"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_5); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_5); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_5), __runInitializers(this, _y_initializers, void 0)); }; @@ -324,8 +354,10 @@ var _a, _b; return class { static { __setFunctionName(this, "__proto__"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_6); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_6); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_6), __runInitializers(this, _y_initializers, void 0)); }; @@ -340,8 +372,10 @@ var _a, _b; let _static_x_initializers = []; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _static_x_decorators = [dec]; - __esDecorate(null, null, _static_x_decorators, { kind: "field", name: "x", static: true, private: false, access: { has: obj => "x" in obj, get: obj => obj.x, set: (obj, value) => { obj.x = value; } } }, _static_x_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_x_decorators, { kind: "field", name: "x", static: true, private: false, access: { has: obj => "x" in obj, get: obj => obj.x, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, _static_x_initializers, _staticExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(this, _staticExtraInitializers); } static x = __runInitializers(this, _static_x_initializers, (() => { @@ -352,8 +386,10 @@ var _a, _b; var class_10 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_9 = { value: this }, _classDecorators_9, { kind: "class", name: this.name }, null, _classExtraInitializers_9); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_9 = { value: this }, _classDecorators_9, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_9); class_10 = _classThis_9 = _classDescriptor_9.value; + if (metadata) Object.defineProperty(_classThis_9, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_9, _classExtraInitializers_9); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js index 8244d9bb836cd..fd7c9f5703d23 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js @@ -24,8 +24,10 @@ declare let dec: any; var class_1 = class { static { __setFunctionName(this, ""); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -37,8 +39,10 @@ declare let dec: any; let _y_initializers = []; return class { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -51,8 +55,10 @@ declare let dec: any; let _classThis_1; var C = class { static { - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -64,8 +70,10 @@ declare let dec: any; let _y_initializers = []; return class C { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js index 3007f132e6efc..9e8a9fca92b04 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js @@ -46,8 +46,10 @@ let x, f; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -60,8 +62,10 @@ let x, f; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -74,8 +78,10 @@ let x, f; var class_2 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -88,8 +94,10 @@ let x, f; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -102,8 +110,10 @@ let x, f; var class_3 = class { static { __setFunctionName(this, "0"); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -116,8 +126,10 @@ let x, f; return class { static { __setFunctionName(this, "0"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_2); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; @@ -130,8 +142,10 @@ let x, f; var class_4 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name }, null, _classExtraInitializers_3); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_3); class_4 = _classThis_3 = _classDescriptor_3.value; + if (metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_3, _classExtraInitializers_3); } }; @@ -144,8 +158,10 @@ let x, f; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_3); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_3); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_3), __runInitializers(this, _y_initializers, void 0)); }; @@ -158,8 +174,10 @@ let x, f; var class_5 = class { static { __setFunctionName(this, "0"); - __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name }, null, _classExtraInitializers_4); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_4); class_5 = _classThis_4 = _classDescriptor_4.value; + if (metadata) Object.defineProperty(_classThis_4, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_4, _classExtraInitializers_4); } }; @@ -172,8 +190,10 @@ let x, f; return class { static { __setFunctionName(this, "0"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_4); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_4); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_4), __runInitializers(this, _y_initializers, void 0)); }; @@ -186,8 +206,10 @@ let x, f; var class_6 = class { static { __setFunctionName(this, _a); - __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name }, null, _classExtraInitializers_5); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_5); class_6 = _classThis_5 = _classDescriptor_5.value; + if (metadata) Object.defineProperty(_classThis_5, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_5, _classExtraInitializers_5); } }; @@ -200,8 +222,10 @@ let x, f; return class { static { __setFunctionName(this, _b); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_5); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_5); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_5), __runInitializers(this, _y_initializers, void 0)); }; @@ -215,8 +239,10 @@ let x, f; var class_7 = class { static { __setFunctionName(this, ""); - __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name }, null, _classExtraInitializers_6); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_6); class_7 = _classThis_6 = _classDescriptor_6.value; + if (metadata) Object.defineProperty(_classThis_6, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_6, _classExtraInitializers_6); } }; @@ -230,8 +256,10 @@ let x, f; var class_8 = class { static { __setFunctionName(this, ""); - __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name }, null, _classExtraInitializers_7); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_7); class_8 = _classThis_7 = _classDescriptor_7.value; + if (metadata) Object.defineProperty(_classThis_7, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_7, _classExtraInitializers_7); } }; @@ -246,8 +274,10 @@ let x, f; var class_9 = class { static { __setFunctionName(this, "__proto__"); - __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name }, null, _classExtraInitializers_8); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_8); class_9 = _classThis_8 = _classDescriptor_8.value; + if (metadata) Object.defineProperty(_classThis_8, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_8, _classExtraInitializers_8); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js index 35ae75922d9b5..d6a1d0a0683b7 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js @@ -31,8 +31,10 @@ declare let dec: any; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -47,8 +49,10 @@ declare let dec: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -63,8 +67,10 @@ declare let dec: any; var class_2 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -79,8 +85,10 @@ declare let dec: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -97,8 +105,10 @@ declare let dec: any; var class_3 = class { static { __setFunctionName(this, "x2"); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -113,8 +123,10 @@ declare let dec: any; return class { static { __setFunctionName(this, "x1"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_2); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js index f55622075d03b..9720bf371664e 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js @@ -32,8 +32,10 @@ declare let dec: any, obj: any; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -48,8 +50,10 @@ declare let dec: any, obj: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -66,8 +70,10 @@ declare let dec: any, obj: any; var class_2 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -82,8 +88,10 @@ declare let dec: any, obj: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -98,8 +106,10 @@ declare let dec: any, obj: any; var class_3 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name }, null, _classExtraInitializers_2); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; + if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -114,8 +124,10 @@ declare let dec: any, obj: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_2); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js index b36091aebe25c..612e23c68127a 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js @@ -21,8 +21,10 @@ declare let dec: any, obj: any, x: any; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -35,8 +37,10 @@ declare let dec: any, obj: any, x: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js index c345b7badcee3..ca6fada385d2c 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js @@ -21,8 +21,10 @@ declare let dec: any, obj: any, x: any; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -35,8 +37,10 @@ declare let dec: any, obj: any, x: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js index de766d9a1d996..b825a1f398ef0 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js @@ -21,8 +21,10 @@ declare let dec: any, obj: any, x: any; var class_1 = class { static { __setFunctionName(this, "x"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -35,8 +37,10 @@ declare let dec: any, obj: any, x: any; return class { static { __setFunctionName(this, "x"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js index 8f2a6b536ff2e..9737c3cbef744 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js @@ -27,8 +27,10 @@ export default ((() => { var class_1 = class { static { __setFunctionName(this, "default"); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -44,8 +46,10 @@ export default ((() => { return class { static { __setFunctionName(this, "default"); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js index 166c601801c7d..2be959f660ce6 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js @@ -20,8 +20,10 @@ module.exports = (() => { var class_1 = class { static { __setFunctionName(this, ""); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -35,8 +37,10 @@ module.exports = (() => { let _y_initializers = []; return class { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js index cc1200fad22b6..bd351874c7ea6 100644 --- a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js +++ b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js @@ -75,20 +75,22 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _static_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); _classThis.y = __runInitializers(_classThis, _static_y_initializers, void 0); @@ -123,20 +125,22 @@ let C = (() => { }, __setFunctionName(_classThis_1, "C"), (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers_1); - __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers_1); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _static_y_initializers, _staticExtraInitializers_1); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers_1); + __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers_1); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _staticExtraInitializers_1); })(), _classThis_1.y = __runInitializers(_classThis_1, _static_y_initializers, void 0), diff --git a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js index fec2864b5b771..4cbb1774157de 100644 --- a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js +++ b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js @@ -66,20 +66,22 @@ let C = (() => { let _y_initializers = []; var C = class { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _static_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); } constructor(x) { } @@ -112,20 +114,22 @@ let C = (() => { let _y_initializers = []; var C = class { static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _staticExtraInitializers_1); - __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _staticExtraInitializers_1); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method } }, null, _instanceExtraInitializers_1); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } } }, null, _instanceExtraInitializers_1); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _static_y_initializers, _staticExtraInitializers_1); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name }, null, _classExtraInitializers_1); + __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers_1); + __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers_1); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers_1); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers_1); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _staticExtraInitializers_1); } constructor(x) { } diff --git a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js index 7ee7ed280e21a..dff88d7bb542f 100644 --- a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js +++ b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js @@ -85,20 +85,22 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } } }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } } }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } } }, null, _instanceExtraInitializers); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } } }, _static_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); _classThis.y = __runInitializers(_classThis, _static_y_initializers, void 0); @@ -142,20 +144,22 @@ var C = function () { }()), __setFunctionName(_classThis_1, "C"), (function () { + var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } } }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } } }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } } }, null, _instanceExtraInitializers_1); - __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } } }, null, _instanceExtraInitializers_1); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } } }, _static_y_initializers, _staticExtraInitializers_1); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } } }, _y_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name }, null, _classExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _instanceExtraInitializers_1); + __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers_1); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis_1, _staticExtraInitializers_1); })(), _classThis_1.y = __runInitializers(_classThis_1, _static_y_initializers, void 0), diff --git a/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js new file mode 100644 index 0000000000000..416decc4dafef --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js @@ -0,0 +1,94 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() { } +} + +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; +function meta(key, value) { + return (_, context) => { + context.metadata[key] = value; + }; +} +let C = (() => { + let _classDecorators = [meta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + let _instanceExtraInitializers = []; + let _m_decorators; + var C = _classThis = class { + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; + __setFunctionName(_classThis, "C"); + (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + _m_decorators = [meta('b', 'y')]; + __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +})(); +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' diff --git a/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js new file mode 100644 index 0000000000000..30584eb25a430 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() { } +} + +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +function meta(key, value) { + return (_, context) => { + context.metadata[key] = value; + }; +} +let C = (() => { + let _classDecorators = [meta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + let _instanceExtraInitializers = []; + let _m_decorators; + var C = class { + static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + _m_decorators = [meta('b', 'y')]; + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + } + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; + return C = _classThis; +})(); +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js new file mode 100644 index 0000000000000..7c379259cec06 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js @@ -0,0 +1,123 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() {} +} + +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' + +class D extends C { + @meta('b', 'z') + m() {} +} + +D[Symbol.metadata].a; // 'x' +D[Symbol.metadata].b; // 'z' + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; +function meta(key, value) { + return (_, context) => { + context.metadata[key] = value; + }; +} +let C = (() => { + let _classDecorators = [meta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + let _instanceExtraInitializers = []; + let _m_decorators; + var C = _classThis = class { + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; + __setFunctionName(_classThis, "C"); + (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + _m_decorators = [meta('b', 'y')]; + __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +})(); +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' +let D = (() => { + var _a; + let _instanceExtraInitializers_1 = []; + let _m_decorators; + return _a = class D extends C { + m() { } + constructor() { + super(...arguments); + __runInitializers(this, _instanceExtraInitializers_1); + } + }, + (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_a[Symbol.metadata]) : undefined; + _m_decorators = [meta('b', 'z')]; + __esDecorate(_a, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + })(), + _a; +})(); +D[Symbol.metadata].a; // 'x' +D[Symbol.metadata].b; // 'z' diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js new file mode 100644 index 0000000000000..ed96be3e99444 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js @@ -0,0 +1,116 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() {} +} + +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' + +class D extends C { + @meta('b', 'z') + m() {} +} + +D[Symbol.metadata].a; // 'x' +D[Symbol.metadata].b; // 'z' + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +function meta(key, value) { + return (_, context) => { + context.metadata[key] = value; + }; +} +let C = (() => { + let _classDecorators = [meta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + let _instanceExtraInitializers = []; + let _m_decorators; + var C = class { + static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + _m_decorators = [meta('b', 'y')]; + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + } + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; + return C = _classThis; +})(); +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' +let D = (() => { + let _instanceExtraInitializers_1 = []; + let _m_decorators; + return class D extends C { + static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + _m_decorators = [meta('b', 'z')]; + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers_1); + if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + } + m() { } + constructor() { + super(...arguments); + __runInitializers(this, _instanceExtraInitializers_1); + } + }; +})(); +D[Symbol.metadata].a; // 'x' +D[Symbol.metadata].b; // 'z' diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js new file mode 100644 index 0000000000000..3caeb5d7debb6 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js @@ -0,0 +1,106 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +function appendMeta(key: string, value: string) { + return (_, context) => { + const existing = context.metadata[key] ?? []; + context.metadata[key] = [...existing, value]; + }; +} + +@appendMeta('a', 'x') +class C { } + +@appendMeta('a', 'z') +class D extends C { } + +C[Symbol.metadata].a; // ['x'] +D[Symbol.metadata].a; // ['x', 'z'] + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; +function appendMeta(key, value) { + return (_, context) => { + var _a; + const existing = (_a = context.metadata[key]) !== null && _a !== void 0 ? _a : []; + context.metadata[key] = [...existing, value]; + }; +} +let C = (() => { + let _classDecorators = [appendMeta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + var C = _classThis = class { + }; + __setFunctionName(_classThis, "C"); + (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +})(); +let D = (() => { + let _classDecorators_1 = [appendMeta('a', 'z')]; + let _classDescriptor_1; + let _classExtraInitializers_1 = []; + let _classThis_1; + var D = _classThis_1 = class extends C { + }; + __setFunctionName(_classThis_1, "D"); + (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classThis_1[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + D = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis_1, _classExtraInitializers_1); + })(); + return D = _classThis_1; +})(); +C[Symbol.metadata].a; // ['x'] +D[Symbol.metadata].a; // ['x', 'z'] diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js new file mode 100644 index 0000000000000..5c2aa27dd6928 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js @@ -0,0 +1,99 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +function appendMeta(key: string, value: string) { + return (_, context) => { + const existing = context.metadata[key] ?? []; + context.metadata[key] = [...existing, value]; + }; +} + +@appendMeta('a', 'x') +class C { } + +@appendMeta('a', 'z') +class D extends C { } + +C[Symbol.metadata].a; // ['x'] +D[Symbol.metadata].a; // ['x', 'z'] + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +function appendMeta(key, value) { + return (_, context) => { + const existing = context.metadata[key] ?? []; + context.metadata[key] = [...existing, value]; + }; +} +let C = (() => { + let _classDecorators = [appendMeta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + var C = class { + static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + } + }; + return C = _classThis; +})(); +let D = (() => { + let _classDecorators_1 = [appendMeta('a', 'z')]; + let _classDescriptor_1; + let _classExtraInitializers_1 = []; + let _classThis_1; + var D = class extends C { + static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + D = _classThis_1 = _classDescriptor_1.value; + if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis_1, _classExtraInitializers_1); + } + }; + return D = _classThis_1; +})(); +C[Symbol.metadata].a; // ['x'] +D[Symbol.metadata].a; // ['x', 'z'] diff --git a/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js new file mode 100644 index 0000000000000..1f533009eb46c --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js @@ -0,0 +1,109 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +const PRIVATE_METADATA = new WeakMap(); + +function meta(key: string, value: string) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + + metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() { } +} + +PRIVATE_METADATA.get(C[Symbol.metadata]).a; // 'x' +PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +}; +const PRIVATE_METADATA = new WeakMap(); +function meta(key, value) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + metadata[key] = value; + }; +} +let C = (() => { + let _classDecorators = [meta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + let _instanceExtraInitializers = []; + let _m_decorators; + var C = _classThis = class { + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; + __setFunctionName(_classThis, "C"); + (() => { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + _m_decorators = [meta('b', 'y')]; + __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +})(); +PRIVATE_METADATA.get(C[Symbol.metadata]).a; // 'x' +PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' diff --git a/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js new file mode 100644 index 0000000000000..9e70c2f7ece58 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js @@ -0,0 +1,104 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts] //// + +//// [foo.ts] +interface SymbolConstructor { + readonly metadata: string; +} + +const PRIVATE_METADATA = new WeakMap(); + +function meta(key: string, value: string) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + + metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() { } +} + +PRIVATE_METADATA.get(C[Symbol.metadata]).a; // 'x' +PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +const PRIVATE_METADATA = new WeakMap(); +function meta(key, value) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + metadata[key] = value; + }; +} +let C = (() => { + let _classDecorators = [meta('a', 'x')]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + let _instanceExtraInitializers = []; + let _m_decorators; + var C = class { + static { + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + _m_decorators = [meta('b', 'y')]; + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __runInitializers(_classThis, _classExtraInitializers); + } + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; + return C = _classThis; +})(); +PRIVATE_METADATA.get(C[Symbol.metadata]).a; // 'x' +PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js index cc323419fa41d..f456523263b11 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js @@ -128,8 +128,10 @@ export let A = (() => { }; __setFunctionName(_classThis, "A"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; + if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return A = _classThis; diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts new file mode 100644 index 0000000000000..c92124543a8cf --- /dev/null +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts @@ -0,0 +1,22 @@ +// @target: es2022,es2015 +// @noTypesAndSymbols: true +// @filename: /foo.ts + +interface SymbolConstructor { + readonly metadata: string; +} + +function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() { } +} + +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts new file mode 100644 index 0000000000000..7269d0c1b3991 --- /dev/null +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts @@ -0,0 +1,30 @@ +// @target: es2022,es2015 +// @noTypesAndSymbols: true +// @filename: /foo.ts + +interface SymbolConstructor { + readonly metadata: string; +} + +function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() {} +} + +C[Symbol.metadata].a; // 'x' +C[Symbol.metadata].b; // 'y' + +class D extends C { + @meta('b', 'z') + m() {} +} + +D[Symbol.metadata].a; // 'x' +D[Symbol.metadata].b; // 'z' diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts new file mode 100644 index 0000000000000..7e973d4ea08e7 --- /dev/null +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts @@ -0,0 +1,23 @@ +// @target: es2022,es2015 +// @noTypesAndSymbols: true +// @filename: /foo.ts + +interface SymbolConstructor { + readonly metadata: string; +} + +function appendMeta(key: string, value: string) { + return (_, context) => { + const existing = context.metadata[key] ?? []; + context.metadata[key] = [...existing, value]; + }; +} + +@appendMeta('a', 'x') +class C { } + +@appendMeta('a', 'z') +class D extends C { } + +C[Symbol.metadata].a; // ['x'] +D[Symbol.metadata].a; // ['x', 'z'] diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts new file mode 100644 index 0000000000000..308e392b8f80d --- /dev/null +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts @@ -0,0 +1,31 @@ +// @target: es2022,es2015 +// @noTypesAndSymbols: true +// @filename: /foo.ts + +interface SymbolConstructor { + readonly metadata: string; +} + +const PRIVATE_METADATA = new WeakMap(); + +function meta(key: string, value: string) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + + metadata[key] = value; + }; +} + +@meta('a', 'x') +class C { + @meta('b', 'y') + m() { } +} + +PRIVATE_METADATA.get(C[Symbol.metadata]).a; // 'x' +PRIVATE_METADATA.get(C[Symbol.metadata]).b; // 'y' From 25b367682d3589da30f980f6a068c915138b385d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Jun 2023 00:58:05 +0300 Subject: [PATCH 02/11] use _metadata name for metadata ref. use existing factory helpers. add esnext.decorators.d.ts lib --- src/compiler/commandLineParser.ts | 1 + src/compiler/factory/emitHelpers.ts | 9 +- src/compiler/transformers/classFields.ts | 9 +- src/compiler/transformers/esDecorators.ts | 40 +++---- src/lib/decorators.d.ts | 7 ++ src/lib/esnext.d.ts | 1 + src/lib/libs.json | 1 + .../Parse --lib option with extra comma.js | 2 +- ... --lib option with trailing white-space.js | 2 +- .../Parse invalid option of library flags.js | 2 +- ...array to compiler-options with json api.js | 2 +- ...ompiler-options with jsonSourceFile api.js | 2 +- ... libs to compiler-options with json api.js | 2 +- ...ompiler-options with jsonSourceFile api.js | 2 +- ... libs to compiler-options with json api.js | 2 +- ...ompiler-options with jsonSourceFile api.js | 2 +- ... libs to compiler-options with json api.js | 2 +- ...ompiler-options with jsonSourceFile api.js | 2 +- ...tion-accessors-nonStatic(target=es2015).js | 16 +-- ...tion-accessors-nonStatic(target=es2022).js | 16 +-- ...aration-accessors-nonStatic(target=es5).js | 16 +-- ...cessors-nonStaticPrivate(target=es2015).js | 8 +- ...cessors-nonStaticPrivate(target=es2022).js | 8 +- ...aration-accessors-static(target=es2015).js | 16 +-- ...aration-accessors-static(target=es2022).js | 16 +-- ...eclaration-accessors-static(target=es5).js | 16 +-- ...-accessors-staticPrivate(target=es2015).js | 14 +-- ...-accessors-staticPrivate(target=es2022).js | 14 +-- ...ecorators-classDeclaration-classSuper.1.js | 6 +- ...ecorators-classDeclaration-classSuper.2.js | 18 +-- ...ecorators-classDeclaration-classSuper.3.js | 6 +- ...ecorators-classDeclaration-classSuper.4.js | 6 +- ...ecorators-classDeclaration-classSuper.5.js | 18 +-- ...ecorators-classDeclaration-classSuper.6.js | 6 +- ...ecorators-classDeclaration-classSuper.7.js | 18 +-- ...ation-classThisReference(target=es2015).js | 6 +- ...ation-classThisReference(target=es2022).js | 6 +- ...classDeclaration-classThisReference.es5.js | 6 +- ...ervation(module=commonjs,target=es2015).js | 50 ++++---- ...ervation(module=commonjs,target=es2022).js | 50 ++++---- ...eservation(module=esnext,target=es2015).js | 50 ++++---- ...eservation(module=esnext,target=es2022).js | 50 ++++---- ...eclaration-commonjs-classNamespaceMerge.js | 6 +- .../esDecorators-classDeclaration-commonjs.js | 6 +- ...t=es2015,usedefineforclassfields=false).js | 10 +- ...et=es2015,usedefineforclassfields=true).js | 10 +- ...t=es2022,usedefineforclassfields=false).js | 10 +- ...et=es2022,usedefineforclassfields=true).js | 10 +- ...rget=es5,usedefineforclassfields=false).js | 10 +- ...arget=es5,usedefineforclassfields=true).js | 10 +- ...t=esnext,usedefineforclassfields=false).js | 10 +- ...fields-nonStaticAccessor(target=es2015).js | 10 +- ...fields-nonStaticAccessor(target=es2022).js | 10 +- ...-fields-nonStaticPrivate(target=es2015).js | 6 +- ...-fields-nonStaticPrivate(target=es2022).js | 6 +- ...nonStaticPrivateAccessor(target=es2015).js | 6 +- ...nonStaticPrivateAccessor(target=es2022).js | 6 +- ...t=es2015,usedefineforclassfields=false).js | 10 +- ...et=es2015,usedefineforclassfields=true).js | 10 +- ...t=es2022,usedefineforclassfields=false).js | 10 +- ...et=es2022,usedefineforclassfields=true).js | 10 +- ...rget=es5,usedefineforclassfields=false).js | 10 +- ...arget=es5,usedefineforclassfields=true).js | 10 +- ...t=esnext,usedefineforclassfields=false).js | 10 +- ...on-fields-staticAccessor(target=es2015).js | 16 +-- ...on-fields-staticAccessor(target=es2022).js | 16 +-- ...ion-fields-staticPrivate(target=es2015).js | 12 +- ...ion-fields-staticPrivate(target=es2022).js | 12 +- ...ds-staticPrivateAccessor(target=es2015).js | 12 +- ...ds-staticPrivateAccessor(target=es2022).js | 12 +- ...ration-methods-nonStatic(target=es2015).js | 10 +- ...ration-methods-nonStatic(target=es2022).js | 10 +- ...claration-methods-nonStatic(target=es5).js | 10 +- ...methods-nonStaticPrivate(target=es2015).js | 6 +- ...methods-nonStaticPrivate(target=es2022).js | 6 +- ...claration-methods-static(target=es2015).js | 10 +- ...claration-methods-static(target=es2022).js | 10 +- ...sDeclaration-methods-static(target=es5).js | 10 +- ...on-methods-staticPrivate(target=es2015).js | 12 +- ...on-methods-staticPrivate(target=es2022).js | 12 +- ...ion-missingEmitHelpers-classDecorator.1.js | 6 +- ...ion-missingEmitHelpers-classDecorator.2.js | 6 +- ...ion-missingEmitHelpers-classDecorator.3.js | 6 +- ...mitHelpers-nonStaticPrivateAutoAccessor.js | 6 +- ...issingEmitHelpers-nonStaticPrivateField.js | 6 +- ...ssingEmitHelpers-nonStaticPrivateGetter.js | 6 +- ...ssingEmitHelpers-nonStaticPrivateMethod.js | 6 +- ...ssingEmitHelpers-nonStaticPrivateSetter.js | 6 +- ...gEmitHelpers-staticComputedAutoAccessor.js | 6 +- ...-missingEmitHelpers-staticComputedField.js | 6 +- ...missingEmitHelpers-staticComputedGetter.js | 6 +- ...missingEmitHelpers-staticComputedMethod.js | 6 +- ...missingEmitHelpers-staticComputedSetter.js | 6 +- ...ngEmitHelpers-staticPrivateAutoAccessor.js | 6 +- ...n-missingEmitHelpers-staticPrivateField.js | 6 +- ...-missingEmitHelpers-staticPrivateGetter.js | 6 +- ...-missingEmitHelpers-staticPrivateMethod.js | 6 +- ...-missingEmitHelpers-staticPrivateSetter.js | 6 +- ...ation-multipleDecorators(target=es2015).js | 6 +- ...ation-multipleDecorators(target=es2022).js | 6 +- ...laration-multipleDecorators(target=es5).js | 6 +- ...ation-outerThisReference(target=es2015).js | 24 ++-- ...ation-outerThisReference(target=es2021).js | 24 ++-- ...ation-outerThisReference(target=es2022).js | 24 ++-- ...t=es2015,usedefineforclassfields=false).js | 6 +- ...et=es2015,usedefineforclassfields=true).js | 6 +- ...t=es2022,usedefineforclassfields=false).js | 6 +- ...et=es2022,usedefineforclassfields=true).js | 6 +- ...rget=es5,usedefineforclassfields=false).js | 6 +- ...arget=es5,usedefineforclassfields=true).js | 6 +- ...t=esnext,usedefineforclassfields=false).js | 6 +- ...laration-setFunctionName(target=es2015).js | 18 +-- ...laration-setFunctionName(target=es2022).js | 18 +-- ...Declaration-setFunctionName(target=es5).js | 18 +-- ...ion-simpleTransformation(target=es2015).js | 6 +- ...ion-simpleTransformation(target=es2022).js | 6 +- ...ration-simpleTransformation(target=es5).js | 6 +- ...assDeclaration-sourceMap(target=es2015).js | 26 ++--- ...eclaration-sourceMap(target=es2015).js.map | 4 +- ...ion-sourceMap(target=es2015).sourcemap.txt | 82 ++++++------- ...assDeclaration-sourceMap(target=es2022).js | 26 ++--- ...eclaration-sourceMap(target=es2022).js.map | 4 +- ...ion-sourceMap(target=es2022).sourcemap.txt | 82 ++++++------- ...Decorators-classExpression-classSuper.1.js | 6 +- ...Decorators-classExpression-classSuper.2.js | 18 +-- ...Decorators-classExpression-classSuper.3.js | 6 +- ...Decorators-classExpression-classSuper.4.js | 6 +- ...Decorators-classExpression-classSuper.5.js | 18 +-- ...Decorators-classExpression-classSuper.6.js | 6 +- ...sion-commentPreservation(target=es2015).js | 26 ++--- ...sion-commentPreservation(target=es2022).js | 26 ++--- ...ion-missingEmitHelpers-classDecorator.1.js | 6 +- ...on-missingEmitHelpers-classDecorator.10.js | 6 +- ...on-missingEmitHelpers-classDecorator.11.js | 6 +- ...on-missingEmitHelpers-classDecorator.12.js | 6 +- ...on-missingEmitHelpers-classDecorator.13.js | 6 +- ...on-missingEmitHelpers-classDecorator.14.js | 6 +- ...on-missingEmitHelpers-classDecorator.15.js | 6 +- ...on-missingEmitHelpers-classDecorator.16.js | 6 +- ...on-missingEmitHelpers-classDecorator.17.js | 6 +- ...ion-missingEmitHelpers-classDecorator.2.js | 6 +- ...ion-missingEmitHelpers-classDecorator.3.js | 6 +- ...ion-missingEmitHelpers-classDecorator.4.js | 6 +- ...ion-missingEmitHelpers-classDecorator.5.js | 6 +- ...ion-missingEmitHelpers-classDecorator.6.js | 6 +- ...ion-missingEmitHelpers-classDecorator.7.js | 6 +- ...ion-missingEmitHelpers-classDecorator.8.js | 6 +- ...ion-missingEmitHelpers-classDecorator.9.js | 6 +- ...ators-classExpression-namedEvaluation.1.js | 48 ++++---- ...tors-classExpression-namedEvaluation.10.js | 108 +++++++++--------- ...tors-classExpression-namedEvaluation.11.js | 24 ++-- ...ators-classExpression-namedEvaluation.2.js | 90 +++++++-------- ...ators-classExpression-namedEvaluation.3.js | 36 +++--- ...ators-classExpression-namedEvaluation.4.js | 36 +++--- ...ators-classExpression-namedEvaluation.5.js | 12 +- ...ators-classExpression-namedEvaluation.6.js | 12 +- ...ators-classExpression-namedEvaluation.7.js | 12 +- ...ators-classExpression-namedEvaluation.8.js | 12 +- ...ators-classExpression-namedEvaluation.9.js | 12 +- ...rs-emitDecoratorMetadata(target=es2015).js | 36 +++--- ...rs-emitDecoratorMetadata(target=es2022).js | 36 +++--- ...ators-emitDecoratorMetadata(target=es5).js | 36 +++--- .../esDecoratorsMetadata1(target=es2015).js | 12 +- .../esDecoratorsMetadata1(target=es2022).js | 12 +- .../esDecoratorsMetadata2(target=es2015).js | 22 ++-- .../esDecoratorsMetadata2(target=es2022).js | 18 ++- .../esDecoratorsMetadata3(target=es2015).js | 25 ++-- .../esDecoratorsMetadata3(target=es2022).js | 22 ++-- .../esDecoratorsMetadata4(target=es2015).js | 12 +- .../esDecoratorsMetadata4(target=es2022).js | 12 +- ...does-not-add-color-when-NO_COLOR-is-set.js | 2 +- ...-when-host-can't-provide-terminal-width.js | 2 +- ...tatus.DiagnosticsPresent_OutputsSkipped.js | 2 +- ...tes-diagnostics-and-emit-for-decorators.js | 6 +- .../telemetry/does-not-expose-paths.js | 2 +- ...typeOfThisInStaticMembers10(target=es6).js | 20 ++-- ...typeOfThisInStaticMembers11(target=es6).js | 20 ++-- .../typesVersions.ambientModules.trace.json | 12 ++ .../typesVersions.emptyTypes.trace.json | 13 +++ .../typesVersions.justIndex.trace.json | 13 +++ .../typesVersions.multiFile.trace.json | 12 ++ ...VersionsDeclarationEmit.ambient.trace.json | 12 ++ ...rsionsDeclarationEmit.multiFile.trace.json | 12 ++ ...it.multiFileBackReferenceToSelf.trace.json | 12 ++ ...ultiFileBackReferenceToUnmapped.trace.json | 12 ++ .../metadata/esDecoratorsMetadata1.ts | 5 +- .../metadata/esDecoratorsMetadata2.ts | 5 +- .../metadata/esDecoratorsMetadata3.ts | 11 +- .../metadata/esDecoratorsMetadata4.ts | 5 +- 189 files changed, 1264 insertions(+), 1207 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 408fa99683a0a..55a4fed4a8dee 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -222,6 +222,7 @@ const libEntries: [string, string][] = [ ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"], ]; diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts index 503f94e8077d4..a54353b0f1143 100644 --- a/src/compiler/factory/emitHelpers.ts +++ b/src/compiler/factory/emitHelpers.ts @@ -60,7 +60,7 @@ export interface ESDecorateClassContext { */ name: Expression; - metadata?: Expression; + metadata: Expression; } /** @@ -77,7 +77,7 @@ export interface ESDecorateClassElementContext { static: boolean; private: boolean; access: ESDecorateClassElementAccess; - metadata?: Expression; + metadata: Expression; } /** @internal */ @@ -251,9 +251,9 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel const properties = [ factory.createPropertyAssignment(factory.createIdentifier("kind"), factory.createStringLiteral("class")), factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name), + factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata), ]; - if (contextIn.metadata) properties.push(factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata)); return factory.createObjectLiteralExpression(properties); } @@ -355,9 +355,8 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel factory.createPropertyAssignment(factory.createIdentifier("static"), contextIn.static ? factory.createTrue() : factory.createFalse()), factory.createPropertyAssignment(factory.createIdentifier("private"), contextIn.private ? factory.createTrue() : factory.createFalse()), factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata), ]; - - if (contextIn.metadata) properties.push(factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata)); return factory.createObjectLiteralExpression(properties); } diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index f038aa3d37a27..dfcb8a31fe5ce 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -1194,7 +1194,7 @@ export function transformClassFields(context: TransformationContext): (x: Source isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & ClassFacts.ClassWasDecorated) { + if (facts & ClassFacts.ClassWasDecorated && superClassReference === undefined && classConstructor === undefined) { return visitInvalidSuperProperty(node); } if (classConstructor && superClassReference) { @@ -1219,10 +1219,9 @@ export function transformClassFields(context: TransformationContext): (x: Source isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & ClassFacts.ClassWasDecorated) { + if (facts & ClassFacts.ClassWasDecorated && superClassReference === undefined && classConstructor === undefined) { return visitInvalidSuperProperty(node); } - if (classConstructor && superClassReference) { // converts `super[x]` into `Reflect.get(_baseTemp, x, _classTemp)` const superProperty = factory.createReflectGetCall( @@ -1746,7 +1745,7 @@ export function transformClassFields(context: TransformationContext): (x: Source function getClassFacts(node: ClassLikeDeclaration) { let facts = ClassFacts.None; - const original = getOriginalNode(node); + const original = getOriginalNode(node) as ClassLikeDeclaration; if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= ClassFacts.ClassWasDecorated; } @@ -1769,7 +1768,7 @@ export function transformClassFields(context: TransformationContext): (x: Source } } if (shouldTransformSuperInStaticInitializers && member.transformFlags & TransformFlags.ContainsLexicalSuper) { - if (!(facts & ClassFacts.ClassWasDecorated)) { + if (!(facts & ClassFacts.ClassWasDecorated) || original.heritageClauses) { facts |= ClassFacts.NeedsClassConstructorReference | ClassFacts.NeedsClassSuperReference; } } diff --git a/src/compiler/transformers/esDecorators.ts b/src/compiler/transformers/esDecorators.ts index c2c501bf3bf6f..cf4e41a393137 100644 --- a/src/compiler/transformers/esDecorators.ts +++ b/src/compiler/transformers/esDecorators.ts @@ -220,7 +220,7 @@ interface ClassInfo { classExtraInitializersName?: Identifier; // used in step 13 classThis?: Identifier; // `_classThis`, if needed. classSuper?: Identifier; // `_classSuper`, if needed. - metadataReference?: Identifier; + metadataReference: Identifier; memberInfos?: Map; // used in step 4.a, 12, and construction @@ -572,6 +572,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } function createClassInfo(node: ClassLikeDeclaration): ClassInfo { + const metadataReference = factory.createUniqueName("_metadata", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); let instanceExtraInitializersName: Identifier | undefined; let staticExtraInitializersName: Identifier | undefined; let hasStaticInitializers = false; @@ -618,6 +619,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc return { class: node, + metadataReference, instanceExtraInitializersName, staticExtraInitializersName, hasStaticInitializers, @@ -729,7 +731,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // NOTE: If there are no constructors, but there are instance initializers, a synthetic constructor is added. enterClass(classInfo); - classInfo.metadataReference = factory.createIdentifier("metadata"); leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo.metadataReference, !!heritageClauses)); let members = visitNodes(node.members, classElementVisitor, isClassElement); @@ -2347,42 +2348,29 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc /*exclamationToken*/ undefined, /*type*/ undefined, factory.createConditionalExpression( - factory.createBinaryExpression( - factory.createBinaryExpression(factory.createTypeOfExpression(factory.createIdentifier("Symbol")), factory.createToken(SyntaxKind.EqualsEqualsEqualsToken), factory.createStringLiteral("function")), - factory.createToken(SyntaxKind.AmpersandAmpersandToken), - factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), factory.createIdentifier("metadata")), + factory.createLogicalAnd( + factory.createTypeCheck(factory.createIdentifier("Symbol"), "function"), + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), ), factory.createToken(SyntaxKind.QuestionToken), factory.createCallExpression( - factory.createPropertyAccessExpression(factory.createIdentifier("Object"), factory.createIdentifier("create")), + factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "create"), /*typeArguments*/ undefined, [hasProto ? createSymbolMetadataReference() : factory.createNull()] ), factory.createToken(SyntaxKind.ColonToken), - factory.createIdentifier("undefined"), + factory.createVoidZero(), ), ); return factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); } function createSymbolMetadata(target: Identifier | ThisExpression, value: Identifier) { - const properties = [ - factory.createPropertyAssignment("configurable", factory.createTrue()), - factory.createPropertyAssignment("writable", factory.createTrue()), - factory.createPropertyAssignment("enumerable", factory.createTrue()), - factory.createPropertyAssignment("value", value), - ]; - - const defineProperty = factory.createCallExpression( - factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "defineProperty"), - /*typeArguments*/ undefined, - [ - target, - factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), factory.createIdentifier("metadata")), - factory.createObjectLiteralExpression(properties, /*multiLine*/ false), - ] + const defineProperty = factory.createObjectDefinePropertyCall( + target, + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), + factory.createPropertyDescriptor({ configurable: true, writable: true, enumerable: true, value }, /*singleLine*/ true) ); - return setEmitFlags( factory.createIfStatement(value, factory.createExpressionStatement(defineProperty)), EmitFlags.SingleLine, @@ -2391,8 +2379,8 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc function createSymbolMetadataReference() { return factory.createElementAccessExpression( - factory.createThis(), - factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), factory.createIdentifier("metadata")), + factory.createSuper(), + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), ); } } diff --git a/src/lib/decorators.d.ts b/src/lib/decorators.d.ts index 6c4173bc1cac8..83f41c8c03b27 100644 --- a/src/lib/decorators.d.ts +++ b/src/lib/decorators.d.ts @@ -17,6 +17,9 @@ type DecoratorContext = | ClassMemberDecoratorContext ; +type DecoratorMetadata = + typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? object : object | undefined; + /** * Context provided to a class decorator. * @template Class The type of the decorated class associated with this context. @@ -48,6 +51,8 @@ interface ClassDecoratorContext< * ``` */ addInitializer(initializer: (this: Class) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -112,6 +117,8 @@ interface ClassMethodDecoratorContext< * ``` */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** diff --git a/src/lib/esnext.d.ts b/src/lib/esnext.d.ts index 30eaf070bfb96..01229c4219237 100644 --- a/src/lib/esnext.d.ts +++ b/src/lib/esnext.d.ts @@ -1,2 +1,3 @@ /// /// +/// diff --git a/src/lib/libs.json b/src/lib/libs.json index a7a07d9d2191b..d0ae7ded50fce 100644 --- a/src/lib/libs.json +++ b/src/lib/libs.json @@ -67,6 +67,7 @@ "es2022.regexp", "es2023.array", "es2023.collection", + "esnext.decorators", "esnext.intl", "decorators", "decorators.legacy", diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js index 59c64e4c74698..a02c1d724f006 100644 --- a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js @@ -10,4 +10,4 @@ WatchOptions:: FileNames:: es7,0.ts Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js index c51ff3925997f..e437b39f03573 100644 --- a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js @@ -10,4 +10,4 @@ WatchOptions:: FileNames:: es7,0.ts Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js index b4473aa3f2b95..5dfd97a0f37d6 100644 --- a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js @@ -10,4 +10,4 @@ WatchOptions:: FileNames:: 0.ts Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with json api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with json api.js index 5844a15bc14e9..e6f16942f8195 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with json api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with json api.js @@ -30,5 +30,5 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with jsonSourceFile api.js index 6122b24401c05..9d6800fa5587e 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with jsonSourceFile api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs array to compiler-options with jsonSourceFile api.js @@ -30,7 +30,7 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -tsconfig.json:8:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +tsconfig.json:8:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. 8 ""    ~~ diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with json api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with json api.js index f089381ab7632..6a029d9142039 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with json api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with json api.js @@ -33,5 +33,5 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with jsonSourceFile api.js index 6a996e3a80cea..95273b4899183 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with jsonSourceFile api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert empty string option of libs to compiler-options with jsonSourceFile api.js @@ -33,7 +33,7 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -tsconfig.json:9:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +tsconfig.json:9:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. 9 ""    ~~ diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with json api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with json api.js index 0aea5a2fe93a4..5752b0d9a7a9e 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with json api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with json api.js @@ -35,5 +35,5 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with jsonSourceFile api.js index bdaa64c07be95..f9a4266209a6f 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with jsonSourceFile api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert incorrect option of libs to compiler-options with jsonSourceFile api.js @@ -35,7 +35,7 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -tsconfig.json:10:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +tsconfig.json:10:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. 10 "incorrectLib"    ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with json api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with json api.js index 7722a1dc4d9c0..633fd95577197 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with json api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with json api.js @@ -30,5 +30,5 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. diff --git a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with jsonSourceFile api.js b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with jsonSourceFile api.js index 10f48ec0d2d3a..a0007e8a32ef1 100644 --- a/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with jsonSourceFile api.js +++ b/tests/baselines/reference/config/convertCompilerOptionsFromJson/Convert trailing-whitespace string option of libs to compiler-options with jsonSourceFile api.js @@ -30,7 +30,7 @@ CompilerOptions:: "configFilePath": "tsconfig.json" } Errors:: -tsconfig.json:8:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'. +tsconfig.json:8:4 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'. 8 " "    ~~~~~ diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js index 5c1c7237b72b6..ca1fcaf34a893 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2015).js @@ -39,14 +39,14 @@ let C = (() => { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js index 3fe7a0be321a5..5dec37116ac37 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es2022).js @@ -28,14 +28,14 @@ let C = (() => { let _set_member_decorators_1; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(this, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_member_decorators_1, { kind: "getter", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_member_decorators_1, { kind: "setter", name: _b, static: false, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(this, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_member_decorators_1, { kind: "getter", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_member_decorators_1, { kind: "setter", name: _b, static: false, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } get method1() { return 0; } set method1(value) { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js index bfa7b5365150e..50f1ec363bc6d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStatic(target=es5).js @@ -57,14 +57,14 @@ var C = function () { return C; }()), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _get_method1_decorators, { kind: "getter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_method1_decorators, { kind: "setter", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators, { kind: "getter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators, { kind: "setter", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _get_member_decorators_1, { kind: "getter", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _set_member_decorators_1, { kind: "setter", name: _c, static: false, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js index 7e171c69b96d2..09af69d353862 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2015).js @@ -27,12 +27,12 @@ let C = (() => { _C_method1_get = function _C_method1_get() { return _private_get_method1_descriptor.get.call(this); }, _C_method1_set = function _C_method1_set(value) { return _private_set_method1_descriptor.set.call(this, value); }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_get_method1_decorators = [dec(1)]; _private_set_method1_decorators = [dec(2)]; - __esDecorate(_a, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_method1_set); } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_method1_set); } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js index 57e863f01caa0..3c63993410b8c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-nonStaticPrivate(target=es2022).js @@ -18,12 +18,12 @@ let C = (() => { let _private_set_method1_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_get_method1_decorators = [dec(1)]; _private_set_method1_decorators = [dec(2)]; - __esDecorate(this, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, _private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _private_get_method1_decorators, { kind: "getter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, _private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _private_set_method1_decorators, { kind: "setter", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } get #method1() { return _private_get_method1_descriptor.get.call(this); } set #method1(value) { return _private_set_method1_descriptor.set.call(this, value); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js index c7db78231a922..2ee1947d0d143 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2015).js @@ -36,14 +36,14 @@ let C = (() => { static set [(_static_set_member_decorators_1 = [dec(32)], _c = __propKey(method3))](value) { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: obj => _c in obj, set: (obj, value) => { obj[_c] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js index f6b5ea2748b53..715b083d990ad 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es2022).js @@ -28,14 +28,14 @@ let C = (() => { let _static_set_member_decorators_1; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(this, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_get_member_decorators_1, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_member_decorators_1, { kind: "setter", name: _b, static: true, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(this, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, set: (obj, value) => { obj.method1 = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, set: (obj, value) => { obj["method2"] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_get_member_decorators_1, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_member_decorators_1, { kind: "setter", name: _b, static: true, private: false, access: { has: obj => _b in obj, set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static get method1() { return 0; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js index a9816c94c5f61..b9c57919d2ab9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-static(target=es5).js @@ -56,14 +56,14 @@ var C = function () { return C; }()), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _static_get_method1_decorators, { kind: "getter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_method1_decorators, { kind: "setter", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, set: function (obj, value) { obj.method1 = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators, { kind: "getter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators, { kind: "setter", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, set: function (obj, value) { obj["method2"] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_get_member_decorators_1, { kind: "getter", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_set_member_decorators_1, { kind: "setter", name: _c, static: true, private: false, access: { has: function (obj) { return _c in obj; }, set: function (obj, value) { obj[_c] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js index 69b0a684c8080..a542b75ca9a38 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2015).js @@ -32,12 +32,12 @@ let C = (() => { _C_method1_get = function _C_method1_get() { return _static_private_get_method1_descriptor.get.call(this); }, _C_method1_set = function _C_method1_set(value) { return _static_private_set_method1_descriptor.set.call(this, value); }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_get_method1_decorators = [dec(1)]; _static_private_set_method1_decorators = [dec(2)]; - __esDecorate(_a, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_method1_set); } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_method1_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; @@ -54,10 +54,10 @@ let D = (() => { _method1_set = function _method1_set(value) { }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(); (() => { __classPrivateFieldGet(_classThis, _classThis, "a", _method1_get); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js index 5fca9df5bd4c6..3006cf46beae6 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-accessors-staticPrivate(target=es2022).js @@ -28,12 +28,12 @@ let C = (() => { let _static_private_set_method1_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_get_method1_decorators = [dec(1)]; _static_private_set_method1_decorators = [dec(2)]; - __esDecorate(this, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, _static_private_get_method1_descriptor = { get: __setFunctionName(function () { return 0; }, "#method1", "get") }, _static_private_get_method1_decorators, { kind: "getter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_method1_descriptor = { set: __setFunctionName(function (value) { }, "#method1", "set") }, _static_private_set_method1_decorators, { kind: "setter", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, set: (obj, value) => { obj.#method1 = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static get #method1() { return _static_private_get_method1_descriptor.get.call(this); } @@ -50,10 +50,10 @@ let D = (() => { static { __setFunctionName(this, "D"); } static { _method1_get = function _method1_get() { return 0; }, _method1_set = function _method1_set(value) { }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { __classPrivateFieldGet(_classThis, _classThis, "a", _method1_get); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js index be8d2a2912059..ac0b43fbec73a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js @@ -33,10 +33,10 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js index 77ba20cfb6b52..3a20a77c22c40 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js @@ -39,10 +39,10 @@ let C1 = (() => { }); var C1 = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper, "name", _classThis); @@ -62,10 +62,10 @@ let C2 = (() => { let _classSuper_1 = (0, function () { }); var C2 = class extends _classSuper_1 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper_1, "name", _classThis_1); @@ -85,10 +85,10 @@ let C3 = (() => { let _classSuper_2 = (0, (() => { })); var C3 = class extends _classSuper_2 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper_2, "name", _classThis_2); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js index d2de86b775581..df5f7c1daa78f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js @@ -55,10 +55,10 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js index d91847410cac7..3a78bc0a76006 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js @@ -30,10 +30,10 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper, "method", _classThis).call(_classThis); static b = Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js index eadcd2b3ec532..24cded195219e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js @@ -59,10 +59,10 @@ let C1 = (() => { let _classSuper = Base; var C1 = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper, "x", _classThis); static b = (() => { @@ -105,10 +105,10 @@ let C2 = (() => { let _classSuper_1 = Base; var C2 = class extends _classSuper_1 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper_1, "x", _classThis_1); static b = (() => { @@ -151,10 +151,10 @@ let C3 = (() => { let _classSuper_2 = Base; var C3 = class extends _classSuper_2 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper_2, x, _classThis_2); static b = (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js index 35bf6aa610206..03ca42bbcff5c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js @@ -36,10 +36,10 @@ let C = (() => { let _classThis; var C = class extends Base { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } static m() { super.method(); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js index 950e81bb0b8f4..1d9a7c597668a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js @@ -50,10 +50,10 @@ let B = (() => { let _m_decorators; return class B extends A { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; _m_decorators = [foo]; - __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } constructor() { 'inject'; @@ -77,10 +77,10 @@ let C = (() => { let _get_val_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _get_val_decorators = [foo]; - __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: metadata }, null, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: _metadata }, null, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } constructor() { __runInitializers(this, _instanceExtraInitializers_1); @@ -94,10 +94,10 @@ let D = (() => { let _get_val_decorators; return class D extends A { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; _get_val_decorators = [foo]; - __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: metadata }, null, _instanceExtraInitializers_2); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: _metadata }, null, _instanceExtraInitializers_2); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } constructor() { super(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js index 7ebb1dd0cf073..699e2312e520b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2015).js @@ -28,10 +28,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(); (() => { _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js index 038dfdf2141c8..bb0221fa9eb32 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference(target=es2022).js @@ -23,10 +23,10 @@ let C = (() => { var C = class { static { __setFunctionName(this, "C"); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { _classThis; } static x = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js index a0831e54bf62a..1783320d6950d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classThisReference.es5.js @@ -32,10 +32,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(); (function () { _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js index 1195be088374c..0d67c97e58cb4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2015).js @@ -171,7 +171,7 @@ let C = (() => { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -182,19 +182,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); /*28*/ @@ -219,10 +219,10 @@ let D = exports.D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return D = _classThis; @@ -236,10 +236,10 @@ exports.default = (() => { }; __setFunctionName(_classThis_1, "E"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return E = _classThis_1; @@ -258,10 +258,10 @@ let F = exports.F = (() => { }; __setFunctionName(_classThis, "F"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return F = _classThis; @@ -275,10 +275,10 @@ exports.default = (() => { }; __setFunctionName(_classThis_1, "G"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return G = _classThis_1; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js index a32490fb634ba..3e00ebdb65a13 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=commonjs,target=es2022).js @@ -151,7 +151,7 @@ let C = (() => { static { __setFunctionName(this, "C"); } static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -162,19 +162,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); } /*4*/ @@ -214,10 +214,10 @@ let D = exports.D = (() => { let _classThis; var D = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -230,10 +230,10 @@ exports.default = (() => { let _classThis_1; var E = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -251,10 +251,10 @@ let F = exports.F = (() => { let _classThis; var F = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -267,10 +267,10 @@ exports.default = (() => { let _classThis_1; var G = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js index af116ea299273..4c8da306e0158 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2015).js @@ -171,7 +171,7 @@ let C = (() => { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -182,19 +182,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); /*28*/ @@ -217,10 +217,10 @@ export let D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return D = _classThis; @@ -235,10 +235,10 @@ export default (() => { }; __setFunctionName(_classThis_1, "E"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return E = _classThis_1; @@ -254,10 +254,10 @@ export let F = (() => { }; __setFunctionName(_classThis, "F"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return F = _classThis; @@ -272,10 +272,10 @@ export default (() => { }; __setFunctionName(_classThis_1, "G"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return G = _classThis_1; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js index dd49087d88cc3..d52d1cc6eb0c7 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commentPreservation(module=esnext,target=es2022).js @@ -151,7 +151,7 @@ let C = (() => { static { __setFunctionName(this, "C"); } static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -162,19 +162,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); } /*4*/ @@ -212,10 +212,10 @@ export let D = (() => { let _classThis; var D = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -229,10 +229,10 @@ export default (() => { let _classThis_1; var E = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); E = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -247,10 +247,10 @@ export let F = (() => { let _classThis; var F = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); F = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -264,10 +264,10 @@ export default (() => { let _classThis_1; var G = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); G = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js b/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js index b74455918625b..b7e86a8344f40 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commonjs-classNamespaceMerge.js @@ -59,10 +59,10 @@ let Example = exports.Example = (() => { let _classThis; var Example = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); Example = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } static foo() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js b/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js index 651eef4be2983..b2b08a746a10a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-commonjs.js @@ -55,10 +55,10 @@ let Example = exports.Example = (() => { let _classThis; var Example = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); Example = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } static foo() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js index f03f4133924ed..2bfad8c2f4f6d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=false).js @@ -36,11 +36,11 @@ let C = (() => { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js index c1adbc8d5af47..5f74a53f3e20c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2015,usedefineforclassfields=true).js @@ -51,11 +51,11 @@ let C = (() => { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js index 9633b92671bb8..fc43f82333773 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=false).js @@ -31,11 +31,11 @@ let C = (() => { } static { _field1_decorators = [dec(1)], _member_decorators = [dec(2)], _member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } }; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js index 39a73420e2bb8..347a71550f9b9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es2022,usedefineforclassfields=true).js @@ -25,11 +25,11 @@ let C = (() => { let _member_initializers_1 = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } field1 = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _field1_initializers, 1)); ["field2"] = __runInitializers(this, _member_initializers, 2); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js index 0f039ab52ddd8..58d618068f143 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=false).js @@ -38,11 +38,11 @@ var C = function () { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js index 334009691caf5..3c7221479920c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=es5,usedefineforclassfields=true).js @@ -53,11 +53,11 @@ var C = function () { _member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js index 9633b92671bb8..fc43f82333773 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStatic(target=esnext,usedefineforclassfields=false).js @@ -31,11 +31,11 @@ let C = (() => { } static { _field1_decorators = [dec(1)], _member_decorators = [dec(2)], _member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _field1_decorators, { kind: "field", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators, { kind: "field", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _member_decorators_1, { kind: "field", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } }; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js index ee606b3513894..e4121674c1044 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2015).js @@ -38,11 +38,11 @@ let C = (() => { set [_b](value) { __classPrivateFieldSet(this, _C__b_accessor_storage, value, "f"); } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators_1, { kind: "accessor", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators_1, { kind: "accessor", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js index 74b592d5d0d01..ea4e28865b2ab 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticAccessor(target=es2022).js @@ -25,11 +25,11 @@ let C = (() => { let _member_initializers_1 = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(this, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _field1_initializers, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _member_initializers, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators_1, { kind: "accessor", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _member_initializers_1, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(this, null, _field1_decorators, { kind: "accessor", name: "field1", static: false, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _field1_initializers, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators, { kind: "accessor", name: "field2", static: false, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _member_initializers, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators_1, { kind: "accessor", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _member_initializers_1, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } #field1_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _field1_initializers, 1)); get field1() { return this.#field1_accessor_storage; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js index b1290216b7486..37ab7eb44f87d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2015).js @@ -21,10 +21,10 @@ let C = (() => { }, _C_field1 = new WeakMap(), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_field1_decorators = [dec]; - __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_field1, obj), get: obj => __classPrivateFieldGet(obj, _C_field1, "f"), set: (obj, value) => { __classPrivateFieldSet(obj, _C_field1, value, "f"); } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_field1, obj), get: obj => __classPrivateFieldGet(obj, _C_field1, "f"), set: (obj, value) => { __classPrivateFieldSet(obj, _C_field1, value, "f"); } }, metadata: _metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js index dd5886acd5d6e..5be9b65bd6cad 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivate(target=es2022).js @@ -15,10 +15,10 @@ let C = (() => { let _private_field1_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_field1_decorators = [dec]; - __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _private_field1_decorators, { kind: "field", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: _metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } #field1 = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _private_field1_initializers, 0)); }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js index 4aec9a0be1735..cb37ef49f90fe 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2015).js @@ -26,10 +26,10 @@ let C = (() => { _C_field1_get = function _C_field1_get() { return _private_field1_descriptor.get.call(this); }, _C_field1_set = function _C_field1_set(value) { return _private_field1_descriptor.set.call(this, value); }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_field1_decorators = [dec]; - __esDecorate(_a, _private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _C_field1_accessor_storage, "f"); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _C_field1_accessor_storage, value, "f"); }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_field1_set); } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, _private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _C_field1_accessor_storage, "f"); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _C_field1_accessor_storage, value, "f"); }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _C_instances, value, "a", _C_field1_set); } }, metadata: _metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js index 12be8cfaf3853..cd4fde08189e4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-nonStaticPrivateAccessor(target=es2022).js @@ -16,10 +16,10 @@ let C = (() => { let _private_field1_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_field1_decorators = [dec]; - __esDecorate(this, _private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _private_field1_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, _private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _private_field1_decorators, { kind: "accessor", name: "#field1", static: false, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: _metadata }, _private_field1_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } #field1_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _private_field1_initializers, 0)); get #field1() { return _private_field1_descriptor.get.call(this); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js index fc1eea0048cf9..aace6373fbfcd 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=false).js @@ -31,11 +31,11 @@ let C = (() => { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a.field1 = __runInitializers(_a, _static_field1_initializers, 1), diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js index ccadc8bc018ef..c1b41b7fe36bd 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2015,usedefineforclassfields=true).js @@ -31,11 +31,11 @@ let C = (() => { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), Object.defineProperty(_a, "field1", { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js index b70fa437a741c..3a2c6e945361d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=false).js @@ -26,11 +26,11 @@ let C = (() => { return class C { static { _static_field1_decorators = [dec(1)], _static_member_decorators = [dec(2)], _static_member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static { this.field1 = __runInitializers(this, _static_field1_initializers, 1); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js index 98f9feca0cee4..51c678a8ff594 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es2022,usedefineforclassfields=true).js @@ -25,11 +25,11 @@ let C = (() => { let _static_member_initializers_1 = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static field1 = __runInitializers(this, _static_field1_initializers, 1); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js index 574cc13e112ed..834de06b274e8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=false).js @@ -35,11 +35,11 @@ var C = function () { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a.field1 = __runInitializers(_a, _static_field1_initializers, 1), diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js index 84c8d114d7876..b2765d6b5706a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=es5,usedefineforclassfields=true).js @@ -35,11 +35,11 @@ var C = function () { _static_member_decorators_1 = [dec(3)], _b = __propKey(field3), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: function (obj) { return "field1" in obj; }, get: function (obj) { return obj.field1; }, set: function (obj, value) { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: function (obj) { return "field2" in obj; }, get: function (obj) { return obj["field2"]; }, set: function (obj, value) { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; }, set: function (obj, value) { obj[_b] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), Object.defineProperty(_a, "field1", { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js index b70fa437a741c..3a2c6e945361d 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-static(target=esnext,usedefineforclassfields=false).js @@ -26,11 +26,11 @@ let C = (() => { return class C { static { _static_field1_decorators = [dec(1)], _static_member_decorators = [dec(2)], _static_member_decorators_1 = [dec(3)], _a = __propKey(field3); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _static_field1_decorators, { kind: "field", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators, { kind: "field", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(null, null, _static_member_decorators_1, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static { this.field1 = __runInitializers(this, _static_field1_initializers, 1); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js index feb056ff74655..268dc5b173b43 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2015).js @@ -41,11 +41,11 @@ let C = (() => { static set [_b](value) { __classPrivateFieldSet(this, _a, value, "f", _C__b_accessor_storage); } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators_1, { kind: "accessor", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators_1, { kind: "accessor", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b], set: (obj, value) => { obj[_b] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _C_field1_accessor_storage = { value: __runInitializers(_a, _static_field1_initializers, 1) }, @@ -65,10 +65,10 @@ let D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(); _field1_accessor_storage = { value: 1 }; (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js index b554228b3572b..166419c7514d0 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticAccessor(target=es2022).js @@ -33,11 +33,11 @@ let C = (() => { let _static_member_initializers_1 = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(this, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: metadata }, _static_field1_initializers, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators_1, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers_1, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(this, null, _static_field1_decorators, { kind: "accessor", name: "field1", static: true, private: false, access: { has: obj => "field1" in obj, get: obj => obj.field1, set: (obj, value) => { obj.field1 = value; } }, metadata: _metadata }, _static_field1_initializers, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: "field2", static: true, private: false, access: { has: obj => "field2" in obj, get: obj => obj["field2"], set: (obj, value) => { obj["field2"] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators_1, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _static_member_initializers_1, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static #field1_accessor_storage = __runInitializers(this, _static_field1_initializers, 1); @@ -60,10 +60,10 @@ let D = (() => { var D = class { static { __setFunctionName(this, "D"); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { _field1_accessor_storage = { value: 1 }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js index b02ec2578dba9..a04d4b453e404 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2015).js @@ -26,10 +26,10 @@ let C = (() => { return _a = class C { }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_field1_decorators = [dec]; - __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "f", _C_field1), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "f", _C_field1); } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "f", _C_field1), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "f", _C_field1); } }, metadata: _metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _C_field1 = { value: __runInitializers(_a, _static_private_field1_initializers, 0) }, @@ -45,10 +45,10 @@ let D = (() => { }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(); _field1 = { value: 0 }; (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js index 56f23b8c04f3e..bc9c7d0b2086e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivate(target=es2022).js @@ -24,10 +24,10 @@ let C = (() => { let _static_private_field1_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_field1_decorators = [dec]; - __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _static_private_field1_decorators, { kind: "field", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: _metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static #field1 = __runInitializers(this, _static_private_field1_initializers, 0); @@ -42,10 +42,10 @@ let D = (() => { var D = class { static { __setFunctionName(this, "D"); } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { _field1 = { value: 0 }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js index 556cae54991f1..d6baae0aa7029 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2015).js @@ -29,10 +29,10 @@ let C = (() => { _C_field1_get = function _C_field1_get() { return _static_private_field1_descriptor.get.call(this); }, _C_field1_set = function _C_field1_set(value) { return _static_private_field1_descriptor.set.call(this, value); }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_field1_decorators = [dec]; - __esDecorate(_a, _static_private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_a, _a, "f", _C_field1_accessor_storage); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C_field1_accessor_storage); }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_field1_set); } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, _static_private_field1_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_a, _a, "f", _C_field1_accessor_storage); }, "#field1", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_a, _a, value, "f", _C_field1_accessor_storage); }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_field1_get), set: (obj, value) => { __classPrivateFieldSet(obj, _a, value, "a", _C_field1_set); } }, metadata: _metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _C_field1_accessor_storage = { value: __runInitializers(this, _static_private_field1_initializers, 0) }, @@ -50,10 +50,10 @@ let D = (() => { _field1_set = function _field1_set(value) { __classPrivateFieldSet(this, _classThis, value, "f", _field1_accessor_storage); }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(); _field1_accessor_storage = { value: 0 }; (() => { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js index 75e4fda9e3e53..a3b66b1e0aa95 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-fields-staticPrivateAccessor(target=es2022).js @@ -25,10 +25,10 @@ let C = (() => { let _static_private_field1_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_field1_decorators = [dec]; - __esDecorate(this, _static_private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: metadata }, _static_private_field1_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, _static_private_field1_descriptor = { get: __setFunctionName(function () { return this.#field1_accessor_storage; }, "#field1", "get"), set: __setFunctionName(function (value) { this.#field1_accessor_storage = value; }, "#field1", "set") }, _static_private_field1_decorators, { kind: "accessor", name: "#field1", static: true, private: true, access: { has: obj => #field1 in obj, get: obj => obj.#field1, set: (obj, value) => { obj.#field1 = value; } }, metadata: _metadata }, _static_private_field1_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static #field1_accessor_storage = __runInitializers(this, _static_private_field1_initializers, 0); @@ -46,10 +46,10 @@ let D = (() => { static { __setFunctionName(this, "D"); } static { _field1_get = function _field1_get() { return __classPrivateFieldGet(this, _classThis, "f", _field1_accessor_storage); }, _field1_set = function _field1_set(value) { __classPrivateFieldSet(this, _classThis, value, "f", _field1_accessor_storage); }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { _field1_accessor_storage = { value: 0 }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js index 0ddee29bffe2d..6b480c5a73786 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2015).js @@ -30,11 +30,11 @@ let C = (() => { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js index e70164a8e4820..7a67bacf1403b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es2022).js @@ -22,11 +22,11 @@ let C = (() => { let _member_decorators_1; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(this, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _member_decorators_1, { kind: "method", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(this, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _member_decorators_1, { kind: "method", name: _a, static: false, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } method1() { } ["method2"]() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js index 1c87001510eb2..e8022671da357 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStatic(target=es5).js @@ -32,11 +32,11 @@ var C = function () { return C; }()), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _method1_decorators, { kind: "method", name: "method1", static: false, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators, { kind: "method", name: "method2", static: false, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_a, null, _member_decorators_1, { kind: "method", name: _b, static: false, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js index 6a2d50106bd2e..91339a5c96be8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2015).js @@ -23,10 +23,10 @@ let C = (() => { _C_instances = new WeakSet(), _C_method1_get = function _C_method1_get() { return _private_method1_descriptor.value; }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_method1_decorators = [dec]; - __esDecorate(_a, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => __classPrivateFieldIn(_C_instances, obj), get: obj => __classPrivateFieldGet(obj, _C_instances, "a", _C_method1_get) }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js index d7d911fe4d731..9d62c6f4fa82a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-nonStaticPrivate(target=es2022).js @@ -15,10 +15,10 @@ let C = (() => { let _private_method1_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_method1_decorators = [dec]; - __esDecorate(this, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, _private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _private_method1_decorators, { kind: "method", name: "#method1", static: false, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } get #method1() { return _private_method1_descriptor.value; } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js index bef0e2c65e202..9c226b2e31140 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2015).js @@ -27,11 +27,11 @@ let C = (() => { static [(_static_method1_decorators = [dec(1)], _static_member_decorators = [dec(2)], _static_member_decorators_1 = [dec(3)], _b = __propKey(method3))]() { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: obj => _b in obj, get: obj => obj[_b] }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js index b7d4318e988a3..73e4f07432022 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es2022).js @@ -22,11 +22,11 @@ let C = (() => { let _static_member_decorators_1; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(this, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_member_decorators_1, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(this, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: obj => "method1" in obj, get: obj => obj.method1 }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: obj => "method2" in obj, get: obj => obj["method2"] }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_member_decorators_1, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static method1() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js index 7079f24eaf8f4..1ed2c1a6fc82c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-static(target=es5).js @@ -31,11 +31,11 @@ var C = function () { return C; }()), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(_a, null, _static_method1_decorators, { kind: "method", name: "method1", static: true, private: false, access: { has: function (obj) { return "method1" in obj; }, get: function (obj) { return obj.method1; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators, { kind: "method", name: "method2", static: true, private: false, access: { has: function (obj) { return "method2" in obj; }, get: function (obj) { return obj["method2"]; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_a, null, _static_member_decorators_1, { kind: "method", name: _b, static: true, private: false, access: { has: function (obj) { return _b in obj; }, get: function (obj) { return obj[_b]; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js index 352c7bb4309fb..7aa6dd661fe87 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js @@ -23,10 +23,10 @@ let C = (() => { }, _C_method1_get = function _C_method1_get() { return _static_private_method1_descriptor.value; }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_method1_decorators = [dec]; - __esDecorate(_a, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_a, obj), get: obj => __classPrivateFieldGet(obj, _a, "a", _C_method1_get) }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_a, _staticExtraInitializers); })(), _a; @@ -42,10 +42,10 @@ let D = (() => { _method1 = function _method1() { }; __setFunctionName(_classThis, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return D = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js index 60e0494e5d0a3..2a2b99e12f269 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js @@ -20,10 +20,10 @@ let C = (() => { let _static_private_method1_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_method1_decorators = [dec]; - __esDecorate(this, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, _static_private_method1_descriptor = { value: __setFunctionName(function () { }, "#method1") }, _static_private_method1_decorators, { kind: "method", name: "#method1", static: true, private: true, access: { has: obj => #method1 in obj, get: obj => obj.#method1 }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static get #method1() { return _static_private_method1_descriptor.value; } @@ -39,10 +39,10 @@ let D = (() => { static { __setFunctionName(this, "D"); } static { _method1 = function _method1() { }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); D = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js index 7d9fbad9b275f..0f0896a184ede 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.1.js @@ -24,10 +24,10 @@ let C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js index c94616281952d..d7241fc7d2de4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.2.js @@ -24,10 +24,10 @@ exports.default = (() => { var default_1 = class { static { tslib_1.__setFunctionName(this, "default"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js index e0fe4d88b9f3a..12446a7e13bb8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-classDecorator.3.js @@ -29,10 +29,10 @@ let C = (() => { static { tslib_1.__setFunctionName(this, "C"); } static { _foo = function _foo() { }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js index 95e5d0c409894..06a8bd7717dd3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateAutoAccessor.js @@ -26,10 +26,10 @@ let C = (() => { let _private_x_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_x_decorators = [dec]; - tslib_1.__esDecorate(this, _private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _private_x_decorators, { kind: "accessor", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _private_x_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _private_x_decorators, { kind: "accessor", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: _metadata }, _private_x_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } #x_accessor_storage = (tslib_1.__runInitializers(this, _instanceExtraInitializers), tslib_1.__runInitializers(this, _private_x_initializers, void 0)); get #x() { return _private_x_descriptor.get.call(this); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js index 3c73ecf5723d2..5563ce1d5d58e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateField.js @@ -25,10 +25,10 @@ let C = (() => { let _private_x_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_x_decorators = [dec]; - tslib_1.__esDecorate(null, null, _private_x_decorators, { kind: "field", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _private_x_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(null, null, _private_x_decorators, { kind: "field", name: "#x", static: false, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: _metadata }, _private_x_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } #x = (tslib_1.__runInitializers(this, _instanceExtraInitializers), tslib_1.__runInitializers(this, _private_x_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js index 6c01135db9249..62eaf14ee5094 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateGetter.js @@ -25,10 +25,10 @@ let C = (() => { let _private_get_foo_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_get_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _private_get_foo_decorators, { kind: "getter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _private_get_foo_decorators, { kind: "getter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } get #foo() { return _private_get_foo_descriptor.get.call(this); } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js index 0c35b93d8c9ec..9d0a757c9c7ff 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateMethod.js @@ -25,10 +25,10 @@ let C = (() => { let _private_foo_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _private_foo_decorators, { kind: "method", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _private_foo_decorators, { kind: "method", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } get #foo() { return _private_foo_descriptor.value; } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js index c309208699407..7d4091ba8765a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-nonStaticPrivateSetter.js @@ -25,10 +25,10 @@ let C = (() => { let _private_set_foo_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _private_set_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _private_set_foo_decorators, { kind: "setter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _private_set_foo_decorators, { kind: "setter", name: "#foo", static: false, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } set #foo(value) { return _private_set_foo_descriptor.set.call(this, value); } constructor() { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js index c551d7b4868b2..466c8b6efacb5 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedAutoAccessor.js @@ -27,9 +27,9 @@ let C = (() => { let _static_member_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "accessor", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static #_a_accessor_storage = tslib_1.__runInitializers(this, _static_member_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js index aab5f9174e78c..4bbc49981eff7 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedField.js @@ -27,9 +27,9 @@ let C = (() => { let _static_member_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, null, _static_member_decorators, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, _static_member_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, null, _static_member_decorators, { kind: "field", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a], set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, _static_member_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static [(_static_member_decorators = [dec], _a = tslib_1.__propKey(x))] = tslib_1.__runInitializers(this, _static_member_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js index eb961ca90b69a..1b0b5b4e707a1 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedGetter.js @@ -26,9 +26,9 @@ let C = (() => { let _static_get_member_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(this, null, _static_get_member_decorators, { kind: "getter", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static get [(_static_get_member_decorators = [dec], _a = tslib_1.__propKey(x))]() { return 1; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js index 31513fe1233b4..a46b00282f20f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedMethod.js @@ -26,9 +26,9 @@ let C = (() => { let _static_member_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(this, null, _static_member_decorators, { kind: "method", name: _a, static: true, private: false, access: { has: obj => _a in obj, get: obj => obj[_a] }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static [(_static_member_decorators = [dec], _a = tslib_1.__propKey(x))]() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js index f711d6afcf7da..9fb1f5bcb4369 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticComputedSetter.js @@ -26,9 +26,9 @@ let C = (() => { let _static_set_member_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: _a, static: true, private: false, access: { has: obj => _a in obj, set: (obj, value) => { obj[_a] = value; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(this, null, _static_set_member_decorators, { kind: "setter", name: _a, static: true, private: false, access: { has: obj => _a in obj, set: (obj, value) => { obj[_a] = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static set [(_static_set_member_decorators = [dec], _a = tslib_1.__propKey(x))](value) { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js index 8ae521ffa2e9e..defb6b21926f4 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateAutoAccessor.js @@ -26,10 +26,10 @@ let C = (() => { let _static_private_x_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_x_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _static_private_x_decorators, { kind: "accessor", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _static_private_x_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _static_private_x_descriptor = { get: tslib_1.__setFunctionName(function () { return this.#x_accessor_storage; }, "#x", "get"), set: tslib_1.__setFunctionName(function (value) { this.#x_accessor_storage = value; }, "#x", "set") }, _static_private_x_decorators, { kind: "accessor", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: _metadata }, _static_private_x_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static #x_accessor_storage = tslib_1.__runInitializers(this, _static_private_x_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js index 06788a58b6b2b..7a88c47383c54 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateField.js @@ -25,10 +25,10 @@ let C = (() => { let _static_private_x_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_x_decorators = [dec]; - tslib_1.__esDecorate(null, null, _static_private_x_decorators, { kind: "field", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: metadata }, _static_private_x_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(null, null, _static_private_x_decorators, { kind: "field", name: "#x", static: true, private: true, access: { has: obj => #x in obj, get: obj => obj.#x, set: (obj, value) => { obj.#x = value; } }, metadata: _metadata }, _static_private_x_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static #x = tslib_1.__runInitializers(this, _static_private_x_initializers, void 0); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js index 659f0bd91a5df..aabff8e043c8f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateGetter.js @@ -25,10 +25,10 @@ let C = (() => { let _static_private_get_foo_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_get_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _static_private_get_foo_decorators, { kind: "getter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _static_private_get_foo_descriptor = { get: tslib_1.__setFunctionName(function () { return 1; }, "#foo", "get") }, _static_private_get_foo_decorators, { kind: "getter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static get #foo() { return _static_private_get_foo_descriptor.get.call(this); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js index 134ca7dda77a8..582ecbe2fc7f9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateMethod.js @@ -25,10 +25,10 @@ let C = (() => { let _static_private_foo_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _static_private_foo_decorators, { kind: "method", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _static_private_foo_descriptor = { value: tslib_1.__setFunctionName(function () { }, "#foo") }, _static_private_foo_decorators, { kind: "method", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, get: obj => obj.#foo }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static get #foo() { return _static_private_foo_descriptor.value; } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js index 2aca3f54193de..522e62343e3bf 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-missingEmitHelpers-staticPrivateSetter.js @@ -25,10 +25,10 @@ let C = (() => { let _static_private_set_foo_descriptor; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_private_set_foo_decorators = [dec]; - tslib_1.__esDecorate(this, _static_private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _static_private_set_foo_decorators, { kind: "setter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } }, metadata: metadata }, null, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + tslib_1.__esDecorate(this, _static_private_set_foo_descriptor = { set: tslib_1.__setFunctionName(function (value) { }, "#foo", "set") }, _static_private_set_foo_decorators, { kind: "setter", name: "#foo", static: true, private: true, access: { has: obj => #foo in obj, set: (obj, value) => { obj.#foo = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(this, _staticExtraInitializers); } static set #foo(value) { return _static_private_set_foo_descriptor.set.call(this, value); } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js index 8e3c0b04e4831..23a2abdede464 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2015).js @@ -19,10 +19,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js index 3c2e22e5e0a7a..91ebccd49cf81 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es2022).js @@ -17,10 +17,10 @@ let C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js index 0a1a71f66c579..0e11a54c1a177 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-multipleDecorators(target=es5).js @@ -23,10 +23,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js index f7bb9a52a0f95..c8d07b57e8617 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2015).js @@ -55,12 +55,12 @@ let A = (() => { }; __setFunctionName(_classThis, "A"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _b_decorators = [dec(_outerThis)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return A = _classThis; @@ -89,11 +89,11 @@ let B = (() => { _b = (_b_decorators = [dec(this)], f(this)); __setFunctionName(_classThis_1, "B"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); B = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return B = _classThis_1; @@ -119,12 +119,12 @@ let C = (() => { _a = new WeakMap(); __setFunctionName(_classThis_2, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _b_decorators = [dec(_outerThis_1, (x) => __classPrivateFieldGet(x, _a, "f"))]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_2); - __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name, metadata: metadata }, null, _classExtraInitializers_2); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers_2); + __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name, metadata: _metadata }, null, _classExtraInitializers_2); C = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); })(); return C = _classThis_2; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js index f7bb9a52a0f95..c8d07b57e8617 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2021).js @@ -55,12 +55,12 @@ let A = (() => { }; __setFunctionName(_classThis, "A"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _b_decorators = [dec(_outerThis)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return A = _classThis; @@ -89,11 +89,11 @@ let B = (() => { _b = (_b_decorators = [dec(this)], f(this)); __setFunctionName(_classThis_1, "B"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); B = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return B = _classThis_1; @@ -119,12 +119,12 @@ let C = (() => { _a = new WeakMap(); __setFunctionName(_classThis_2, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _b_decorators = [dec(_outerThis_1, (x) => __classPrivateFieldGet(x, _a, "f"))]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_2); - __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name, metadata: metadata }, null, _classExtraInitializers_2); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers_2); + __esDecorate(null, _classDescriptor_2 = { value: _classThis_2 }, _classDecorators_2, { kind: "class", name: _classThis_2.name, metadata: _metadata }, null, _classExtraInitializers_2); C = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); })(); return C = _classThis_2; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js index 2dec607617f98..34559b259236b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-outerThisReference(target=es2022).js @@ -50,12 +50,12 @@ let A = (() => { let _b_initializers = []; var A = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _b_decorators = [dec(_outerThis)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } b = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _b_initializers, 2)); @@ -74,11 +74,11 @@ let B = (() => { let _b_initializers = []; var B = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); B = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } // @ts-ignore @@ -102,12 +102,12 @@ let C = (() => { let _b_initializers = []; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _b_decorators = [dec(_outerThis_1, (x) => x.#a)]; - __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: metadata }, _b_initializers, _instanceExtraInitializers_2); - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + __esDecorate(null, null, _b_decorators, { kind: "field", name: "b", static: false, private: false, access: { has: obj => "b" in obj, get: obj => obj.b, set: (obj, value) => { obj.b = value; } }, metadata: _metadata }, _b_initializers, _instanceExtraInitializers_2); + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } #a = (__runInitializers(this, _instanceExtraInitializers_2), 1); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js index dc75c1138fbd3..b3b629e0c86ef 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=false).js @@ -24,10 +24,10 @@ let C = (() => { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js index e7f789b7d58b3..3174830b7742f 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2015,usedefineforclassfields=true).js @@ -29,10 +29,10 @@ let C = (() => { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js index 7a1515f4d741f..005a2ac5e11cc 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=false).js @@ -17,10 +17,10 @@ let C = (() => { let _speak_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } constructor(message) { this.message = (__runInitializers(this, _instanceExtraInitializers), message); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js index 7ec5c2fc999ce..17d39a63a018b 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es2022,usedefineforclassfields=true).js @@ -17,10 +17,10 @@ let C = (() => { let _speak_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } message = (__runInitializers(this, _instanceExtraInitializers), void 0); constructor(message) { diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js index 977a9c5d84deb..e3aa44bef0550 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=false).js @@ -26,10 +26,10 @@ var C = function () { return C; }()), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js index 703b69cbcc20a..3d59885bd8895 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=es5,usedefineforclassfields=true).js @@ -36,10 +36,10 @@ var C = function () { return C; }()), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: function (obj) { return "speak" in obj; }, get: function (obj) { return obj.speak; } }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; }(); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js index 7a1515f4d741f..005a2ac5e11cc 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-parameterProperties(target=esnext,usedefineforclassfields=false).js @@ -17,10 +17,10 @@ let C = (() => { let _speak_decorators; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _speak_decorators = [bound]; - __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: metadata }, null, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _speak_decorators, { kind: "method", name: "speak", static: false, private: false, access: { has: obj => "speak" in obj, get: obj => obj.speak }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } constructor(message) { this.message = (__runInitializers(this, _instanceExtraInitializers), message); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js index 7de5d12b20b56..4dda51ae1f3dd 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js @@ -33,10 +33,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -52,10 +52,10 @@ export let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -70,10 +70,10 @@ export default (() => { }; (() => { __setFunctionName(_classThis, "default"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return default_1 = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js index 3a9f6ebe99fcb..3f7961a0a165a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js @@ -31,10 +31,10 @@ let C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -49,10 +49,10 @@ export let C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -67,10 +67,10 @@ export default (() => { var default_1 = class { static { __setFunctionName(this, "default"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js index 313bec5e50b94..3dddb2039080a 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js @@ -39,10 +39,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -64,10 +64,10 @@ var C = exports.C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -88,10 +88,10 @@ var default_1 = function () { }()); (function () { __setFunctionName(_classThis, "default_1"); - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); default_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return default_1 = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js index 3457f6d5b62d1..83ef4c41ad474 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2015).js @@ -18,10 +18,10 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js index 04516d046b5bb..f528cc65cda71 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es2022).js @@ -16,10 +16,10 @@ let C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js index 99526d976452d..9a8cac9627877 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-simpleTransformation(target=es5).js @@ -22,10 +22,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js index a8db8110bf283..52048e7b275b2 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js @@ -147,7 +147,7 @@ let C = (() => { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -158,19 +158,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); _y = { value: __runInitializers(_classThis, _static_private_y_initializers, 1) }; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map index 6285591bb25e9..14730d8f88a84 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).js.map @@ -1,6 +1,6 @@ //// [esDecorators-classDeclaration-sourceMap.js.map] -{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;YAgBA,MAAC,kGAAG,CAAC,GAAC;YAIG,yEAAI,CAAC,GAAC;QAqBnB,CAAC;QArCG,MAAM,KAAI,CAAC;QAIX,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;QAIrB,IAAI,CAAC,CAAC,KAAa,IAAI,CAAC;QAQxB,IAAS,CAAC,uEAAK;QAAf,IAAS,CAAC,4EAAK;;;;;;;;;;;8BAlBd,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;yBAGH,GAAG,EACH,GAAG;yBAGH,GAAG,EACH,GAAG;6CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;wCAGH,GAAG,EACH,GAAG;wCAGH,GAAG,EACH,GAAG;QAfJ,+DAAA,yBAAA,cAAkB,CAAC,YAAA,oSAAA;QAInB,8DAAA,uBAAA,cAAkB,OAAO,CAAC,CAAC,CA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ByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyBzZXQgI3godmFsdWU6IG51bWJlcikgeyB9CgogICAgQGRlYwogICAgQGRlYwogICAgc3RhdGljICN5ID0gMTsKCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgYWNjZXNzb3IgI3ogPSAxOwp9Cg== +{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;YAgBA,MAAC,kGAAG,CAAC,GAAC;YAIG,yEAAI,CAAC,GAAC;QAqBnB,CAAC;QArCG,MAAM,KAAI,CAAC;QAIX,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;QAIrB,IAAI,CAAC,CAAC,KAAa,IAAI,CAAC;QAQxB,IAAS,CAAC,uEAAK;QAAf,IAAS,CAAC,4EAAK;;;;;;;;;;;8BAlBd,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;yBAGH,GAAG,EACH,GAAG;yBAGH,GAAG,EACH,GAAG;6CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;wCAGH,GAAG,EACH,GAAG;wCAGH,GAAG,EACH,GAAG;QAfJ,+DAAA,yBAAA,cAAkB,CAAC,YAAA,qSAAA;QAInB,8DAAA,uBAAA,cAAkB,OAAO,CAAC,CAAC,CAAC,CAAC,cAAA,0RAAA;QAI7B,8DAAA,uBAAA,UAAc,KAAa,IAAI,CAAC,cAAA,+SAAA;QAQhC,0DAAA,uBAAA,gGAAuB,cAAA,EAAvB,uBAAA,qGAAuB,cAAA,yYAAA;QApCvB,2KAAA,MAAM,6DAAK;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== //// [esDecorators-classDeclaration-sourceMap.d.ts.map] {"version":3,"file":"esDecorators-classDeclaration-sourceMap.d.ts","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC;AAErB,cAEM,CAAC;;IAGH,MAAM;IAEN,IAEI,CAAC,IAIQ,MAAM,CAJE;IAErB,IAEI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAIxB,CAAC,SAAK;IAIN,QAAQ,CAAC,CAAC,SAAK;CAqBlB"} diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt index 9ac94b3448d21..04cda30faa73e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2015).sourcemap.txt @@ -318,7 +318,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts >>> _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; >>> __setFunctionName(_classThis, "C"); >>> (() => { ->>> const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; +>>> const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; >>> _method_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^ @@ -490,7 +490,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > ^^^ 3 > ^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > static #y = 1; > @@ -504,14 +504,14 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 >Emitted(109, 46) Source(43, 6) + SourceIndex(0) 4 >Emitted(109, 49) Source(43, 9) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^^^^^^^^^^^^^ 5 > ^ 6 > ^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > 3 > @@ -525,9 +525,9 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 4 >Emitted(110, 111) Source(28, 23) + SourceIndex(0) 5 >Emitted(110, 112) Source(28, 24) + SourceIndex(0) 6 >Emitted(110, 124) Source(28, 24) + SourceIndex(0) -7 >Emitted(110, 416) Source(28, 24) + SourceIndex(0) +7 >Emitted(110, 417) Source(28, 24) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -538,8 +538,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 > ^ 9 > ^ 10> ^^^^^^^^^^^^^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^^^^^^^^^^^^^^^^-> +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -565,9 +565,9 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 >Emitted(111, 118) Source(32, 33) + SourceIndex(0) 9 >Emitted(111, 119) Source(32, 34) + SourceIndex(0) 10>Emitted(111, 133) Source(32, 34) + SourceIndex(0) -11>Emitted(111, 414) Source(32, 34) + SourceIndex(0) +11>Emitted(111, 415) Source(32, 34) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -576,8 +576,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 6 > ^^^^ 7 > ^ 8 > ^^^^^^^^^^^^^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^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^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -599,9 +599,9 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 6 >Emitted(112, 113) Source(36, 36) + SourceIndex(0) 7 >Emitted(112, 114) Source(36, 37) + SourceIndex(0) 8 >Emitted(112, 128) Source(36, 37) + SourceIndex(0) -9 >Emitted(112, 430) Source(36, 37) + SourceIndex(0) +9 >Emitted(112, 431) Source(36, 37) + SourceIndex(0) --- ->>> __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); +>>> __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -611,7 +611,7 @@ sourceF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ts 7 >Emitted(113, 225) Source(44, 5) + SourceIndex(0) 8 >Emitted(113, 326) Source(44, 28) + SourceIndex(0) 9 >Emitted(113, 340) Source(44, 28) + SourceIndex(0) -10>Emitted(113, 732) Source(44, 28) + SourceIndex(0) +10>Emitted(113, 733) Source(44, 28) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > method @@ -653,14 +653,14 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 1 >Emitted(114, 9) Source(8, 5) + SourceIndex(0) 2 >Emitted(114, 180) Source(8, 5) + SourceIndex(0) 3 >Emitted(114, 186) Source(8, 11) + SourceIndex(0) -4 >Emitted(114, 246) Source(8, 16) + SourceIndex(0) +4 >Emitted(114, 247) Source(8, 16) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -672,14 +672,14 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 1 >Emitted(115, 9) Source(12, 5) + SourceIndex(0) 2 >Emitted(115, 169) Source(12, 9) + SourceIndex(0) 3 >Emitted(115, 170) Source(12, 10) + SourceIndex(0) -4 >Emitted(115, 230) Source(12, 26) + SourceIndex(0) +4 >Emitted(115, 231) Source(12, 26) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -691,16 +691,16 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 1->Emitted(116, 9) Source(16, 5) + SourceIndex(0) 2 >Emitted(116, 180) Source(16, 9) + SourceIndex(0) 3 >Emitted(116, 181) Source(16, 10) + SourceIndex(0) -4 >Emitted(116, 252) Source(16, 29) + SourceIndex(0) +4 >Emitted(116, 253) Source(16, 29) + SourceIndex(0) --- ->>> __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); +>>> __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -720,11 +720,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 >Emitted(117, 168) Source(24, 15) + SourceIndex(0) 4 >Emitted(117, 197) Source(24, 14) + SourceIndex(0) 5 >Emitted(117, 198) Source(24, 15) + SourceIndex(0) -6 >Emitted(117, 280) Source(24, 20) + SourceIndex(0) +6 >Emitted(117, 281) Source(24, 20) + SourceIndex(0) --- ->>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); +>>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); 1->^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > @dec @@ -744,15 +744,15 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > 2 > static #y = 1; 1->Emitted(118, 9) Source(40, 5) + SourceIndex(0) -2 >Emitted(118, 411) Source(40, 19) + SourceIndex(0) +2 >Emitted(118, 412) Source(40, 19) + SourceIndex(0) --- ->>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); +>>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > y @@ -764,11 +764,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 >Emitted(119, 159) Source(20, 6) + SourceIndex(0) 4 >Emitted(119, 188) Source(20, 5) + SourceIndex(0) 5 >Emitted(119, 189) Source(20, 6) + SourceIndex(0) -6 >Emitted(119, 271) Source(20, 11) + SourceIndex(0) +6 >Emitted(119, 272) Source(20, 11) + SourceIndex(0) --- ->>> __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); +>>> __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); 1 >^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > class C { > @dec @@ -812,10 +812,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > static accessor #z = 1; > } 1 >Emitted(120, 9) Source(5, 1) + SourceIndex(0) -2 >Emitted(120, 181) Source(45, 2) + SourceIndex(0) +2 >Emitted(120, 182) Source(45, 2) + SourceIndex(0) --- >>> C = _classThis = _classDescriptor.value; ->>> if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); +>>> if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); >>> __runInitializers(_classThis, _staticExtraInitializers); 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js index 512265b53a5d4..bb0d257e8a756 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js @@ -132,7 +132,7 @@ let C = (() => { static { __setFunctionName(this, "C"); } static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -143,19 +143,19 @@ let C = (() => { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); } method() { } diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map index d58150cb9dc96..e8f8ee2251d59 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).js.map @@ -1,6 +1,6 @@ //// [esDecorators-classDeclaration-sourceMap.js.map] -{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAEC,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;iDAGH,GAAG,EACH,GAAG;gDAGH,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HsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHkgPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIGFjY2Vzc29yIHogPSAxOwoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyAjbWV0aG9kKCkge30KCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgZ2V0ICN4KCkgeyByZXR1cm4gMTsgfQoKICAgIEBkZWMKICAgIEBkZWMKICAgIHN0YXRpYyBzZXQgI3godmFsdWU6IG51bWJlcikgeyB9CgogICAgQGRlYwogICAgQGRlYwogICAgc3RhdGljICN5ID0gMTsKCiAgICBAZGVjCiAgICBAZGVjCiAgICBzdGF0aWMgYWNjZXNzb3IgI3ogPSAxOwp9Cg== +{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAEC,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;iDAGH,GAAG,EACH,GAAG;gDAGH,GAAG,EACH,GAAG;gDAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;YAfJ,yDAAA,yBAAA,cAAkB,CAAC,YAAA,qSAAA;YAInB,wDAAA,uBAAA,cAAkB,OAAO,CAAC,CAAC,CAAC,CAAC,cAAA,0RAAA;YAI7B,wDAAA,uBAAA,UAAc,KAAa,IAAI,CAAC,cAAA,+SAAA;YAQhC,oDAAA,uBAAA,0FAAuB,cAAA,EAAvB,uBAAA,+FAAuB,cAAA,yYAAA;YApCvB,qKAAA,MAAM,6DAAK;YAIX,0JAAI,CAAC,6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YWNjZXNzb3IgI3ogPSAxOwp9Cg== //// [esDecorators-classDeclaration-sourceMap.d.ts.map] {"version":3,"file":"esDecorators-classDeclaration-sourceMap.d.ts","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC;AAErB,cAEM,CAAC;;IAGH,MAAM;IAEN,IAEI,CAAC,IAIQ,MAAM,CAJE;IAErB,IAEI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAIxB,CAAC,SAAK;IAIN,QAAQ,CAAC,CAAC,SAAK;CAqBlB"} diff --git a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt index 653845d7f5904..7134da86eba9c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt +++ b/tests/baselines/reference/esDecorators-classDeclaration-sourceMap(target=es2022).sourcemap.txt @@ -117,7 +117,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts >>> static { __setFunctionName(this, "C"); } >>> static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } >>> static { ->>> const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; +>>> const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; >>> _method_decorators = [dec, dec]; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^ @@ -291,7 +291,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 2 > ^^^ 3 > ^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > static #y = 1; > @@ -305,14 +305,14 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 >Emitted(94, 50) Source(43, 6) + SourceIndex(0) 4 >Emitted(94, 53) Source(43, 9) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^^^^^^^^^^^^^ 5 > ^ 6 > ^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > 3 > @@ -326,9 +326,9 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 4 >Emitted(95, 109) Source(28, 23) + SourceIndex(0) 5 >Emitted(95, 110) Source(28, 24) + SourceIndex(0) 6 >Emitted(95, 122) Source(28, 24) + SourceIndex(0) -7 >Emitted(95, 414) Source(28, 24) + SourceIndex(0) +7 >Emitted(95, 415) Source(28, 24) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -339,8 +339,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 > ^ 9 > ^ 10> ^^^^^^^^^^^^^^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^^^^^^^^^^^^^^^^-> +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -366,9 +366,9 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 8 >Emitted(96, 116) Source(32, 33) + SourceIndex(0) 9 >Emitted(96, 117) Source(32, 34) + SourceIndex(0) 10>Emitted(96, 131) Source(32, 34) + SourceIndex(0) -11>Emitted(96, 412) Source(32, 34) + SourceIndex(0) +11>Emitted(96, 413) Source(32, 34) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^ @@ -377,8 +377,8 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 6 > ^^^^ 7 > ^ 8 > ^^^^^^^^^^^^^^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^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^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -400,9 +400,9 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 6 >Emitted(97, 111) Source(36, 36) + SourceIndex(0) 7 >Emitted(97, 112) Source(36, 37) + SourceIndex(0) 8 >Emitted(97, 126) Source(36, 37) + SourceIndex(0) -9 >Emitted(97, 428) Source(36, 37) + SourceIndex(0) +9 >Emitted(97, 429) Source(36, 37) + SourceIndex(0) --- ->>> __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); +>>> __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^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^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > @dec @@ -440,13 +440,13 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 7 >Emitted(98, 217) Source(44, 5) + SourceIndex(0) 8 >Emitted(98, 312) Source(44, 28) + SourceIndex(0) 9 >Emitted(98, 326) Source(44, 28) + SourceIndex(0) -10>Emitted(98, 718) Source(44, 28) + SourceIndex(0) +10>Emitted(98, 719) Source(44, 28) + SourceIndex(0) --- ->>> __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); +>>> __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > method @@ -454,14 +454,14 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 1 >Emitted(99, 13) Source(8, 5) + SourceIndex(0) 2 >Emitted(99, 178) Source(8, 5) + SourceIndex(0) 3 >Emitted(99, 184) Source(8, 11) + SourceIndex(0) -4 >Emitted(99, 244) Source(8, 16) + SourceIndex(0) +4 >Emitted(99, 245) Source(8, 16) + SourceIndex(0) --- ->>> __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); +>>> __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > @dec @@ -473,14 +473,14 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 1 >Emitted(100, 13) Source(12, 5) + SourceIndex(0) 2 >Emitted(100, 167) Source(12, 9) + SourceIndex(0) 3 >Emitted(100, 168) Source(12, 10) + SourceIndex(0) -4 >Emitted(100, 228) Source(12, 26) + SourceIndex(0) +4 >Emitted(100, 229) Source(12, 26) + SourceIndex(0) --- ->>> __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); +>>> __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -492,16 +492,16 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 1->Emitted(101, 13) Source(16, 5) + SourceIndex(0) 2 >Emitted(101, 178) Source(16, 9) + SourceIndex(0) 3 >Emitted(101, 179) Source(16, 10) + SourceIndex(0) -4 >Emitted(101, 250) Source(16, 29) + SourceIndex(0) +4 >Emitted(101, 251) Source(16, 29) + SourceIndex(0) --- ->>> __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); +>>> __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @dec @@ -521,11 +521,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 >Emitted(102, 166) Source(24, 15) + SourceIndex(0) 4 >Emitted(102, 195) Source(24, 14) + SourceIndex(0) 5 >Emitted(102, 196) Source(24, 15) + SourceIndex(0) -6 >Emitted(102, 278) Source(24, 20) + SourceIndex(0) +6 >Emitted(102, 279) Source(24, 20) + SourceIndex(0) --- ->>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); +>>> __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); 1->^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > @dec @@ -545,15 +545,15 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > 2 > static #y = 1; 1->Emitted(103, 13) Source(40, 5) + SourceIndex(0) -2 >Emitted(103, 415) Source(40, 19) + SourceIndex(0) +2 >Emitted(103, 416) Source(40, 19) + SourceIndex(0) --- ->>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); +>>> __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > 3 > y @@ -565,11 +565,11 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts 3 >Emitted(104, 163) Source(20, 6) + SourceIndex(0) 4 >Emitted(104, 192) Source(20, 5) + SourceIndex(0) 5 >Emitted(104, 193) Source(20, 6) + SourceIndex(0) -6 >Emitted(104, 275) Source(20, 11) + SourceIndex(0) +6 >Emitted(104, 276) Source(20, 11) + SourceIndex(0) --- ->>> __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); +>>> __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); 1 >^^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > class C { > @dec @@ -613,10 +613,10 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts > static accessor #z = 1; > } 1 >Emitted(105, 13) Source(5, 1) + SourceIndex(0) -2 >Emitted(105, 173) Source(45, 2) + SourceIndex(0) +2 >Emitted(105, 174) Source(45, 2) + SourceIndex(0) --- >>> C = _classThis = _classDescriptor.value; ->>> if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); +>>> if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); >>> __runInitializers(_classThis, _staticExtraInitializers); 1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js index 1f94026e17066..e515763512da9 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js @@ -32,10 +32,10 @@ const method = "method"; let _classSuper = Base; var C = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js index c3f5930ea5d99..238b9ac227381 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js @@ -39,10 +39,10 @@ class C3 extends ((() => {}) as any) { }); var C1 = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper, "name", _classThis); @@ -62,10 +62,10 @@ class C3 extends ((() => {}) as any) { let _classSuper_1 = (0, function () { }); var C2 = class extends _classSuper_1 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper_1, "name", _classThis_1); @@ -85,10 +85,10 @@ class C3 extends ((() => {}) as any) { let _classSuper_2 = (0, (() => { })); var C3 = class extends _classSuper_2 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { Reflect.get(_classSuper_2, "name", _classThis_2); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js index f8046a13e3ca3..f128718ba237b 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js @@ -55,10 +55,10 @@ const x = "x"; let _classSuper = Base; var C = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s; diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js index ceaf9630126f7..85a8d3afb5621 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js @@ -30,10 +30,10 @@ const method = "method"; let _classSuper = Base; var C = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper, "method", _classThis).call(_classThis); static b = Reflect.get(_classSuper, "method", _classThis).call(_classThis); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js index 5c035f00444be..10ebe5d29c37c 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js @@ -59,10 +59,10 @@ const x = "x"; let _classSuper = Base; var C1 = class extends _classSuper { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper, "x", _classThis); static b = (() => { @@ -105,10 +105,10 @@ const x = "x"; let _classSuper_1 = Base; var C2 = class extends _classSuper_1 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper_1, "x", _classThis_1); static b = (() => { @@ -151,10 +151,10 @@ const x = "x"; let _classSuper_2 = Base; var C3 = class extends _classSuper_2 { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static a = Reflect.get(_classSuper_2, x, _classThis_2); static b = (() => { diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js index 7dee3db7850b2..b73ef49493ca1 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js @@ -36,10 +36,10 @@ class C extends Base { let _classThis; var C = class extends Base { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } static m() { super.method(); } diff --git a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js index 9f54045d09db2..bbcd0d1eddd9f 100644 --- a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2015).js @@ -136,7 +136,7 @@ class C { _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }, __setFunctionName(_classThis, "C"), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -147,19 +147,19 @@ class C { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(_classThis, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(_classThis, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(), /*29*/ diff --git a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js index 101aab4418634..6c8b9450b30d6 100644 --- a/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classExpression-commentPreservation(target=es2022).js @@ -115,7 +115,7 @@ class C { var C = (_a = class { static { _method_get = function _method_get() { return _static_private_method_descriptor.value; }, _x_get = function _x_get() { return _static_private_get_x_descriptor.get.call(this); }, _x_set = function _x_set(value) { return _static_private_set_x_descriptor.set.call(this, value); }, _z_get = function _z_get() { return _static_private_z_descriptor.get.call(this); }, _z_set = function _z_set(value) { return _static_private_z_descriptor.set.call(this, value); }; } static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec, dec]; _get_x_decorators = [dec, dec]; _set_x_decorators = [dec, dec]; @@ -126,19 +126,19 @@ class C { _static_private_set_x_decorators = [dec, dec]; _static_private_y_decorators = [dec, dec]; _static_private_z_decorators = [dec, dec]; - __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: metadata }, _static_private_z_initializers, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: metadata }, _z_initializers, _instanceExtraInitializers); - __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: metadata }, _static_private_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, _static_private_method_descriptor = { value: __setFunctionName(function () { }, "#method") }, _static_private_method_decorators, { kind: "method", name: "#method", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _method_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_get_x_descriptor = { get: __setFunctionName(function () { return 1; }, "#x", "get") }, _static_private_get_x_decorators, { kind: "getter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _x_get) }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_set_x_descriptor = { set: __setFunctionName(function (value) { }, "#x", "set") }, _static_private_set_x_decorators, { kind: "setter", name: "#x", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _x_set); } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, _static_private_z_descriptor = { get: __setFunctionName(function () { return __classPrivateFieldGet(this, _classThis, "f", _z_accessor_storage); }, "#z", "get"), set: __setFunctionName(function (value) { __classPrivateFieldSet(this, _classThis, value, "f", _z_accessor_storage); }, "#z", "set") }, _static_private_z_decorators, { kind: "accessor", name: "#z", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "a", _z_get), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "a", _z_set); } }, metadata: _metadata }, _static_private_z_initializers, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _get_x_decorators, { kind: "getter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, get: obj => obj.x }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _z_decorators, { kind: "accessor", name: "z", static: false, private: false, access: { has: obj => "z" in obj, get: obj => obj.z, set: (obj, value) => { obj.z = value; } }, metadata: _metadata }, _z_initializers, _instanceExtraInitializers); + __esDecorate(null, null, _static_private_y_decorators, { kind: "field", name: "#y", static: true, private: true, access: { has: obj => __classPrivateFieldIn(_classThis, obj), get: obj => __classPrivateFieldGet(obj, _classThis, "f", _y), set: (obj, value) => { __classPrivateFieldSet(obj, _classThis, value, "f", _y); } }, metadata: _metadata }, _static_private_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); } /*5*/ diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js index 0b5ee1892a11f..bed5df27d04c5 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.1.js @@ -24,10 +24,10 @@ exports.C = (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js index c6e3d19ae5cb0..9db21684e229d 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.10.js @@ -27,10 +27,10 @@ C &&= (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js index 332f05c0deeda..c5013296c2457 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.11.js @@ -27,10 +27,10 @@ C ??= (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js index f0aceb4b5046f..df19da3e92ece 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.12.js @@ -24,10 +24,10 @@ function f(C = (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js index e88523252e544..96c21e2f2cf06 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.13.js @@ -24,10 +24,10 @@ exports.C = (((() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js index 00d8a118653f4..8a1298187dea6 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.14.js @@ -26,10 +26,10 @@ const tslib_1 = require("tslib"); var class_1 = class { static { tslib_1.__setFunctionName(this, _a); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js index 516f52356b662..47d5012276bea 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.15.js @@ -25,10 +25,10 @@ class C { var class_1 = class { static { tslib_1.__setFunctionName(this, "D"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js index b065d740b9927..c6d9b1f3a1079 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.16.js @@ -27,10 +27,10 @@ class C { var class_1 = class { static { tslib_1.__setFunctionName(this, _a); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js index 3ca0d0b78a816..6b95c18ab4d5f 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.17.js @@ -28,10 +28,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js index 9b4259196fcfe..345d11217b4aa 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.2.js @@ -23,10 +23,10 @@ exports.C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js index 375284fb6a791..fcce71d39d1e4 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.3.js @@ -23,10 +23,10 @@ exports.default = ((() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "default"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js index 583fa12c3352b..7de30600ab03f 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.4.js @@ -27,10 +27,10 @@ C = (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js index ddbf5cc852285..7968160ab7319 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.5.js @@ -27,10 +27,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js index 42bcd245a2250..640021bf2d535 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.6.js @@ -24,10 +24,10 @@ const tslib_1 = require("tslib"); var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js index 6e3d1cfa1fa54..88b6b52984ac9 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.7.js @@ -27,10 +27,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js index 83f2bac583153..5788189274832 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.8.js @@ -27,10 +27,10 @@ var C; var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js index 1181a52a25ed4..24825c7baaea9 100644 --- a/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js +++ b/tests/baselines/reference/esDecorators-classExpression-missingEmitHelpers-classDecorator.9.js @@ -27,10 +27,10 @@ C ||= (() => { var class_1 = class { static { tslib_1.__setFunctionName(this, "C"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + tslib_1.__esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); tslib_1.__runInitializers(_classThis, _classExtraInitializers); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js index b316f6f14f287..4413a6e611894 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.1.js @@ -42,10 +42,10 @@ x = (() => { var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -58,10 +58,10 @@ x = (() => { return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -76,10 +76,10 @@ x &&= (() => { var class_2 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -92,10 +92,10 @@ x &&= (() => { return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -110,10 +110,10 @@ x ||= (() => { var class_3 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -126,10 +126,10 @@ x ||= (() => { return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_2); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; @@ -144,10 +144,10 @@ x ??= (() => { var class_4 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_3); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_3); class_4 = _classThis_3 = _classDescriptor_3.value; - if (metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_3, _classExtraInitializers_3); } }; @@ -160,10 +160,10 @@ x ??= (() => { return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_3); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_3); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_3), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js index f413aab01a0f6..91f05e35ef744 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.10.js @@ -48,10 +48,10 @@ var _a, _b; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -69,10 +69,10 @@ var _a, _b; var class_2 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -90,10 +90,10 @@ var _a, _b; var class_3 = class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -111,10 +111,10 @@ var _a, _b; var class_4 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_3); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_3); class_4 = _classThis_3 = _classDescriptor_3.value; - if (metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_3, _classExtraInitializers_3); } }; @@ -132,10 +132,10 @@ var _a, _b; var class_5 = class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_4); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_4); class_5 = _classThis_4 = _classDescriptor_4.value; - if (metadata) Object.defineProperty(_classThis_4, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_4, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_4, _classExtraInitializers_4); } }; @@ -154,10 +154,10 @@ var _a, _b; var class_6 = class { static { __setFunctionName(this, _a); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_5); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_5); class_6 = _classThis_5 = _classDescriptor_5.value; - if (metadata) Object.defineProperty(_classThis_5, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_5, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_5, _classExtraInitializers_5); } }; @@ -176,10 +176,10 @@ var _a, _b; var class_7 = class { static { __setFunctionName(this, "__proto__"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_6); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_6); class_7 = _classThis_6 = _classDescriptor_6.value; - if (metadata) Object.defineProperty(_classThis_6, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_6, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_6, _classExtraInitializers_6); } }; @@ -197,10 +197,10 @@ var _a, _b; var class_8 = class { static { __setFunctionName(this, "__proto__"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_7); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_7); class_8 = _classThis_7 = _classDescriptor_7.value; - if (metadata) Object.defineProperty(_classThis_7, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_7, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_7, _classExtraInitializers_7); } }; @@ -217,10 +217,10 @@ var _a, _b; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -236,10 +236,10 @@ var _a, _b; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -255,10 +255,10 @@ var _a, _b; return class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_2); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; @@ -274,10 +274,10 @@ var _a, _b; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_3); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_3); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_3), __runInitializers(this, _y_initializers, void 0)); }; @@ -293,10 +293,10 @@ var _a, _b; return class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_4); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_4); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_4), __runInitializers(this, _y_initializers, void 0)); }; @@ -314,10 +314,10 @@ var _a, _b; var class_9 = class { static { __setFunctionName(this, _b); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_8); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_8); class_9 = _classThis_8 = _classDescriptor_8.value; - if (metadata) Object.defineProperty(_classThis_8, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_8, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_8, _classExtraInitializers_8); } }; @@ -335,10 +335,10 @@ var _a, _b; return class { static { __setFunctionName(this, "__proto__"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_5); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_5); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_5), __runInitializers(this, _y_initializers, void 0)); }; @@ -354,10 +354,10 @@ var _a, _b; return class { static { __setFunctionName(this, "__proto__"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_6); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_6); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_6), __runInitializers(this, _y_initializers, void 0)); }; @@ -372,10 +372,10 @@ var _a, _b; let _static_x_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _static_x_decorators = [dec]; - __esDecorate(null, null, _static_x_decorators, { kind: "field", name: "x", static: true, private: false, access: { has: obj => "x" in obj, get: obj => obj.x, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, _static_x_initializers, _staticExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _static_x_decorators, { kind: "field", name: "x", static: true, private: false, access: { has: obj => "x" in obj, get: obj => obj.x, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, _static_x_initializers, _staticExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(this, _staticExtraInitializers); } static x = __runInitializers(this, _static_x_initializers, (() => { @@ -386,10 +386,10 @@ var _a, _b; var class_10 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_9 = { value: this }, _classDecorators_9, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_9); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_9 = { value: this }, _classDecorators_9, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_9); class_10 = _classThis_9 = _classDescriptor_9.value; - if (metadata) Object.defineProperty(_classThis_9, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_9, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_9, _classExtraInitializers_9); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js index fd7c9f5703d23..08177ab3a2084 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.11.js @@ -24,10 +24,10 @@ declare let dec: any; var class_1 = class { static { __setFunctionName(this, ""); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -39,10 +39,10 @@ declare let dec: any; let _y_initializers = []; return class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -55,10 +55,10 @@ declare let dec: any; let _classThis_1; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -70,10 +70,10 @@ declare let dec: any; let _y_initializers = []; return class C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js index 9e8a9fca92b04..7165499bcebec 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.2.js @@ -46,10 +46,10 @@ let x, f; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -62,10 +62,10 @@ let x, f; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -78,10 +78,10 @@ let x, f; var class_2 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -94,10 +94,10 @@ let x, f; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -110,10 +110,10 @@ let x, f; var class_3 = class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -126,10 +126,10 @@ let x, f; return class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_2); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; @@ -142,10 +142,10 @@ let x, f; var class_4 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_3); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_3 = { value: this }, _classDecorators_3, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_3); class_4 = _classThis_3 = _classDescriptor_3.value; - if (metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_3, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_3, _classExtraInitializers_3); } }; @@ -158,10 +158,10 @@ let x, f; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_3); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_3); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_3), __runInitializers(this, _y_initializers, void 0)); }; @@ -174,10 +174,10 @@ let x, f; var class_5 = class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_4); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_4 = { value: this }, _classDecorators_4, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_4); class_5 = _classThis_4 = _classDescriptor_4.value; - if (metadata) Object.defineProperty(_classThis_4, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_4, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_4, _classExtraInitializers_4); } }; @@ -190,10 +190,10 @@ let x, f; return class { static { __setFunctionName(this, "0"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_4); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_4); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_4), __runInitializers(this, _y_initializers, void 0)); }; @@ -206,10 +206,10 @@ let x, f; var class_6 = class { static { __setFunctionName(this, _a); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_5); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_5 = { value: this }, _classDecorators_5, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_5); class_6 = _classThis_5 = _classDescriptor_5.value; - if (metadata) Object.defineProperty(_classThis_5, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_5, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_5, _classExtraInitializers_5); } }; @@ -222,10 +222,10 @@ let x, f; return class { static { __setFunctionName(this, _b); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_5); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_5); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_5), __runInitializers(this, _y_initializers, void 0)); }; @@ -239,10 +239,10 @@ let x, f; var class_7 = class { static { __setFunctionName(this, ""); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_6); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_6 = { value: this }, _classDecorators_6, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_6); class_7 = _classThis_6 = _classDescriptor_6.value; - if (metadata) Object.defineProperty(_classThis_6, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_6, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_6, _classExtraInitializers_6); } }; @@ -256,10 +256,10 @@ let x, f; var class_8 = class { static { __setFunctionName(this, ""); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_7); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_7 = { value: this }, _classDecorators_7, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_7); class_8 = _classThis_7 = _classDescriptor_7.value; - if (metadata) Object.defineProperty(_classThis_7, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_7, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_7, _classExtraInitializers_7); } }; @@ -274,10 +274,10 @@ let x, f; var class_9 = class { static { __setFunctionName(this, "__proto__"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_8); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_8 = { value: this }, _classDecorators_8, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_8); class_9 = _classThis_8 = _classDescriptor_8.value; - if (metadata) Object.defineProperty(_classThis_8, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_8, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_8, _classExtraInitializers_8); } }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js index d6a1d0a0683b7..904439e087b72 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.3.js @@ -31,10 +31,10 @@ declare let dec: any; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -49,10 +49,10 @@ declare let dec: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -67,10 +67,10 @@ declare let dec: any; var class_2 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -85,10 +85,10 @@ declare let dec: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -105,10 +105,10 @@ declare let dec: any; var class_3 = class { static { __setFunctionName(this, "x2"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -123,10 +123,10 @@ declare let dec: any; return class { static { __setFunctionName(this, "x1"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_2); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js index 9720bf371664e..7396da8ac6aca 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.4.js @@ -32,10 +32,10 @@ declare let dec: any, obj: any; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -50,10 +50,10 @@ declare let dec: any, obj: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; @@ -70,10 +70,10 @@ declare let dec: any, obj: any; var class_2 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); class_2 = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; @@ -88,10 +88,10 @@ declare let dec: any, obj: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_1), __runInitializers(this, _y_initializers, void 0)); }; @@ -106,10 +106,10 @@ declare let dec: any, obj: any; var class_3 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_2); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); class_3 = _classThis_2 = _classDescriptor_2.value; - if (metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_2, _classExtraInitializers_2); } }; @@ -124,10 +124,10 @@ declare let dec: any, obj: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_2); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_2); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers_2), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js index 612e23c68127a..198975caa0bf2 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.5.js @@ -21,10 +21,10 @@ declare let dec: any, obj: any, x: any; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -37,10 +37,10 @@ declare let dec: any, obj: any, x: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js index ca6fada385d2c..cf4c4b15e04d6 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.6.js @@ -21,10 +21,10 @@ declare let dec: any, obj: any, x: any; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -37,10 +37,10 @@ declare let dec: any, obj: any, x: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js index b825a1f398ef0..44b5b20759d7f 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.7.js @@ -21,10 +21,10 @@ declare let dec: any, obj: any, x: any; var class_1 = class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -37,10 +37,10 @@ declare let dec: any, obj: any, x: any; return class { static { __setFunctionName(this, "x"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js index 9737c3cbef744..0ca153e21cafa 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.8.js @@ -27,10 +27,10 @@ export default ((() => { var class_1 = class { static { __setFunctionName(this, "default"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -46,10 +46,10 @@ export default ((() => { return class { static { __setFunctionName(this, "default"); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js index 2be959f660ce6..0832d32e4406e 100644 --- a/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js +++ b/tests/baselines/reference/esDecorators-classExpression-namedEvaluation.9.js @@ -20,10 +20,10 @@ module.exports = (() => { var class_1 = class { static { __setFunctionName(this, ""); - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); class_1 = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -37,10 +37,10 @@ module.exports = (() => { let _y_initializers = []; return class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _y_decorators = [dec]; - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, void 0)); }; diff --git a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js index bd351874c7ea6..7cdc725d6cd58 100644 --- a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js +++ b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2015).js @@ -75,22 +75,22 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _static_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); _classThis.y = __runInitializers(_classThis, _static_y_initializers, void 0); @@ -125,22 +125,22 @@ let C = (() => { }, __setFunctionName(_classThis_1, "C"), (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers_1); - __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers_1); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers_1); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers_1); + __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers_1); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _static_y_initializers, _staticExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _staticExtraInitializers_1); })(), _classThis_1.y = __runInitializers(_classThis_1, _static_y_initializers, void 0), diff --git a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js index 4cbb1774157de..49134a38e2dda 100644 --- a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js +++ b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es2022).js @@ -66,22 +66,22 @@ let C = (() => { let _y_initializers = []; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _static_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); } constructor(x) { } @@ -114,22 +114,22 @@ let C = (() => { let _y_initializers = []; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _staticExtraInitializers_1); - __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers_1); - __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: metadata }, null, _instanceExtraInitializers_1); - __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers_1); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers_1); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + __esDecorate(this, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _staticExtraInitializers_1); + __esDecorate(this, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _staticExtraInitializers_1); + __esDecorate(this, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: obj => "method" in obj, get: obj => obj.method }, metadata: _metadata }, null, _instanceExtraInitializers_1); + __esDecorate(this, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: obj => "x" in obj, set: (obj, value) => { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers_1); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _static_y_initializers, _staticExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: obj => "y" in obj, get: obj => obj.y, set: (obj, value) => { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _staticExtraInitializers_1); } constructor(x) { } diff --git a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js index dff88d7bb542f..1751cd3f33dd0 100644 --- a/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js +++ b/tests/baselines/reference/esDecorators-emitDecoratorMetadata(target=es5).js @@ -85,22 +85,22 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers); - __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: _metadata }, null, _staticExtraInitializers); + __esDecorate(_classThis, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(_classThis, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: _metadata }, _static_y_initializers, _staticExtraInitializers); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _staticExtraInitializers); })(); _classThis.y = __runInitializers(_classThis, _static_y_initializers, void 0); @@ -144,22 +144,22 @@ var C = function () { }()), __setFunctionName(_classThis_1, "C"), (function () { - var metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _method_decorators = [dec]; _set_x_decorators = [dec]; _y_decorators = [dec]; _static_method_decorators = [dec]; _static_set_x_decorators = [dec]; _static_y_decorators = [dec]; - __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _staticExtraInitializers_1); - __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: metadata }, null, _instanceExtraInitializers_1); - __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: metadata }, null, _instanceExtraInitializers_1); - __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _static_y_initializers, _staticExtraInitializers_1); - __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: metadata }, _y_initializers, _instanceExtraInitializers_1); - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_method_decorators, { kind: "method", name: "method", static: true, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: _metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _static_set_x_decorators, { kind: "setter", name: "x", static: true, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: _metadata }, null, _staticExtraInitializers_1); + __esDecorate(_classThis_1, null, _method_decorators, { kind: "method", name: "method", static: false, private: false, access: { has: function (obj) { return "method" in obj; }, get: function (obj) { return obj.method; } }, metadata: _metadata }, null, _instanceExtraInitializers_1); + __esDecorate(_classThis_1, null, _set_x_decorators, { kind: "setter", name: "x", static: false, private: false, access: { has: function (obj) { return "x" in obj; }, set: function (obj, value) { obj.x = value; } }, metadata: _metadata }, null, _instanceExtraInitializers_1); + __esDecorate(null, null, _static_y_decorators, { kind: "field", name: "y", static: true, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: _metadata }, _static_y_initializers, _staticExtraInitializers_1); + __esDecorate(null, null, _y_decorators, { kind: "field", name: "y", static: false, private: false, access: { has: function (obj) { return "y" in obj; }, get: function (obj) { return obj.y; }, set: function (obj, value) { obj.y = value; } }, metadata: _metadata }, _y_initializers, _instanceExtraInitializers_1); + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); C = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _staticExtraInitializers_1); })(), _classThis_1.y = __runInitializers(_classThis_1, _static_y_initializers, void 0), diff --git a/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js index 416decc4dafef..bd929d9ae520a 100644 --- a/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata1(target=es2015).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - function meta(key: string, value: string) { return (_, context) => { context.metadata[key] = value; @@ -80,12 +76,12 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _m_decorators = [meta('b', 'y')]; - __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js index 30584eb25a430..95c942ae1034b 100644 --- a/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata1(target=es2022).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - function meta(key: string, value: string) { return (_, context) => { context.metadata[key] = value; @@ -70,12 +66,12 @@ let C = (() => { let _m_decorators; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _m_decorators = [meta('b', 'y')]; - __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } m() { } diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js index 7c379259cec06..cd4f0e9c9491f 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - function meta(key: string, value: string) { return (_, context) => { context.metadata[key] = value; @@ -88,12 +84,12 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _m_decorators = [meta('b', 'y')]; - __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; @@ -101,10 +97,10 @@ let C = (() => { C[Symbol.metadata].a; // 'x' C[Symbol.metadata].b; // 'y' let D = (() => { - var _a; + var _a, _b; let _instanceExtraInitializers_1 = []; let _m_decorators; - return _a = class D extends C { + return _a = class D extends (_b = C) { m() { } constructor() { super(...arguments); @@ -112,10 +108,10 @@ let D = (() => { } }, (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_a[Symbol.metadata]) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(Reflect.get(_b, Symbol.metadata, _a)) : void 0; _m_decorators = [meta('b', 'z')]; - __esDecorate(_a, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(_a, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(_a, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); })(), _a; })(); diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js index ed96be3e99444..a29a41d34615d 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - function meta(key: string, value: string) { return (_, context) => { context.metadata[key] = value; @@ -78,12 +74,12 @@ let C = (() => { let _m_decorators; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _m_decorators = [meta('b', 'y')]; - __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } m() { } @@ -100,10 +96,10 @@ let D = (() => { let _m_decorators; return class D extends C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; _m_decorators = [meta('b', 'z')]; - __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers_1); - if (metadata) Object.defineProperty(this, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers_1); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } m() { } constructor() { diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js index 3caeb5d7debb6..8ca63da31178a 100644 --- a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - function appendMeta(key: string, value: string) { return (_, context) => { const existing = context.metadata[key] ?? []; @@ -13,10 +9,12 @@ function appendMeta(key: string, value: string) { } @appendMeta('a', 'x') -class C { } +class C { +} @appendMeta('a', 'z') -class D extends C { } +class D extends C { +} C[Symbol.metadata].a; // ['x'] D[Symbol.metadata].a; // ['x', 'z'] @@ -77,27 +75,28 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; })(); let D = (() => { + var _a; let _classDecorators_1 = [appendMeta('a', 'z')]; let _classDescriptor_1; let _classExtraInitializers_1 = []; let _classThis_1; - var D = _classThis_1 = class extends C { + var D = _classThis_1 = class extends (_a = C) { }; __setFunctionName(_classThis_1, "D"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classThis_1[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(Reflect.get(_a, Symbol.metadata, _classThis_1)) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); D = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); })(); return D = _classThis_1; diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js index 5c2aa27dd6928..7fd60d8524b8b 100644 --- a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - function appendMeta(key: string, value: string) { return (_, context) => { const existing = context.metadata[key] ?? []; @@ -13,10 +9,12 @@ function appendMeta(key: string, value: string) { } @appendMeta('a', 'x') -class C { } +class C { +} @appendMeta('a', 'z') -class D extends C { } +class D extends C { +} C[Symbol.metadata].a; // ['x'] D[Symbol.metadata].a; // ['x', 'z'] @@ -70,10 +68,10 @@ let C = (() => { let _classThis; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } }; @@ -86,10 +84,10 @@ let D = (() => { let _classThis_1; var D = class extends C { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(this[Symbol.metadata]) : undefined; - __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers_1); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); D = _classThis_1 = _classDescriptor_1.value; - if (metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis_1, _classExtraInitializers_1); } }; diff --git a/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js index 1f533009eb46c..ad33dcd9fe4fd 100644 --- a/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata4(target=es2015).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - const PRIVATE_METADATA = new WeakMap(); function meta(key: string, value: string) { @@ -95,12 +91,12 @@ let C = (() => { }; __setFunctionName(_classThis, "C"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _m_decorators = [meta('b', 'y')]; - __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(_classThis, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return C = _classThis; diff --git a/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js index 9e70c2f7ece58..d412891729338 100644 --- a/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata4(target=es2022).js @@ -1,10 +1,6 @@ //// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts] //// //// [foo.ts] -interface SymbolConstructor { - readonly metadata: string; -} - const PRIVATE_METADATA = new WeakMap(); function meta(key: string, value: string) { @@ -85,12 +81,12 @@ let C = (() => { let _m_decorators; var C = class { static { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; _m_decorators = [meta('b', 'y')]; - __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: metadata }, null, _instanceExtraInitializers); - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: metadata }, null, _classExtraInitializers); + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); } m() { } diff --git a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js index 2fb4a9cc6cb09..2836169512df2 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js @@ -111,7 +111,7 @@ default: undefined --lib Specify a set of bundled library declaration files that describe the target runtime environment. -one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, esnext.intl, decorators, decorators.legacy +one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, esnext.intl, esnext.decorators, decorators, decorators.legacy default: undefined --allowJs diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js index 0c77e3ad9331a..fa2abe62d18cd 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js @@ -111,7 +111,7 @@ default: undefined --lib Specify a set of bundled library declaration files that describe the target runtime environment. -one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, esnext.intl, decorators, decorators.legacy +one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, esnext.intl, esnext.decorators, decorators, decorators.legacy default: undefined --allowJs diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index 0c77e3ad9331a..fa2abe62d18cd 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -111,7 +111,7 @@ default: undefined --lib Specify a set of bundled library declaration files that describe the target runtime environment. -one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, esnext.intl, decorators, decorators.legacy +one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, es2023.collection/esnext.collection, esnext.intl, esnext.decorators, decorators, decorators.legacy default: undefined --allowJs diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js index f456523263b11..a67160299a7df 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-diagnostics-and-emit-for-decorators.js @@ -128,10 +128,10 @@ export let A = (() => { }; __setFunctionName(_classThis, "A"); (() => { - const metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : undefined; - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: metadata }, null, _classExtraInitializers); + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); A = _classThis = _classDescriptor.value; - if (metadata) Object.defineProperty(_classThis, Symbol.metadata, { configurable: true, writable: true, enumerable: true, value: metadata }); + if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); __runInitializers(_classThis, _classExtraInitializers); })(); return A = _classThis; diff --git a/tests/baselines/reference/tsserver/telemetry/does-not-expose-paths.js b/tests/baselines/reference/tsserver/telemetry/does-not-expose-paths.js index 31410efa3eff0..f676d2c16b800 100644 --- a/tests/baselines/reference/tsserver/telemetry/does-not-expose-paths.js +++ b/tests/baselines/reference/tsserver/telemetry/does-not-expose-paths.js @@ -430,7 +430,7 @@ Info seq [hh:mm:ss:mss] event: "line": 1, "offset": 431 }, - "text": "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'.", + "text": "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.date', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'es2023.collection', 'esnext.array', 'esnext.collection', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'esnext.decorators', 'decorators', 'decorators.legacy'.", "code": 6046, "category": "error", "fileName": "/tsconfig.json" diff --git a/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js b/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js index 478fdaddfec29..a9e32fed64c04 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js +++ b/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js @@ -57,7 +57,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 _a, _b, _c; +var _a, _b, _c, _d, _e; let C = class C { }; C.a = 1; @@ -65,7 +65,7 @@ C.b = (void 0).a + 1; C = __decorate([ foo ], C); -let D = class D extends C { +let D = _a = class D extends (_b = C) { static foo() { return this.c + 1; } @@ -78,7 +78,7 @@ let D = class D extends C { }; D.c = 2; D.d = (void 0).c + 1; -D.e = (void 0).a + (void 0).c + 1; +D.e = Reflect.get(_b, "a", _a) + (void 0).c + 1; D.f = () => (void 0).c + 1; D.ff = function () { this.c + 1; }; D = __decorate([ @@ -86,10 +86,10 @@ D = __decorate([ ], D); class CC { } -_a = CC; +_c = CC; CC.a = 1; -CC.b = _a.a + 1; -class DD extends (_c = CC) { +CC.b = _c.a + 1; +class DD extends (_e = CC) { static foo() { return this.c + 1; } @@ -100,9 +100,9 @@ class DD extends (_c = CC) { this.c = v + 1; } } -_b = DD; +_d = DD; DD.c = 2; -DD.d = _b.c + 1; -DD.e = Reflect.get(_c, "a", _b) + _b.c + 1; -DD.f = () => _b.c + 1; +DD.d = _d.c + 1; +DD.e = Reflect.get(_e, "a", _d) + _d.c + 1; +DD.f = () => _d.c + 1; DD.ff = function () { this.c + 1; }; diff --git a/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js b/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js index e0b75ad9b1fb0..ff770acda09cc 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js +++ b/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js @@ -57,7 +57,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 _a, _b, _c; +var _a, _b, _c, _d, _e; let C = class C { }; Object.defineProperty(C, "a", { @@ -75,7 +75,7 @@ Object.defineProperty(C, "b", { C = __decorate([ foo ], C); -let D = class D extends C { +let D = _a = class D extends (_b = C) { static foo() { return this.c + 1; } @@ -102,7 +102,7 @@ Object.defineProperty(D, "e", { enumerable: true, configurable: true, writable: true, - value: (void 0).a + (void 0).c + 1 + value: Reflect.get(_b, "a", _a) + (void 0).c + 1 }); Object.defineProperty(D, "f", { enumerable: true, @@ -121,7 +121,7 @@ D = __decorate([ ], D); class CC { } -_a = CC; +_c = CC; Object.defineProperty(CC, "a", { enumerable: true, configurable: true, @@ -132,9 +132,9 @@ Object.defineProperty(CC, "b", { enumerable: true, configurable: true, writable: true, - value: _a.a + 1 + value: _c.a + 1 }); -class DD extends (_c = CC) { +class DD extends (_e = CC) { static foo() { return this.c + 1; } @@ -145,7 +145,7 @@ class DD extends (_c = CC) { this.c = v + 1; } } -_b = DD; +_d = DD; Object.defineProperty(DD, "c", { enumerable: true, configurable: true, @@ -156,19 +156,19 @@ Object.defineProperty(DD, "d", { enumerable: true, configurable: true, writable: true, - value: _b.c + 1 + value: _d.c + 1 }); Object.defineProperty(DD, "e", { enumerable: true, configurable: true, writable: true, - value: Reflect.get(_c, "a", _b) + _b.c + 1 + value: Reflect.get(_e, "a", _d) + _d.c + 1 }); Object.defineProperty(DD, "f", { enumerable: true, configurable: true, writable: true, - value: () => _b.c + 1 + value: () => _d.c + 1 }); Object.defineProperty(DD, "ff", { enumerable: true, diff --git a/tests/baselines/reference/typesVersions.ambientModules.trace.json b/tests/baselines/reference/typesVersions.ambientModules.trace.json index 0a410f50e0b3e..2ad8f6258ab8f 100644 --- a/tests/baselines/reference/typesVersions.ambientModules.trace.json +++ b/tests/baselines/reference/typesVersions.ambientModules.trace.json @@ -786,6 +786,18 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersions.emptyTypes.trace.json b/tests/baselines/reference/typesVersions.emptyTypes.trace.json index 8d0744b55cfa9..2462c3bd90529 100644 --- a/tests/baselines/reference/typesVersions.emptyTypes.trace.json +++ b/tests/baselines/reference/typesVersions.emptyTypes.trace.json @@ -814,6 +814,19 @@ "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersions.justIndex.trace.json b/tests/baselines/reference/typesVersions.justIndex.trace.json index 3ae541cf1d29a..8ac49168532ab 100644 --- a/tests/baselines/reference/typesVersions.justIndex.trace.json +++ b/tests/baselines/reference/typesVersions.justIndex.trace.json @@ -814,6 +814,19 @@ "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersions.multiFile.trace.json b/tests/baselines/reference/typesVersions.multiFile.trace.json index defb376cbe4e7..49463b2d20979 100644 --- a/tests/baselines/reference/typesVersions.multiFile.trace.json +++ b/tests/baselines/reference/typesVersions.multiFile.trace.json @@ -765,6 +765,18 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json index 0a410f50e0b3e..2ad8f6258ab8f 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.ambient.trace.json @@ -786,6 +786,18 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json index defb376cbe4e7..49463b2d20979 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFile.trace.json @@ -765,6 +765,18 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json index 14703ef05c6b3..01f8d4f30bc57 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.trace.json @@ -788,6 +788,18 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json index 009cab1a57a7e..6fe827e647d2a 100644 --- a/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json +++ b/tests/baselines/reference/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.trace.json @@ -771,6 +771,18 @@ "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-esnext/intl' was not resolved. ========", + "======== Resolving module '@typescript/lib-esnext/decorators' from '/.src/__lib_node_modules_lookup_lib.esnext.decorators.d.ts__.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "Scoped package detected, looking in 'typescript__lib-esnext/decorators'", + "Loading module '@typescript/lib-esnext/decorators' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/node_modules' does not exist, skipping all lookups in it.", + "======== Module name '@typescript/lib-esnext/decorators' was not resolved. ========", "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts index c92124543a8cf..f27d19a1805f5 100644 --- a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata1.ts @@ -1,11 +1,8 @@ // @target: es2022,es2015 // @noTypesAndSymbols: true +// @lib: esnext // @filename: /foo.ts -interface SymbolConstructor { - readonly metadata: string; -} - function meta(key: string, value: string) { return (_, context) => { context.metadata[key] = value; diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts index 7269d0c1b3991..ff22999b0f655 100644 --- a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata2.ts @@ -1,11 +1,8 @@ // @target: es2022,es2015 // @noTypesAndSymbols: true +// @lib: esnext // @filename: /foo.ts -interface SymbolConstructor { - readonly metadata: string; -} - function meta(key: string, value: string) { return (_, context) => { context.metadata[key] = value; diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts index 7e973d4ea08e7..bcbce9f27d9cd 100644 --- a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata3.ts @@ -1,11 +1,8 @@ // @target: es2022,es2015 // @noTypesAndSymbols: true +// @lib: esnext // @filename: /foo.ts -interface SymbolConstructor { - readonly metadata: string; -} - function appendMeta(key: string, value: string) { return (_, context) => { const existing = context.metadata[key] ?? []; @@ -14,10 +11,12 @@ function appendMeta(key: string, value: string) { } @appendMeta('a', 'x') -class C { } +class C { +} @appendMeta('a', 'z') -class D extends C { } +class D extends C { +} C[Symbol.metadata].a; // ['x'] D[Symbol.metadata].a; // ['x', 'z'] diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts index 308e392b8f80d..a8c0fc8b667b2 100644 --- a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata4.ts @@ -1,11 +1,8 @@ // @target: es2022,es2015 // @noTypesAndSymbols: true +// @lib: esnext // @filename: /foo.ts -interface SymbolConstructor { - readonly metadata: string; -} - const PRIVATE_METADATA = new WeakMap(); function meta(key: string, value: string) { From 27c37e5d4b49668aa8bf69c8186cf5596f0c71aa Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Jun 2023 01:24:02 +0300 Subject: [PATCH 03/11] add missed files --- src/lib/esnext.decorators.d.ts | 3 + .../reference/esDecoratorsMetadata5.js | 60 +++++++++++++++++++ .../metadata/esDecoratorsMetadata5.ts | 8 +++ 3 files changed, 71 insertions(+) create mode 100644 src/lib/esnext.decorators.d.ts create mode 100644 tests/baselines/reference/esDecoratorsMetadata5.js create mode 100644 tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata5.ts diff --git a/src/lib/esnext.decorators.d.ts b/src/lib/esnext.decorators.d.ts new file mode 100644 index 0000000000000..e729881929a18 --- /dev/null +++ b/src/lib/esnext.decorators.d.ts @@ -0,0 +1,3 @@ +interface SymbolConstructor { + readonly metadata: unique symbol; +} diff --git a/tests/baselines/reference/esDecoratorsMetadata5.js b/tests/baselines/reference/esDecoratorsMetadata5.js new file mode 100644 index 0000000000000..e7144470d87c5 --- /dev/null +++ b/tests/baselines/reference/esDecoratorsMetadata5.js @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata5.ts] //// + +//// [foo.ts] +declare var metadata: any; +class C { + @metadata m() {} +} + + +//// [foo.js] +var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +}; +var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +}; +let C = (() => { + let _instanceExtraInitializers = []; + let _m_decorators; + return class C { + static { + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; + _m_decorators = [metadata]; + __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); + if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); + } + m() { } + constructor() { + __runInitializers(this, _instanceExtraInitializers); + } + }; +})(); diff --git a/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata5.ts b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata5.ts new file mode 100644 index 0000000000000..974f65676edeb --- /dev/null +++ b/tests/cases/conformance/esDecorators/metadata/esDecoratorsMetadata5.ts @@ -0,0 +1,8 @@ +// @target: es2022 +// @noTypesAndSymbols: true +// @filename: /foo.ts + +declare var metadata: any; +class C { + @metadata m() {} +} From da43f1f7c6178f42cc2e973ffa4e32a1d963c116 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Jun 2023 01:41:02 +0300 Subject: [PATCH 04/11] add DecoratorMetadata to fourslash interface --- src/harness/fourslashInterfaceImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 1ed8641a40904..e9c346a8c4e81 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1168,6 +1168,7 @@ export namespace Completion { typeEntry("ParameterDecorator"), typeEntry("ClassMemberDecoratorContext"), typeEntry("DecoratorContext"), + typeEntry("DecoratorMetadata"), interfaceEntry("ClassDecoratorContext"), interfaceEntry("ClassMethodDecoratorContext"), interfaceEntry("ClassGetterDecoratorContext"), From 2996d8ea2c9d08c086ae4367ef3469630cb7cae8 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Jun 2023 20:23:12 +0300 Subject: [PATCH 05/11] add evaluation tests for ES decorators metadata. add additional safeguards to avoid crashes caused by incorrect base prototypes --- src/compiler/transformers/classFields.ts | 9 +- src/compiler/transformers/esDecorators.ts | 70 ++++----- src/harness/evaluatorImpl.ts | 14 +- src/lib/decorators.d.ts | 8 + src/lib/esnext.decorators.d.ts | 2 + src/testRunner/tests.ts | 1 + .../evaluation/esDecoratorsMetadata.ts | 141 ++++++++++++++++++ ...ecorators-classDeclaration-classSuper.1.js | 2 +- ...ecorators-classDeclaration-classSuper.2.js | 6 +- ...ecorators-classDeclaration-classSuper.3.js | 2 +- ...ecorators-classDeclaration-classSuper.4.js | 2 +- ...ecorators-classDeclaration-classSuper.5.js | 6 +- ...ecorators-classDeclaration-classSuper.6.js | 5 +- ...ecorators-classDeclaration-classSuper.7.js | 10 +- ...Decorators-classExpression-classSuper.1.js | 2 +- ...Decorators-classExpression-classSuper.2.js | 6 +- ...Decorators-classExpression-classSuper.3.js | 2 +- ...Decorators-classExpression-classSuper.4.js | 2 +- ...Decorators-classExpression-classSuper.5.js | 6 +- ...Decorators-classExpression-classSuper.6.js | 5 +- .../esDecoratorsMetadata2(target=es2015).js | 7 +- .../esDecoratorsMetadata2(target=es2022).js | 5 +- .../esDecoratorsMetadata3(target=es2015).js | 6 +- .../esDecoratorsMetadata3(target=es2022).js | 5 +- ...typeOfThisInStaticMembers10(target=es6).js | 20 +-- ...typeOfThisInStaticMembers11(target=es6).js | 20 +-- 26 files changed, 262 insertions(+), 102 deletions(-) create mode 100644 src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index dfcb8a31fe5ce..f038aa3d37a27 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -1194,7 +1194,7 @@ export function transformClassFields(context: TransformationContext): (x: Source isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & ClassFacts.ClassWasDecorated && superClassReference === undefined && classConstructor === undefined) { + if (facts & ClassFacts.ClassWasDecorated) { return visitInvalidSuperProperty(node); } if (classConstructor && superClassReference) { @@ -1219,9 +1219,10 @@ export function transformClassFields(context: TransformationContext): (x: Source isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & ClassFacts.ClassWasDecorated && superClassReference === undefined && classConstructor === undefined) { + if (facts & ClassFacts.ClassWasDecorated) { return visitInvalidSuperProperty(node); } + if (classConstructor && superClassReference) { // converts `super[x]` into `Reflect.get(_baseTemp, x, _classTemp)` const superProperty = factory.createReflectGetCall( @@ -1745,7 +1746,7 @@ export function transformClassFields(context: TransformationContext): (x: Source function getClassFacts(node: ClassLikeDeclaration) { let facts = ClassFacts.None; - const original = getOriginalNode(node) as ClassLikeDeclaration; + const original = getOriginalNode(node); if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= ClassFacts.ClassWasDecorated; } @@ -1768,7 +1769,7 @@ export function transformClassFields(context: TransformationContext): (x: Source } } if (shouldTransformSuperInStaticInitializers && member.transformFlags & TransformFlags.ContainsLexicalSuper) { - if (!(facts & ClassFacts.ClassWasDecorated) || original.heritageClauses) { + if (!(facts & ClassFacts.ClassWasDecorated)) { facts |= ClassFacts.NeedsClassConstructorReference | ClassFacts.NeedsClassSuperReference; } } diff --git a/src/compiler/transformers/esDecorators.ts b/src/compiler/transformers/esDecorators.ts index cf4e41a393137..ea073fe5705b7 100644 --- a/src/compiler/transformers/esDecorators.ts +++ b/src/compiler/transformers/esDecorators.ts @@ -628,18 +628,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc }; } - function containsLexicalSuperInStaticInitializer(node: ClassLikeDeclaration) { - for (const member of node.members) { - if (isClassStaticBlockDeclaration(member) || - isPropertyDeclaration(member) && hasStaticModifier(member)) { - if (member.transformFlags & TransformFlags.ContainsLexicalSuper) { - return true; - } - } - } - return false; - } - function transformClassLike(node: ClassLikeDeclaration, className: Expression) { startLexicalEnvironment(); @@ -679,31 +667,25 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } // Rewrite `super` in static initializers so that we can use the correct `this`. - if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo.classSuper = factory.createUniqueName("_classSuper", GeneratedIdentifierFlags.Optimistic); + const extendsClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); + const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); + if (extendsExpression) { + classInfo.classSuper = factory.createUniqueName("_classSuper", GeneratedIdentifierFlags.Optimistic); // Ensure we do not give the class or function an assigned name due to the variable by prefixing it // with `0, `. - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = - isClassExpression(unwrapped) && !unwrapped.name || - isFunctionExpression(unwrapped) && !unwrapped.name || - isArrowFunction(unwrapped) ? - factory.createComma(factory.createNumericLiteral(0), extendsExpression) : - extendsExpression; - classDefinitionStatements.push(createLet(classInfo.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory.updateExpressionWithTypeArguments(extendsElement, classInfo.classSuper, /*typeArguments*/ undefined); - const updatedExtendsClause = factory.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory.createNodeArray([updatedExtendsClause]); - } - } - else { - // 2. ClassHeritage clause is evaluated outside of the private name scope of the class. - heritageClauses = visitNodes(node.heritageClauses, visitor, isHeritageClause); + const unwrapped = skipOuterExpressions(extendsExpression); + const safeExtendsExpression = + isClassExpression(unwrapped) && !unwrapped.name || + isFunctionExpression(unwrapped) && !unwrapped.name || + isArrowFunction(unwrapped) ? + factory.createComma(factory.createNumericLiteral(0), extendsExpression) : + extendsExpression; + classDefinitionStatements.push(createLet(classInfo.classSuper, safeExtendsExpression)); + const updatedExtendsElement = factory.updateExpressionWithTypeArguments(extendsElement, classInfo.classSuper, /*typeArguments*/ undefined); + const updatedExtendsClause = factory.updateHeritageClause(extendsClause, [updatedExtendsElement]); + heritageClauses = factory.createNodeArray([updatedExtendsClause]); } const renamedClassThis = classInfo.classThis ?? factory.createThis(); @@ -731,7 +713,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // NOTE: If there are no constructors, but there are instance initializers, a synthetic constructor is added. enterClass(classInfo); - leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo.metadataReference, !!heritageClauses)); + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo.metadataReference, classInfo.classSuper)); let members = visitNodes(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { @@ -2342,7 +2324,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc factory.createStringLiteralFromNode(name); } - function createMetadata(name: Identifier, hasProto: boolean) { + function createMetadata(name: Identifier, classSuper: Identifier | undefined) { const varDecl = factory.createVariableDeclaration( name, /*exclamationToken*/ undefined, @@ -2356,7 +2338,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc factory.createCallExpression( factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "create"), /*typeArguments*/ undefined, - [hasProto ? createSymbolMetadataReference() : factory.createNull()] + [classSuper ? createSymbolMetadataReference(classSuper) : factory.createNull()] ), factory.createToken(SyntaxKind.ColonToken), factory.createVoidZero(), @@ -2377,10 +2359,18 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc ); } - function createSymbolMetadataReference() { - return factory.createElementAccessExpression( - factory.createSuper(), + function createSymbolMetadataReference(classSuper: Identifier) { + const classSuperSymbolMetadata = factory.createElementAccessExpression( + classSuper, factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), ); + return factory.createConditionalExpression( + factory.createLogicalOr( + factory.createTypeCheck(classSuperSymbolMetadata, "object"), + factory.createTypeCheck(classSuperSymbolMetadata, "function"), + ), + factory.createToken(SyntaxKind.QuestionToken), classSuperSymbolMetadata, + factory.createToken(SyntaxKind.ColonToken), factory.createNull(), + ); } } diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts index f72526fb4a129..60d96ca362b07 100644 --- a/src/harness/evaluatorImpl.ts +++ b/src/harness/evaluatorImpl.ts @@ -16,8 +16,18 @@ for (const key of Object.getOwnPropertyNames(Symbol)) { Object.defineProperty(FakeSymbol, key, Object.getOwnPropertyDescriptor(Symbol, key)!); } -// Add "asyncIterator" if missing -if (!ts.hasProperty(FakeSymbol, "asyncIterator")) Object.defineProperty(FakeSymbol, "asyncIterator", { value: Symbol.for("Symbol.asyncIterator"), configurable: true }); +const symbolNames = [ + "asyncIterator", + "metadata", +]; +for (const symbolName of symbolNames) { + if (!ts.hasProperty(FakeSymbol, symbolName)) { + Object.defineProperty(FakeSymbol, symbolName, { + value: Symbol.for(`Symbol.${symbolName}`), + configurable: true, + }); + } +} export function evaluateTypeScript(source: string | { files: vfs.FileSet, rootFiles: string[], main: string }, options?: ts.CompilerOptions, globals?: Record) { if (typeof source === "string") source = { files: { [sourceFile]: source }, rootFiles: [sourceFile], main: sourceFile }; diff --git a/src/lib/decorators.d.ts b/src/lib/decorators.d.ts index 83f41c8c03b27..a39e3eda87b95 100644 --- a/src/lib/decorators.d.ts +++ b/src/lib/decorators.d.ts @@ -164,6 +164,8 @@ interface ClassGetterDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -209,6 +211,8 @@ interface ClassSetterDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -263,6 +267,8 @@ interface ClassAccessorDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -358,4 +364,6 @@ interface ClassFieldDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } diff --git a/src/lib/esnext.decorators.d.ts b/src/lib/esnext.decorators.d.ts index e729881929a18..ccd1ff03e7503 100644 --- a/src/lib/esnext.decorators.d.ts +++ b/src/lib/esnext.decorators.d.ts @@ -1,3 +1,5 @@ +/// + interface SymbolConstructor { readonly metadata: unique symbol; } diff --git a/src/testRunner/tests.ts b/src/testRunner/tests.ts index fb002cc3491a8..96db12c481f53 100644 --- a/src/testRunner/tests.ts +++ b/src/testRunner/tests.ts @@ -37,6 +37,7 @@ import "./unittests/evaluation/awaiter"; import "./unittests/evaluation/destructuring"; import "./unittests/evaluation/externalModules"; import "./unittests/evaluation/esDecorators"; +import "./unittests/evaluation/esDecoratorsMetadata"; import "./unittests/evaluation/forAwaitOf"; import "./unittests/evaluation/forOf"; import "./unittests/evaluation/generator"; diff --git a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts new file mode 100644 index 0000000000000..5458c750c2708 --- /dev/null +++ b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts @@ -0,0 +1,141 @@ +import * as evaluator from "../../_namespaces/evaluator"; +import * as ts from "../../_namespaces/ts"; +import { ScriptTarget } from "../../_namespaces/ts"; + +describe("unittests:: evaluation:: esDecoratorsMetadata", () => { + const nodeVersion = new ts.Version(process.versions.node); + const supportsClassStaticBlock = nodeVersion.major >= 16; + + const targets = [ + // NOTE: Class static blocks weren't supported in Node v14 + ...(supportsClassStaticBlock ? [ScriptTarget.ES2022] : []), + ScriptTarget.ES2021, + ScriptTarget.ES2015, + ]; + + for (const target of targets) { + const targetName = ts.Debug.formatEnum(target, (ts as any).ScriptTarget); + const options: ts.CompilerOptions = { target }; + const exec = (array: TemplateStringsArray) => evaluator.evaluateTypeScript(array[0], options); + + describe("examples", () => { + // see https://github.com/tc39/proposal-decorator-metadata + it(`@meta (${targetName})`, () => { + const { output } = exec` + export const output: string[] = []; + + function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; + } + + @meta('a', 'x') + class C { + @meta('b', 'y') + m() { } + } + + output.push(C[Symbol.metadata].a); + output.push(C[Symbol.metadata].b); + `; + assert.deepEqual(output, ["x", "y"]); + }); + + // see https://github.com/tc39/proposal-decorator-metadata#inheritance + it(`inheritance (${targetName})`, () => { + const { output } = exec` + export const output: string[] = []; + + function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; + } + + @meta('a', 'x') + class C { + @meta('b', 'y') + m() {} + } + + output.push(C[Symbol.metadata].a); + output.push(C[Symbol.metadata].b); + + class D extends C { + @meta('b', 'z') + m() {} + } + + output.push(D[Symbol.metadata].a); + output.push(D[Symbol.metadata].b); + `; + assert.deepEqual(output, [ + "x", + "y", + "x", + "z", + ]); + }); + + // see https://github.com/tc39/proposal-decorator-metadata#inheritance + it(`inheritance append(${targetName})`, () => { + const { output } = exec` + export const output: string[] = []; + + function appendMeta(key: string, value: string) { + return (_, context) => { + const existing = context.metadata[key] ?? []; + context.metadata[key] = [...existing, value]; + }; + } + + @appendMeta('a', 'x') + class C { } + + @appendMeta('a', 'z') + class D extends C { } + + output.push(C[Symbol.metadata].a); + output.push(D[Symbol.metadata].a); + `; + assert.deepEqual(output, [ + ["x"], + ["x", "z"], + ]); + }); + + // see https://github.com/tc39/proposal-decorator-metadata#private-metadata + it(`private metadata (${targetName})`, () => { + const { output } = exec` + export const output: string[] = []; + + const PRIVATE_METADATA = new WeakMap(); + function meta(key: string, value: string) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + metadata[key] = value; + }; + } + + @meta('a', 'x') + class C { + @meta('b', 'y') + m() { } + } + + output.push(PRIVATE_METADATA.get(C[Symbol.metadata]).a); + output.push(PRIVATE_METADATA.get(C[Symbol.metadata]).b); + `; + assert.deepEqual(output, [ + "x", + "y", + ]); + }); + }); + } +}); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js index ac0b43fbec73a..a30c7f572929c 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.1.js @@ -33,7 +33,7 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js index 3a20a77c22c40..b3f336ca871ed 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.2.js @@ -39,7 +39,7 @@ let C1 = (() => { }); var C1 = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -62,7 +62,7 @@ let C2 = (() => { let _classSuper_1 = (0, function () { }); var C2 = class extends _classSuper_1 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_1[Symbol.metadata] === "object" || typeof _classSuper_1[Symbol.metadata] === "function" ? _classSuper_1[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -85,7 +85,7 @@ let C3 = (() => { let _classSuper_2 = (0, (() => { })); var C3 = class extends _classSuper_2 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_2[Symbol.metadata] === "object" || typeof _classSuper_2[Symbol.metadata] === "function" ? _classSuper_2[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js index df5f7c1daa78f..7c53d21384e58 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.3.js @@ -55,7 +55,7 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js index 3a78bc0a76006..f8bbe00896fd9 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.4.js @@ -30,7 +30,7 @@ let C = (() => { let _classSuper = Base; var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js index 24cded195219e..f3396a2a802ec 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.5.js @@ -59,7 +59,7 @@ let C1 = (() => { let _classSuper = Base; var C1 = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -105,7 +105,7 @@ let C2 = (() => { let _classSuper_1 = Base; var C2 = class extends _classSuper_1 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_1[Symbol.metadata] === "object" || typeof _classSuper_1[Symbol.metadata] === "function" ? _classSuper_1[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -151,7 +151,7 @@ let C3 = (() => { let _classSuper_2 = Base; var C3 = class extends _classSuper_2 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_2[Symbol.metadata] === "object" || typeof _classSuper_2[Symbol.metadata] === "function" ? _classSuper_2[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js index 03ca42bbcff5c..f4b86b8397bf3 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.6.js @@ -34,9 +34,10 @@ let C = (() => { let _classDescriptor; let _classExtraInitializers = []; let _classThis; - var C = class extends Base { + let _classSuper = Base; + var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js index 1d9a7c597668a..f4881207d2dbc 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js +++ b/tests/baselines/reference/esDecorators-classDeclaration-classSuper.7.js @@ -46,11 +46,12 @@ class D extends A { class A { } let B = (() => { + let _classSuper = A; let _instanceExtraInitializers = []; let _m_decorators; - return class B extends A { + return class B extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; _m_decorators = [foo]; __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -90,11 +91,12 @@ let C = (() => { }; })(); let D = (() => { + let _classSuper_1 = A; let _instanceExtraInitializers_2 = []; let _get_val_decorators; - return class D extends A { + return class D extends _classSuper_1 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_1[Symbol.metadata] === "object" || typeof _classSuper_1[Symbol.metadata] === "function" ? _classSuper_1[Symbol.metadata] : null) : void 0; _get_val_decorators = [foo]; __esDecorate(this, null, _get_val_decorators, { kind: "getter", name: "val", static: false, private: false, access: { has: obj => "val" in obj, get: obj => obj.val }, metadata: _metadata }, null, _instanceExtraInitializers_2); if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js index e515763512da9..6b976e10fa777 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.1.js @@ -32,7 +32,7 @@ const method = "method"; let _classSuper = Base; var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js index 238b9ac227381..1d0c182c4562d 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.2.js @@ -39,7 +39,7 @@ class C3 extends ((() => {}) as any) { }); var C1 = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -62,7 +62,7 @@ class C3 extends ((() => {}) as any) { let _classSuper_1 = (0, function () { }); var C2 = class extends _classSuper_1 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_1[Symbol.metadata] === "object" || typeof _classSuper_1[Symbol.metadata] === "function" ? _classSuper_1[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -85,7 +85,7 @@ class C3 extends ((() => {}) as any) { let _classSuper_2 = (0, (() => { })); var C3 = class extends _classSuper_2 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_2[Symbol.metadata] === "object" || typeof _classSuper_2[Symbol.metadata] === "function" ? _classSuper_2[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js index f128718ba237b..b07fc9547269e 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.3.js @@ -55,7 +55,7 @@ const x = "x"; let _classSuper = Base; var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js index 85a8d3afb5621..12f4f882c565a 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.4.js @@ -30,7 +30,7 @@ const method = "method"; let _classSuper = Base; var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js index 10ebe5d29c37c..a6aa686982414 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.5.js @@ -59,7 +59,7 @@ const x = "x"; let _classSuper = Base; var C1 = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C1 = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -105,7 +105,7 @@ const x = "x"; let _classSuper_1 = Base; var C2 = class extends _classSuper_1 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_1[Symbol.metadata] === "object" || typeof _classSuper_1[Symbol.metadata] === "function" ? _classSuper_1[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); C2 = _classThis_1 = _classDescriptor_1.value; if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); @@ -151,7 +151,7 @@ const x = "x"; let _classSuper_2 = Base; var C3 = class extends _classSuper_2 { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper_2[Symbol.metadata] === "object" || typeof _classSuper_2[Symbol.metadata] === "function" ? _classSuper_2[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_2 = { value: this }, _classDecorators_2, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_2); C3 = _classThis_2 = _classDescriptor_2.value; if (_metadata) Object.defineProperty(_classThis_2, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js b/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js index b73ef49493ca1..0d16b0daa1497 100644 --- a/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js +++ b/tests/baselines/reference/esDecorators-classExpression-classSuper.6.js @@ -34,9 +34,10 @@ class C extends Base { let _classDescriptor; let _classExtraInitializers = []; let _classThis; - var C = class extends Base { + let _classSuper = Base; + var C = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers); C = _classThis = _classDescriptor.value; if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js index cd4f0e9c9491f..58ac69f4be881 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js @@ -97,10 +97,11 @@ let C = (() => { C[Symbol.metadata].a; // 'x' C[Symbol.metadata].b; // 'y' let D = (() => { - var _a, _b; + var _a; + let _classSuper = C; let _instanceExtraInitializers_1 = []; let _m_decorators; - return _a = class D extends (_b = C) { + return _a = class D extends _classSuper { m() { } constructor() { super(...arguments); @@ -108,7 +109,7 @@ let D = (() => { } }, (() => { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(Reflect.get(_b, Symbol.metadata, _a)) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; _m_decorators = [meta('b', 'z')]; __esDecorate(_a, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers_1); if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js index a29a41d34615d..38652ec9badf7 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2022).js @@ -92,11 +92,12 @@ let C = (() => { C[Symbol.metadata].a; // 'x' C[Symbol.metadata].b; // 'y' let D = (() => { + let _classSuper = C; let _instanceExtraInitializers_1 = []; let _m_decorators; - return class D extends C { + return class D extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; _m_decorators = [meta('b', 'z')]; __esDecorate(this, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers_1); if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js index 8ca63da31178a..a28394bff2e97 100644 --- a/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2015).js @@ -84,16 +84,16 @@ let C = (() => { return C = _classThis; })(); let D = (() => { - var _a; let _classDecorators_1 = [appendMeta('a', 'z')]; let _classDescriptor_1; let _classExtraInitializers_1 = []; let _classThis_1; - var D = _classThis_1 = class extends (_a = C) { + let _classSuper = C; + var D = _classThis_1 = class extends _classSuper { }; __setFunctionName(_classThis_1, "D"); (() => { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(Reflect.get(_a, Symbol.metadata, _classThis_1)) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_1 = { value: _classThis_1 }, _classDecorators_1, { kind: "class", name: _classThis_1.name, metadata: _metadata }, null, _classExtraInitializers_1); D = _classThis_1 = _classDescriptor_1.value; if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js index 7fd60d8524b8b..99cca38b4f244 100644 --- a/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js +++ b/tests/baselines/reference/esDecoratorsMetadata3(target=es2022).js @@ -82,9 +82,10 @@ let D = (() => { let _classDescriptor_1; let _classExtraInitializers_1 = []; let _classThis_1; - var D = class extends C { + let _classSuper = C; + var D = class extends _classSuper { static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(super[Symbol.metadata]) : void 0; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(typeof _classSuper[Symbol.metadata] === "object" || typeof _classSuper[Symbol.metadata] === "function" ? _classSuper[Symbol.metadata] : null) : void 0; __esDecorate(null, _classDescriptor_1 = { value: this }, _classDecorators_1, { kind: "class", name: this.name, metadata: _metadata }, null, _classExtraInitializers_1); D = _classThis_1 = _classDescriptor_1.value; if (_metadata) Object.defineProperty(_classThis_1, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); diff --git a/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js b/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js index a9e32fed64c04..478fdaddfec29 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js +++ b/tests/baselines/reference/typeOfThisInStaticMembers10(target=es6).js @@ -57,7 +57,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 _a, _b, _c, _d, _e; +var _a, _b, _c; let C = class C { }; C.a = 1; @@ -65,7 +65,7 @@ C.b = (void 0).a + 1; C = __decorate([ foo ], C); -let D = _a = class D extends (_b = C) { +let D = class D extends C { static foo() { return this.c + 1; } @@ -78,7 +78,7 @@ let D = _a = class D extends (_b = C) { }; D.c = 2; D.d = (void 0).c + 1; -D.e = Reflect.get(_b, "a", _a) + (void 0).c + 1; +D.e = (void 0).a + (void 0).c + 1; D.f = () => (void 0).c + 1; D.ff = function () { this.c + 1; }; D = __decorate([ @@ -86,10 +86,10 @@ D = __decorate([ ], D); class CC { } -_c = CC; +_a = CC; CC.a = 1; -CC.b = _c.a + 1; -class DD extends (_e = CC) { +CC.b = _a.a + 1; +class DD extends (_c = CC) { static foo() { return this.c + 1; } @@ -100,9 +100,9 @@ class DD extends (_e = CC) { this.c = v + 1; } } -_d = DD; +_b = DD; DD.c = 2; -DD.d = _d.c + 1; -DD.e = Reflect.get(_e, "a", _d) + _d.c + 1; -DD.f = () => _d.c + 1; +DD.d = _b.c + 1; +DD.e = Reflect.get(_c, "a", _b) + _b.c + 1; +DD.f = () => _b.c + 1; DD.ff = function () { this.c + 1; }; diff --git a/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js b/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js index ff770acda09cc..e0b75ad9b1fb0 100644 --- a/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js +++ b/tests/baselines/reference/typeOfThisInStaticMembers11(target=es6).js @@ -57,7 +57,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, 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 _a, _b, _c, _d, _e; +var _a, _b, _c; let C = class C { }; Object.defineProperty(C, "a", { @@ -75,7 +75,7 @@ Object.defineProperty(C, "b", { C = __decorate([ foo ], C); -let D = _a = class D extends (_b = C) { +let D = class D extends C { static foo() { return this.c + 1; } @@ -102,7 +102,7 @@ Object.defineProperty(D, "e", { enumerable: true, configurable: true, writable: true, - value: Reflect.get(_b, "a", _a) + (void 0).c + 1 + value: (void 0).a + (void 0).c + 1 }); Object.defineProperty(D, "f", { enumerable: true, @@ -121,7 +121,7 @@ D = __decorate([ ], D); class CC { } -_c = CC; +_a = CC; Object.defineProperty(CC, "a", { enumerable: true, configurable: true, @@ -132,9 +132,9 @@ Object.defineProperty(CC, "b", { enumerable: true, configurable: true, writable: true, - value: _c.a + 1 + value: _a.a + 1 }); -class DD extends (_e = CC) { +class DD extends (_c = CC) { static foo() { return this.c + 1; } @@ -145,7 +145,7 @@ class DD extends (_e = CC) { this.c = v + 1; } } -_d = DD; +_b = DD; Object.defineProperty(DD, "c", { enumerable: true, configurable: true, @@ -156,19 +156,19 @@ Object.defineProperty(DD, "d", { enumerable: true, configurable: true, writable: true, - value: _d.c + 1 + value: _b.c + 1 }); Object.defineProperty(DD, "e", { enumerable: true, configurable: true, writable: true, - value: Reflect.get(_e, "a", _d) + _d.c + 1 + value: Reflect.get(_c, "a", _b) + _b.c + 1 }); Object.defineProperty(DD, "f", { enumerable: true, configurable: true, writable: true, - value: () => _d.c + 1 + value: () => _b.c + 1 }); Object.defineProperty(DD, "ff", { enumerable: true, From 6904edbb3d23e58a91e06c6c6bf38742a9587326 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Jun 2023 23:30:59 +0300 Subject: [PATCH 06/11] use nullish coalescing expression --- src/compiler/transformers/esDecorators.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/compiler/transformers/esDecorators.ts b/src/compiler/transformers/esDecorators.ts index ea073fe5705b7..383899c2ff291 100644 --- a/src/compiler/transformers/esDecorators.ts +++ b/src/compiler/transformers/esDecorators.ts @@ -2360,17 +2360,13 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } function createSymbolMetadataReference(classSuper: Identifier) { - const classSuperSymbolMetadata = factory.createElementAccessExpression( - classSuper, - factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), - ); - return factory.createConditionalExpression( - factory.createLogicalOr( - factory.createTypeCheck(classSuperSymbolMetadata, "object"), - factory.createTypeCheck(classSuperSymbolMetadata, "function"), + return factory.createBinaryExpression( + factory.createElementAccessExpression( + classSuper, + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), ), - factory.createToken(SyntaxKind.QuestionToken), classSuperSymbolMetadata, - factory.createToken(SyntaxKind.ColonToken), factory.createNull(), + SyntaxKind.QuestionQuestionToken, + factory.createNull() ); } } From 0ce1379a9105bbadecb3128327d66044f5092883 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 23 Jun 2023 01:52:57 +0300 Subject: [PATCH 07/11] update decorators typings --- src/lib/decorators.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/decorators.d.ts b/src/lib/decorators.d.ts index a39e3eda87b95..c64ee5a2550f9 100644 --- a/src/lib/decorators.d.ts +++ b/src/lib/decorators.d.ts @@ -17,8 +17,14 @@ type DecoratorContext = | ClassMemberDecoratorContext ; +type DecoratorMetadataObject = Record & object; + type DecoratorMetadata = - typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? object : object | undefined; + typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined; + +interface Function { + [Symbol.metadata]: DecoratorMetadata | null; +} /** * Context provided to a class decorator. From db22c16c41f2cd1205e9867a882a8c55e749a6d6 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 23 Jun 2023 02:11:39 +0300 Subject: [PATCH 08/11] use reservedInNestedScopes for class names --- src/compiler/transformers/classFields.ts | 3 +-- .../reference/esDecoratorsMetadata2(target=es2015).js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 07adbf4b1cbf6..7c7227697a985 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -1936,9 +1936,8 @@ export function transformClassFields(context: TransformationContext): (x: Source } const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference = classCheckFlags & NodeCheckFlags.ClassWithConstructorReference; const requiresBlockScopedVar = classCheckFlags & NodeCheckFlags.BlockScopedBindingInLoop; - const temp = factory.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference); + const temp = factory.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, /*reservedInNestedScopes*/ true); getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp); return temp; } diff --git a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js index 915c2d2d221ab..827cd38f1e8a2 100644 --- a/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js +++ b/tests/baselines/reference/esDecoratorsMetadata2(target=es2015).js @@ -109,8 +109,8 @@ let D = (() => { } }, (() => { - var _a; - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0; + var _b; + const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_b = _classSuper[Symbol.metadata]) !== null && _b !== void 0 ? _b : null) : void 0; _m_decorators = [meta('b', 'z')]; __esDecorate(_a, null, _m_decorators, { kind: "method", name: "m", static: false, private: false, access: { has: obj => "m" in obj, get: obj => obj.m }, metadata: _metadata }, null, _instanceExtraInitializers); if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); From 36b0660e41963d0499736d334d014a03793568c2 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 23 Jun 2023 02:30:05 +0300 Subject: [PATCH 09/11] add DecoratorMetadataObject to globalTypeDecls --- src/harness/fourslashInterfaceImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index e9c346a8c4e81..d5bc4f201751c 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1169,6 +1169,7 @@ export namespace Completion { typeEntry("ClassMemberDecoratorContext"), typeEntry("DecoratorContext"), typeEntry("DecoratorMetadata"), + typeEntry("DecoratorMetadataObject"), interfaceEntry("ClassDecoratorContext"), interfaceEntry("ClassMethodDecoratorContext"), interfaceEntry("ClassGetterDecoratorContext"), From ee15c01cc0503aec0fb7394169e504d14844cdef Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 23 Jun 2023 08:39:01 +0300 Subject: [PATCH 10/11] update typings --- src/lib/decorators.d.ts | 4 ---- src/lib/esnext.decorators.d.ts | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/decorators.d.ts b/src/lib/decorators.d.ts index c64ee5a2550f9..977fa5fc5deb0 100644 --- a/src/lib/decorators.d.ts +++ b/src/lib/decorators.d.ts @@ -22,10 +22,6 @@ type DecoratorMetadataObject = Record & object; type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined; -interface Function { - [Symbol.metadata]: DecoratorMetadata | null; -} - /** * Context provided to a class decorator. * @template Class The type of the decorated class associated with this context. diff --git a/src/lib/esnext.decorators.d.ts b/src/lib/esnext.decorators.d.ts index ccd1ff03e7503..d5e6cb910daa0 100644 --- a/src/lib/esnext.decorators.d.ts +++ b/src/lib/esnext.decorators.d.ts @@ -1,5 +1,10 @@ /// +/// interface SymbolConstructor { readonly metadata: unique symbol; } + +interface Function { + [Symbol.metadata]: DecoratorMetadata | null; +} From 50ee8e42d4431b6829ec8b685256e02a635de711 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 23 Jun 2023 08:39:17 +0300 Subject: [PATCH 11/11] update baseline --- .../unittests/evaluation/esDecoratorsMetadata.ts | 8 ++++---- .../classStaticBlock18(target=es2015).js | 10 +++++----- .../reference/classStaticBlock18(target=es5).js | 10 +++++----- ...otComparedToNonMatchingIndexSignature.symbols | 2 +- .../reference/staticFieldWithInterfaceContext.js | 10 +++++----- .../superInStaticMembers1(target=es2015).js | 16 ++++++++-------- .../superInStaticMembers1(target=es2021).js | 16 ++++++++-------- .../superInStaticMembers1(target=es5).js | 12 ++++++------ .../truthinessCallExpressionCoercion2.symbols | 2 +- ...resolvableSelfReferencingAwaitedUnion.symbols | 2 +- 10 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts index 5458c750c2708..3a5a979d4895d 100644 --- a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts +++ b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts @@ -22,7 +22,7 @@ describe("unittests:: evaluation:: esDecoratorsMetadata", () => { // see https://github.com/tc39/proposal-decorator-metadata it(`@meta (${targetName})`, () => { const { output } = exec` - export const output: string[] = []; + export const output: unknown[] = []; function meta(key: string, value: string) { return (_, context) => { @@ -45,7 +45,7 @@ describe("unittests:: evaluation:: esDecoratorsMetadata", () => { // see https://github.com/tc39/proposal-decorator-metadata#inheritance it(`inheritance (${targetName})`, () => { const { output } = exec` - export const output: string[] = []; + export const output: unknown[] = []; function meta(key: string, value: string) { return (_, context) => { @@ -81,7 +81,7 @@ describe("unittests:: evaluation:: esDecoratorsMetadata", () => { // see https://github.com/tc39/proposal-decorator-metadata#inheritance it(`inheritance append(${targetName})`, () => { const { output } = exec` - export const output: string[] = []; + export const output: unknown[] = []; function appendMeta(key: string, value: string) { return (_, context) => { @@ -108,7 +108,7 @@ describe("unittests:: evaluation:: esDecoratorsMetadata", () => { // see https://github.com/tc39/proposal-decorator-metadata#private-metadata it(`private metadata (${targetName})`, () => { const { output } = exec` - export const output: string[] = []; + export const output: unknown[] = []; const PRIVATE_METADATA = new WeakMap(); function meta(key: string, value: string) { diff --git a/tests/baselines/reference/classStaticBlock18(target=es2015).js b/tests/baselines/reference/classStaticBlock18(target=es2015).js index 686ab29973a11..a594c733f7082 100644 --- a/tests/baselines/reference/classStaticBlock18(target=es2015).js +++ b/tests/baselines/reference/classStaticBlock18(target=es2015).js @@ -27,15 +27,15 @@ function foo() { }, _a.foo = 1, (() => { - var _a; - const c = (_a = class { + var _b; + const c = (_b = class { }, - __setFunctionName(_a, "c"), - _a.bar = 2, + __setFunctionName(_b, "c"), + _b.bar = 2, (() => { // do })(), - _a); + _b); })(), _a; } diff --git a/tests/baselines/reference/classStaticBlock18(target=es5).js b/tests/baselines/reference/classStaticBlock18(target=es5).js index f9e4b92bd6bc7..f9c310c90de12 100644 --- a/tests/baselines/reference/classStaticBlock18(target=es5).js +++ b/tests/baselines/reference/classStaticBlock18(target=es5).js @@ -30,18 +30,18 @@ function foo() { }()), _a.foo = 1, (function () { - var _a; - var c = (_a = /** @class */ (function () { + var _b; + var c = (_b = /** @class */ (function () { function class_2() { } return class_2; }()), - __setFunctionName(_a, "c"), - _a.bar = 2, + __setFunctionName(_b, "c"), + _b.bar = 2, (function () { // do })(), - _a); + _b); })(), _a; } diff --git a/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.symbols b/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.symbols index b7fffef21d287..e04910dc183d0 100644 --- a/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.symbols +++ b/tests/baselines/reference/jsxNamespacedNameNotComparedToNonMatchingIndexSignature.symbols @@ -11,7 +11,7 @@ declare module "react" { [key: `do-${string}`]: Function; >key : Symbol(key, Decl(jsxNamespacedNameNotComparedToNonMatchingIndexSignature.tsx, 4, 9)) ->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.decorators.d.ts, --, --)) "ns:thing"?: string; >"ns:thing" : Symbol(Attributes["ns:thing"], Decl(jsxNamespacedNameNotComparedToNonMatchingIndexSignature.tsx, 4, 40)) diff --git a/tests/baselines/reference/staticFieldWithInterfaceContext.js b/tests/baselines/reference/staticFieldWithInterfaceContext.js index fbc5257904418..c6b765a685e2b 100644 --- a/tests/baselines/reference/staticFieldWithInterfaceContext.js +++ b/tests/baselines/reference/staticFieldWithInterfaceContext.js @@ -56,15 +56,15 @@ var c2 = (_b = /** @class */ (function () { _b); c[ex] = { a: "a" }; function f(c) { - var _a; - if (c === void 0) { c = (_a = /** @class */ (function () { + var _r; + if (c === void 0) { c = (_r = /** @class */ (function () { function class_3() { } return class_3; }()), - __setFunctionName(_a, "c"), - _a.x = { a: "a" }, - _a); } + __setFunctionName(_r, "c"), + _r.x = { a: "a" }, + _r); } } var c3 = { c: (_d = /** @class */ (function () { function class_4() { diff --git a/tests/baselines/reference/superInStaticMembers1(target=es2015).js b/tests/baselines/reference/superInStaticMembers1(target=es2015).js index c287bc661be32..9532efbcd3b13 100644 --- a/tests/baselines/reference/superInStaticMembers1(target=es2015).js +++ b/tests/baselines/reference/superInStaticMembers1(target=es2015).js @@ -947,11 +947,11 @@ var _a; (_a = class Reflect { }, (() => { - var _a, _b; - class C extends (_b = B) { + var _b, _c; + class C extends (_c = B) { } - _a = C; - C._ = Reflect.get(_b, "w", _a).call(_a); + _b = C; + C._ = Reflect.get(_c, "w", _b).call(_b); })(), _a); export {}; @@ -960,12 +960,12 @@ var _a; (_a = class Reflect { }, (() => { - var _a, _b; - class C extends (_b = B) { + var _b, _c; + class C extends (_c = B) { } - _a = C; + _b = C; (() => { - Reflect.get(_b, "w", _a).call(_a); + Reflect.get(_c, "w", _b).call(_b); })(); })(), _a); diff --git a/tests/baselines/reference/superInStaticMembers1(target=es2021).js b/tests/baselines/reference/superInStaticMembers1(target=es2021).js index c287bc661be32..9532efbcd3b13 100644 --- a/tests/baselines/reference/superInStaticMembers1(target=es2021).js +++ b/tests/baselines/reference/superInStaticMembers1(target=es2021).js @@ -947,11 +947,11 @@ var _a; (_a = class Reflect { }, (() => { - var _a, _b; - class C extends (_b = B) { + var _b, _c; + class C extends (_c = B) { } - _a = C; - C._ = Reflect.get(_b, "w", _a).call(_a); + _b = C; + C._ = Reflect.get(_c, "w", _b).call(_b); })(), _a); export {}; @@ -960,12 +960,12 @@ var _a; (_a = class Reflect { }, (() => { - var _a, _b; - class C extends (_b = B) { + var _b, _c; + class C extends (_c = B) { } - _a = C; + _b = C; (() => { - Reflect.get(_b, "w", _a).call(_a); + Reflect.get(_c, "w", _b).call(_b); })(); })(), _a); diff --git a/tests/baselines/reference/superInStaticMembers1(target=es5).js b/tests/baselines/reference/superInStaticMembers1(target=es5).js index 58995a4d63343..e96dc0ed5f453 100644 --- a/tests/baselines/reference/superInStaticMembers1(target=es5).js +++ b/tests/baselines/reference/superInStaticMembers1(target=es5).js @@ -1890,9 +1890,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); function C() { return _super !== null && _super.apply(this, arguments) || this; } - var _a; - _a = C; - C._ = _super.w.call(_a); + var _b; + _b = C; + C._ = _super.w.call(_b); return C; }(B)); })(), @@ -1923,7 +1923,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); return Reflect; }()), (function () { - var _a; + var _b; var C = /** @class */ (function (_super) { __extends(C, _super); function C() { @@ -1931,9 +1931,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); } return C; }(B)); - _a = C; + _b = C; (function () { - _super.w.call(_a); + _super.w.call(_b); })(); })(), _a); diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion2.symbols b/tests/baselines/reference/truthinessCallExpressionCoercion2.symbols index d9a8d9a111e02..2ff8650525660 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion2.symbols +++ b/tests/baselines/reference/truthinessCallExpressionCoercion2.symbols @@ -313,7 +313,7 @@ function checksPropertyAccess() { >A.from : Symbol(A.from, Decl(truthinessCallExpressionCoercion2.ts, 0, 17)) >A : Symbol(A, Decl(truthinessCallExpressionCoercion2.ts, 0, 0)) >from : Symbol(A.from, Decl(truthinessCallExpressionCoercion2.ts, 0, 17)) ->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.decorators.d.ts, --, --)) >B.from : Symbol(B.from, Decl(truthinessCallExpressionCoercion2.ts, 4, 17)) >B : Symbol(B, Decl(truthinessCallExpressionCoercion2.ts, 2, 1)) >from : Symbol(B.from, Decl(truthinessCallExpressionCoercion2.ts, 4, 17)) diff --git a/tests/baselines/reference/unresolvableSelfReferencingAwaitedUnion.symbols b/tests/baselines/reference/unresolvableSelfReferencingAwaitedUnion.symbols index 47cee2add7c70..425d4625da1e9 100644 --- a/tests/baselines/reference/unresolvableSelfReferencingAwaitedUnion.symbols +++ b/tests/baselines/reference/unresolvableSelfReferencingAwaitedUnion.symbols @@ -59,7 +59,7 @@ export async function handleEffectResult(result: EffectResult) { if (result instanceof Function) { >result : Symbol(result, Decl(unresolvableSelfReferencingAwaitedUnion.ts, 24, 41)) ->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.decorators.d.ts, --, --)) await handleEffectResult(result()); >handleEffectResult : Symbol(handleEffectResult, Decl(unresolvableSelfReferencingAwaitedUnion.ts, 22, 26))