typescript 5.2.0-dev.20230623 → 5.2.0-dev.20230625

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,11 @@ type DecoratorContext =
35
35
  | ClassMemberDecoratorContext
36
36
  ;
37
37
 
38
+ type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
39
+
40
+ type DecoratorMetadata =
41
+ typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
42
+
38
43
  /**
39
44
  * Context provided to a class decorator.
40
45
  * @template Class The type of the decorated class associated with this context.
@@ -66,6 +71,8 @@ interface ClassDecoratorContext<
66
71
  * ```
67
72
  */
68
73
  addInitializer(initializer: (this: Class) => void): void;
74
+
75
+ readonly metadata: DecoratorMetadata;
69
76
  }
70
77
 
71
78
  /**
@@ -130,6 +137,8 @@ interface ClassMethodDecoratorContext<
130
137
  * ```
131
138
  */
132
139
  addInitializer(initializer: (this: This) => void): void;
140
+
141
+ readonly metadata: DecoratorMetadata;
133
142
  }
134
143
 
135
144
  /**
@@ -175,6 +184,8 @@ interface ClassGetterDecoratorContext<
175
184
  * decorating a non-`static` element).
176
185
  */
177
186
  addInitializer(initializer: (this: This) => void): void;
187
+
188
+ readonly metadata: DecoratorMetadata;
178
189
  }
179
190
 
180
191
  /**
@@ -220,6 +231,8 @@ interface ClassSetterDecoratorContext<
220
231
  * decorating a non-`static` element).
221
232
  */
222
233
  addInitializer(initializer: (this: This) => void): void;
234
+
235
+ readonly metadata: DecoratorMetadata;
223
236
  }
224
237
 
225
238
  /**
@@ -274,6 +287,8 @@ interface ClassAccessorDecoratorContext<
274
287
  * decorating a non-`static` element).
275
288
  */
276
289
  addInitializer(initializer: (this: This) => void): void;
290
+
291
+ readonly metadata: DecoratorMetadata;
277
292
  }
278
293
 
279
294
  /**
@@ -369,4 +384,6 @@ interface ClassFieldDecoratorContext<
369
384
  * decorating a non-`static` element).
370
385
  */
371
386
  addInitializer(initializer: (this: This) => void): void;
387
+
388
+ readonly metadata: DecoratorMetadata;
372
389
  }
@@ -18,4 +18,5 @@ and limitations under the License.
18
18
 
19
19
  /// <reference lib="es2023" />
20
20
  /// <reference lib="esnext.intl" />
21
+ /// <reference lib="esnext.decorators" />
21
22
  /// <reference lib="esnext.disposable" />
@@ -0,0 +1,28 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ /// <reference lib="es2015.symbol" />
20
+ /// <reference lib="decorators" />
21
+
22
+ interface SymbolConstructor {
23
+ readonly metadata: unique symbol;
24
+ }
25
+
26
+ interface Function {
27
+ [Symbol.metadata]: DecoratorMetadata | null;
28
+ }
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.2";
21
- var version = `${versionMajorMinor}.0-dev.20230623`;
21
+ var version = `${versionMajorMinor}.0-dev.20230625`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -5792,6 +5792,7 @@ var Diagnostics = {
5792
5792
  A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."),
5793
5793
  Expression_expected: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."),
5794
5794
  Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."),
5795
+ Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."),
5795
5796
  A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."),
5796
5797
  Duplicate_label_0: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."),
5797
5798
  A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."),
@@ -12915,6 +12916,10 @@ function getContainingClassStaticBlock(node) {
12915
12916
  function getContainingFunctionOrClassStaticBlock(node) {
12916
12917
  return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration);
12917
12918
  }
12919
+ function getContainingClassExcludingClassDecorators(node) {
12920
+ const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? "quit" : isDecorator(n));
12921
+ return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node);
12922
+ }
12918
12923
  function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) {
12919
12924
  Debug.assert(node.kind !== 312 /* SourceFile */);
12920
12925
  while (true) {
@@ -22988,10 +22993,12 @@ function createEmitHelperFactory(context) {
22988
22993
  );
22989
22994
  }
22990
22995
  function createESDecorateClassContextObject(contextIn) {
22991
- return factory2.createObjectLiteralExpression([
22996
+ const properties = [
22992
22997
  factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral("class")),
22993
- factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name)
22994
- ]);
22998
+ factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name),
22999
+ factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata)
23000
+ ];
23001
+ return factory2.createObjectLiteralExpression(properties);
22995
23002
  }
22996
23003
  function createESDecorateClassElementAccessGetMethod(elementName) {
22997
23004
  const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name);
@@ -23095,13 +23102,15 @@ function createEmitHelperFactory(context) {
23095
23102
  return factory2.createObjectLiteralExpression(properties);
23096
23103
  }
23097
23104
  function createESDecorateClassElementContextObject(contextIn) {
23098
- return factory2.createObjectLiteralExpression([
23105
+ const properties = [
23099
23106
  factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)),
23100
23107
  factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)),
23101
23108
  factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()),
23102
23109
  factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()),
23103
- factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access))
23104
- ]);
23110
+ factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)),
23111
+ factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata)
23112
+ ];
23113
+ return factory2.createObjectLiteralExpression(properties);
23105
23114
  }
23106
23115
  function createESDecorateContextObject(contextIn) {
23107
23116
  return contextIn.kind === "class" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn);
@@ -33677,6 +33686,7 @@ var libEntries = [
33677
33686
  ["esnext.string", "lib.es2022.string.d.ts"],
33678
33687
  ["esnext.promise", "lib.es2021.promise.d.ts"],
33679
33688
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
33689
+ ["esnext.decorators", "lib.esnext.decorators.d.ts"],
33680
33690
  ["decorators", "lib.decorators.d.ts"],
33681
33691
  ["decorators.legacy", "lib.decorators.legacy.d.ts"]
33682
33692
  ];
@@ -66032,7 +66042,7 @@ function createTypeChecker(host) {
66032
66042
  location = location.parent;
66033
66043
  }
66034
66044
  if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
66035
- const type = getTypeOfExpression(location);
66045
+ const type = removeOptionalTypeMarker(getTypeOfExpression(location));
66036
66046
  if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
66037
66047
  return type;
66038
66048
  }
@@ -69043,7 +69053,7 @@ function createTypeChecker(host) {
69043
69053
  return isCallOrNewExpression(node.parent) && node.parent.expression === node;
69044
69054
  }
69045
69055
  function lookupSymbolForPrivateIdentifierDeclaration(propName, location) {
69046
- for (let containingClass = getContainingClass(location); !!containingClass; containingClass = getContainingClass(containingClass)) {
69056
+ for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) {
69047
69057
  const { symbol } = containingClass;
69048
69058
  const name = getSymbolNameForPrivateIdentifier(symbol, propName);
69049
69059
  const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name);
@@ -69179,16 +69189,22 @@ function createTypeChecker(host) {
69179
69189
  if (lexicallyScopedSymbol) {
69180
69190
  return isErrorType(apparentType) ? errorType : apparentType;
69181
69191
  }
69182
- if (!getContainingClass(right)) {
69192
+ if (getContainingClassExcludingClassDecorators(right) === void 0) {
69183
69193
  grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
69184
69194
  return anyType;
69185
69195
  }
69186
69196
  }
69187
- prop = lexicallyScopedSymbol ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol) : void 0;
69188
- if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) {
69189
- return errorType;
69197
+ prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol);
69198
+ if (prop === void 0) {
69199
+ if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) {
69200
+ return errorType;
69201
+ }
69202
+ const containingClass = getContainingClassExcludingClassDecorators(right);
69203
+ if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) {
69204
+ grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right));
69205
+ }
69190
69206
  } else {
69191
- const isSetonlyAccessor = prop && prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
69207
+ const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */);
69192
69208
  if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) {
69193
69209
  error(node, Diagnostics.Private_accessor_was_defined_without_a_getter);
69194
69210
  }
@@ -89776,9 +89792,12 @@ function transformClassFields(context) {
89776
89792
  return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis;
89777
89793
  }
89778
89794
  const classCheckFlags = resolver.getNodeCheckFlags(node);
89779
- const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */;
89780
89795
  const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
89781
- const temp2 = factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2);
89796
+ const temp2 = factory2.createTempVariable(
89797
+ requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration,
89798
+ /*reservedInNestedScopes*/
89799
+ true
89800
+ );
89782
89801
  getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2);
89783
89802
  return temp2;
89784
89803
  }
@@ -91941,6 +91960,7 @@ function transformESDecorators(context) {
91941
91960
  );
91942
91961
  }
91943
91962
  function createClassInfo(node) {
91963
+ const metadataReference = factory2.createUniqueName("_metadata", 16 /* Optimistic */ | 32 /* FileLevel */);
91944
91964
  let instanceExtraInitializersName;
91945
91965
  let staticExtraInitializersName;
91946
91966
  let hasStaticInitializers = false;
@@ -91979,6 +91999,7 @@ function transformESDecorators(context) {
91979
91999
  }
91980
92000
  return {
91981
92001
  class: node,
92002
+ metadataReference,
91982
92003
  instanceExtraInitializersName,
91983
92004
  staticExtraInitializersName,
91984
92005
  hasStaticInitializers,
@@ -91986,16 +92007,6 @@ function transformESDecorators(context) {
91986
92007
  hasStaticPrivateClassElements
91987
92008
  };
91988
92009
  }
91989
- function containsLexicalSuperInStaticInitializer(node) {
91990
- for (const member of node.members) {
91991
- if (isClassStaticBlockDeclaration(member) || isPropertyDeclaration(member) && hasStaticModifier(member)) {
91992
- if (member.transformFlags & 134217728 /* ContainsLexicalSuper */) {
91993
- return true;
91994
- }
91995
- }
91996
- }
91997
- return false;
91998
- }
91999
92010
  function transformClassLike(node) {
92000
92011
  startLexicalEnvironment();
92001
92012
  if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated(
@@ -92039,29 +92050,26 @@ function transformESDecorators(context) {
92039
92050
  shouldTransformPrivateStaticElementsInFile = true;
92040
92051
  }
92041
92052
  }
92042
- if (classDecorators && containsLexicalSuperInStaticInitializer(node)) {
92043
- const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */);
92044
- const extendsElement = extendsClause && firstOrUndefined(extendsClause.types);
92045
- const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression);
92046
- if (extendsExpression) {
92047
- classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */);
92048
- const unwrapped = skipOuterExpressions(extendsExpression);
92049
- const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression;
92050
- classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression));
92051
- const updatedExtendsElement = factory2.updateExpressionWithTypeArguments(
92052
- extendsElement,
92053
- classInfo2.classSuper,
92054
- /*typeArguments*/
92055
- void 0
92056
- );
92057
- const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]);
92058
- heritageClauses = factory2.createNodeArray([updatedExtendsClause]);
92059
- }
92060
- } else {
92061
- heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause);
92053
+ const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */);
92054
+ const extendsElement = extendsClause && firstOrUndefined(extendsClause.types);
92055
+ const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression);
92056
+ if (extendsExpression) {
92057
+ classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */);
92058
+ const unwrapped = skipOuterExpressions(extendsExpression);
92059
+ const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression;
92060
+ classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression));
92061
+ const updatedExtendsElement = factory2.updateExpressionWithTypeArguments(
92062
+ extendsElement,
92063
+ classInfo2.classSuper,
92064
+ /*typeArguments*/
92065
+ void 0
92066
+ );
92067
+ const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]);
92068
+ heritageClauses = factory2.createNodeArray([updatedExtendsClause]);
92062
92069
  }
92063
92070
  const renamedClassThis = classInfo2.classThis ?? factory2.createThis();
92064
92071
  enterClass(classInfo2);
92072
+ leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper));
92065
92073
  let members = visitNodes2(node.members, classElementVisitor, isClassElement);
92066
92074
  if (pendingExpressions) {
92067
92075
  let outerThis;
@@ -92167,7 +92175,7 @@ function transformESDecorators(context) {
92167
92175
  factory2.createNull(),
92168
92176
  classDescriptorAssignment,
92169
92177
  classInfo2.classDecoratorsName,
92170
- { kind: "class", name: classNameReference },
92178
+ { kind: "class", name: classNameReference, metadata: classInfo2.metadataReference },
92171
92179
  factory2.createNull(),
92172
92180
  classInfo2.classExtraInitializersName
92173
92181
  );
@@ -92179,6 +92187,7 @@ function transformESDecorators(context) {
92179
92187
  const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment);
92180
92188
  leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment));
92181
92189
  }
92190
+ leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference));
92182
92191
  if (classInfo2.staticExtraInitializersName) {
92183
92192
  const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.staticExtraInitializersName);
92184
92193
  const runStaticInitializersStatement = factory2.createExpressionStatement(runStaticInitializersHelper);
@@ -92557,7 +92566,8 @@ function transformESDecorators(context) {
92557
92566
  get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member),
92558
92567
  // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ...
92559
92568
  set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member)
92560
- }
92569
+ },
92570
+ metadata: classInfo2.metadataReference
92561
92571
  };
92562
92572
  const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */));
92563
92573
  if (isMethodOrAccessor(member)) {
@@ -93347,6 +93357,60 @@ function transformESDecorators(context) {
93347
93357
  ])
93348
93358
  );
93349
93359
  }
93360
+ function createMetadata(name, classSuper2) {
93361
+ const varDecl = factory2.createVariableDeclaration(
93362
+ name,
93363
+ /*exclamationToken*/
93364
+ void 0,
93365
+ /*type*/
93366
+ void 0,
93367
+ factory2.createConditionalExpression(
93368
+ factory2.createLogicalAnd(
93369
+ factory2.createTypeCheck(factory2.createIdentifier("Symbol"), "function"),
93370
+ factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata")
93371
+ ),
93372
+ factory2.createToken(58 /* QuestionToken */),
93373
+ factory2.createCallExpression(
93374
+ factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "create"),
93375
+ /*typeArguments*/
93376
+ void 0,
93377
+ [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()]
93378
+ ),
93379
+ factory2.createToken(59 /* ColonToken */),
93380
+ factory2.createVoidZero()
93381
+ )
93382
+ );
93383
+ return factory2.createVariableStatement(
93384
+ /*modifiers*/
93385
+ void 0,
93386
+ factory2.createVariableDeclarationList([varDecl], 2 /* Const */)
93387
+ );
93388
+ }
93389
+ function createSymbolMetadata(target, value) {
93390
+ const defineProperty = factory2.createObjectDefinePropertyCall(
93391
+ target,
93392
+ factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata"),
93393
+ factory2.createPropertyDescriptor(
93394
+ { configurable: true, writable: true, enumerable: true, value },
93395
+ /*singleLine*/
93396
+ true
93397
+ )
93398
+ );
93399
+ return setEmitFlags(
93400
+ factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)),
93401
+ 1 /* SingleLine */
93402
+ );
93403
+ }
93404
+ function createSymbolMetadataReference(classSuper2) {
93405
+ return factory2.createBinaryExpression(
93406
+ factory2.createElementAccessExpression(
93407
+ classSuper2,
93408
+ factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata")
93409
+ ),
93410
+ 61 /* QuestionQuestionToken */,
93411
+ factory2.createNull()
93412
+ );
93413
+ }
93350
93414
  }
93351
93415
 
93352
93416
  // src/compiler/transformers/es2017.ts
@@ -115131,6 +115195,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([
115131
115195
  Diagnostics.Class_constructor_may_not_be_an_accessor.code,
115132
115196
  Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
115133
115197
  Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
115198
+ Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code,
115134
115199
  // Type errors
115135
115200
  Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code
115136
115201
  ]);