typescript 4.8.0-dev.20220511 → 4.8.0-dev.20220514

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.
package/lib/tsserver.js CHANGED
@@ -100,7 +100,7 @@ var ts;
100
100
  // The following is baselined as a literal template type without intervention
101
101
  /** The version of the TypeScript compiler release */
102
102
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
103
- ts.version = ts.versionMajorMinor + ".0-dev.20220511";
103
+ ts.version = ts.versionMajorMinor + ".0-dev.20220514";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -8142,6 +8142,7 @@ var ts;
8142
8142
  String_literal_expected: diag(1141, ts.DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."),
8143
8143
  Line_break_not_permitted_here: diag(1142, ts.DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."),
8144
8144
  or_expected: diag(1144, ts.DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."),
8145
+ or_JSX_element_expected: diag(1145, ts.DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."),
8145
8146
  Declaration_expected: diag(1146, ts.DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."),
8146
8147
  Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, ts.DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."),
8147
8148
  Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, ts.DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."),
@@ -8287,6 +8288,7 @@ var ts;
8287
8288
  infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, ts.DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."),
8288
8289
  Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
8289
8290
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
8291
+ Class_constructor_may_not_be_an_accessor: diag(1341, ts.DiagnosticCategory.Error, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
8290
8292
  Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
8291
8293
  The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),
8292
8294
  A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
@@ -8305,6 +8307,7 @@ var ts;
8305
8307
  An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."),
8306
8308
  Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."),
8307
8309
  Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."),
8310
+ Class_constructor_may_not_be_a_generator: diag(1360, ts.DiagnosticCategory.Error, "Class_constructor_may_not_be_a_generator_1360", "Class constructor may not be a generator."),
8308
8311
  _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."),
8309
8312
  _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."),
8310
8313
  A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."),
@@ -8894,6 +8897,7 @@ var ts;
8894
8897
  Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
8895
8898
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
8896
8899
  All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
8900
+ This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
8897
8901
  Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
8898
8902
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
8899
8903
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -13204,6 +13208,19 @@ var ts;
13204
13208
  return isLiteralKind(node.kind);
13205
13209
  }
13206
13210
  ts.isLiteralExpression = isLiteralExpression;
13211
+ /** @internal */
13212
+ function isLiteralExpressionOfObject(node) {
13213
+ switch (node.kind) {
13214
+ case 205 /* ObjectLiteralExpression */:
13215
+ case 204 /* ArrayLiteralExpression */:
13216
+ case 13 /* RegularExpressionLiteral */:
13217
+ case 213 /* FunctionExpression */:
13218
+ case 226 /* ClassExpression */:
13219
+ return true;
13220
+ }
13221
+ return false;
13222
+ }
13223
+ ts.isLiteralExpressionOfObject = isLiteralExpressionOfObject;
13207
13224
  // Pseudo-literals
13208
13225
  /* @internal */
13209
13226
  function isTemplateLiteralKind(kind) {
@@ -35202,9 +35219,22 @@ var ts;
35202
35219
  }
35203
35220
  scanJsxIdentifier();
35204
35221
  var pos = getNodePos();
35205
- return finishNode(factory.createJsxAttribute(parseIdentifierName(), token() !== 63 /* EqualsToken */ ? undefined :
35206
- scanJsxAttributeValue() === 10 /* StringLiteral */ ? parseLiteralNode() :
35207
- parseJsxExpression(/*inExpressionContext*/ true)), pos);
35222
+ return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
35223
+ }
35224
+ function parseJsxAttributeValue() {
35225
+ if (token() === 63 /* EqualsToken */) {
35226
+ if (scanJsxAttributeValue() === 10 /* StringLiteral */) {
35227
+ return parseLiteralNode();
35228
+ }
35229
+ if (token() === 18 /* OpenBraceToken */) {
35230
+ return parseJsxExpression(/*inExpressionContext*/ true);
35231
+ }
35232
+ if (token() === 29 /* LessThanToken */) {
35233
+ return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ true);
35234
+ }
35235
+ parseErrorAtCurrentToken(ts.Diagnostics.or_JSX_element_expected);
35236
+ }
35237
+ return undefined;
35208
35238
  }
35209
35239
  function parseJsxSpreadAttribute() {
35210
35240
  var pos = getNodePos();
@@ -51477,8 +51507,9 @@ var ts;
51477
51507
  function getExportSymbolOfValueSymbolIfExported(symbol) {
51478
51508
  return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
51479
51509
  }
51480
- function symbolIsValue(symbol) {
51481
- return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol));
51510
+ function symbolIsValue(symbol, includeTypeOnlyMembers) {
51511
+ return !!(symbol.flags & 111551 /* Value */ ||
51512
+ symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
51482
51513
  }
51483
51514
  function findConstructorDeclaration(node) {
51484
51515
  var members = node.members;
@@ -59168,12 +59199,12 @@ var ts;
59168
59199
  * @param type a type to look up property from
59169
59200
  * @param name a name of property to look up in a given type
59170
59201
  */
59171
- function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment) {
59202
+ function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {
59172
59203
  type = getReducedApparentType(type);
59173
59204
  if (type.flags & 524288 /* Object */) {
59174
59205
  var resolved = resolveStructuredTypeMembers(type);
59175
59206
  var symbol = resolved.members.get(name);
59176
- if (symbol && symbolIsValue(symbol)) {
59207
+ if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
59177
59208
  return symbol;
59178
59209
  }
59179
59210
  if (skipObjectFunctionPropertyAugment)
@@ -62553,7 +62584,7 @@ var ts;
62553
62584
  // the `exports` lookup process that only looks up namespace members which is used for most type references
62554
62585
  var mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));
62555
62586
  var next = node.isTypeOf
62556
- ? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText)
62587
+ ? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ true)
62557
62588
  : getSymbol(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);
62558
62589
  if (!next) {
62559
62590
  error(current, ts.Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), ts.declarationNameToString(current));
@@ -74469,9 +74500,8 @@ var ts;
74469
74500
  markAliasReferenced(parentSymbol, node);
74470
74501
  }
74471
74502
  return isErrorType(apparentType) ? errorType : apparentType;
74472
- ;
74473
74503
  }
74474
- prop = getPropertyOfType(apparentType, right.escapedText);
74504
+ prop = getPropertyOfType(apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ node.kind === 161 /* QualifiedName */);
74475
74505
  }
74476
74506
  // In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
74477
74507
  // `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
@@ -78963,6 +78993,10 @@ var ts;
78963
78993
  case 35 /* ExclamationEqualsToken */:
78964
78994
  case 36 /* EqualsEqualsEqualsToken */:
78965
78995
  case 37 /* ExclamationEqualsEqualsToken */:
78996
+ if (ts.isLiteralExpressionOfObject(left) || ts.isLiteralExpressionOfObject(right)) {
78997
+ var eqType = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */;
78998
+ error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
78999
+ }
78966
79000
  reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
78967
79001
  return booleanType;
78968
79002
  case 102 /* InstanceOfKeyword */:
@@ -80254,6 +80288,9 @@ var ts;
80254
80288
  // Grammar checking
80255
80289
  if (!checkGrammarMethod(node))
80256
80290
  checkGrammarComputedPropertyName(node.name);
80291
+ if (ts.isMethodDeclaration(node) && node.asteriskToken && ts.isIdentifier(node.name) && ts.idText(node.name) === "constructor") {
80292
+ error(node.name, ts.Diagnostics.Class_constructor_may_not_be_a_generator);
80293
+ }
80257
80294
  // Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration
80258
80295
  checkFunctionOrMethodDeclaration(node);
80259
80296
  // method signatures already report "implementation not allowed in ambient context" elsewhere
@@ -80381,6 +80418,9 @@ var ts;
80381
80418
  return !!ts.forEachChild(node, nodeImmediatelyReferencesSuperOrThis);
80382
80419
  }
80383
80420
  function checkAccessorDeclaration(node) {
80421
+ if (ts.isIdentifier(node.name) && ts.idText(node.name) === "constructor") {
80422
+ error(node.name, ts.Diagnostics.Class_constructor_may_not_be_an_accessor);
80423
+ }
80384
80424
  addLazyDiagnostic(checkAccessorDeclarationDiagnostics);
80385
80425
  checkSourceElement(node.body);
80386
80426
  setNodeLinksForPrivateIdentifierScope(node);
@@ -97809,22 +97849,29 @@ var ts;
97809
97849
  if (node === undefined) {
97810
97850
  return factory.createTrue();
97811
97851
  }
97812
- else if (node.kind === 10 /* StringLiteral */) {
97852
+ if (node.kind === 10 /* StringLiteral */) {
97813
97853
  // Always recreate the literal to escape any escape sequences or newlines which may be in the original jsx string and which
97814
97854
  // Need to be escaped to be handled correctly in a normal string
97815
97855
  var singleQuote = node.singleQuote !== undefined ? node.singleQuote : !ts.isStringDoubleQuoted(node, currentSourceFile);
97816
97856
  var literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
97817
97857
  return ts.setTextRange(literal, node);
97818
97858
  }
97819
- else if (node.kind === 288 /* JsxExpression */) {
97859
+ if (node.kind === 288 /* JsxExpression */) {
97820
97860
  if (node.expression === undefined) {
97821
97861
  return factory.createTrue();
97822
97862
  }
97823
97863
  return ts.visitNode(node.expression, visitor, ts.isExpression);
97824
97864
  }
97825
- else {
97826
- return ts.Debug.failBadSyntaxKind(node);
97865
+ if (ts.isJsxElement(node)) {
97866
+ return visitJsxElement(node, /*isChild*/ false);
97867
+ }
97868
+ if (ts.isJsxSelfClosingElement(node)) {
97869
+ return visitJsxSelfClosingElement(node, /*isChild*/ false);
97870
+ }
97871
+ if (ts.isJsxFragment(node)) {
97872
+ return visitJsxFragment(node, /*isChild*/ false);
97827
97873
  }
97874
+ return ts.Debug.failBadSyntaxKind(node);
97828
97875
  }
97829
97876
  function visitJsxText(node) {
97830
97877
  var fixed = fixupWhitespaceAndDecodeEntities(node.text);
@@ -116398,6 +116445,8 @@ var ts;
116398
116445
  ts.Diagnostics.extends_clause_already_seen.code,
116399
116446
  ts.Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code,
116400
116447
  ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,
116448
+ ts.Diagnostics.Class_constructor_may_not_be_a_generator.code,
116449
+ ts.Diagnostics.Class_constructor_may_not_be_an_accessor.code,
116401
116450
  ]);
116402
116451
  /**
116403
116452
  * Determine if source file needs to be re-created even if its text hasn't changed
@@ -122925,6 +122974,13 @@ var ts;
122925
122974
  ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
122926
122975
  WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
122927
122976
  PackageJson: "package.json file",
122977
+ ClosedScriptInfo: "Closed Script info",
122978
+ ConfigFileForInferredRoot: "Config file for the inferred project root",
122979
+ NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
122980
+ MissingSourceMapFile: "Missing source map file",
122981
+ NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
122982
+ MissingGeneratedFile: "Missing generated file",
122983
+ NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
122928
122984
  };
122929
122985
  function createWatchFactory(host, options) {
122930
122986
  var watchLogLevel = host.trace ? options.extendedDiagnostics ? ts.WatchLogLevel.Verbose : options.diagnostics ? ts.WatchLogLevel.TriggerOnly : ts.WatchLogLevel.None : ts.WatchLogLevel.None;
@@ -165691,7 +165747,7 @@ var ts;
165691
165747
  function getDefaultLibFilePath(options) {
165692
165748
  // Check __dirname is defined and that we are on a node.js system.
165693
165749
  if (typeof __dirname !== "undefined") {
165694
- return __dirname + ts.directorySeparator + ts.getDefaultLibFileName(options);
165750
+ return ts.combinePaths(__dirname, ts.getDefaultLibFileName(options));
165695
165751
  }
165696
165752
  throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
165697
165753
  }
@@ -167820,16 +167876,6 @@ var ts;
167820
167876
  server.stringifyIndented = stringifyIndented;
167821
167877
  })(server = ts.server || (ts.server = {}));
167822
167878
  })(ts || (ts = {}));
167823
- /* @internal */
167824
- var ts;
167825
- (function (ts) {
167826
- ts.WatchType.ClosedScriptInfo = "Closed Script info";
167827
- ts.WatchType.ConfigFileForInferredRoot = "Config file for the inferred project root";
167828
- ts.WatchType.NodeModules = "node_modules for closed script infos and package.jsons affecting module specifier cache";
167829
- ts.WatchType.MissingSourceMapFile = "Missing source map file";
167830
- ts.WatchType.NoopConfigFileForInferredRoot = "Noop Config file for the inferred project root";
167831
- ts.WatchType.MissingGeneratedFile = "Missing generated file";
167832
- })(ts || (ts = {}));
167833
167879
  /* eslint-disable @typescript-eslint/no-unnecessary-qualifier */
167834
167880
  /**
167835
167881
  * Declaration module describing the TypeScript Server protocol
@@ -1388,8 +1388,9 @@ declare namespace ts {
1388
1388
  readonly kind: SyntaxKind.JsxAttribute;
1389
1389
  readonly parent: JsxAttributes;
1390
1390
  readonly name: Identifier;
1391
- readonly initializer?: StringLiteral | JsxExpression;
1391
+ readonly initializer?: JsxAttributeValue;
1392
1392
  }
1393
+ export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
1393
1394
  export interface JsxSpreadAttribute extends ObjectLiteralElement {
1394
1395
  readonly kind: SyntaxKind.JsxSpreadAttribute;
1395
1396
  readonly parent: JsxAttributes;
@@ -3746,8 +3747,8 @@ declare namespace ts {
3746
3747
  createJsxOpeningFragment(): JsxOpeningFragment;
3747
3748
  createJsxJsxClosingFragment(): JsxClosingFragment;
3748
3749
  updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
3749
- createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
3750
- updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
3750
+ createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
3751
+ updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
3751
3752
  createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
3752
3753
  updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
3753
3754
  createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
@@ -11339,9 +11340,9 @@ declare namespace ts {
11339
11340
  /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
11340
11341
  const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
11341
11342
  /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
11342
- const createJsxAttribute: (name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
11343
+ const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
11343
11344
  /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
11344
- const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
11345
+ const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
11345
11346
  /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
11346
11347
  const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
11347
11348
  /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220511";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220514";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -8336,6 +8336,7 @@ var ts;
8336
8336
  String_literal_expected: diag(1141, ts.DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."),
8337
8337
  Line_break_not_permitted_here: diag(1142, ts.DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."),
8338
8338
  or_expected: diag(1144, ts.DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."),
8339
+ or_JSX_element_expected: diag(1145, ts.DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."),
8339
8340
  Declaration_expected: diag(1146, ts.DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."),
8340
8341
  Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, ts.DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."),
8341
8342
  Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, ts.DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."),
@@ -8481,6 +8482,7 @@ var ts;
8481
8482
  infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, ts.DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."),
8482
8483
  Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
8483
8484
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
8485
+ Class_constructor_may_not_be_an_accessor: diag(1341, ts.DiagnosticCategory.Error, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
8484
8486
  Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
8485
8487
  The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),
8486
8488
  A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
@@ -8499,6 +8501,7 @@ var ts;
8499
8501
  An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."),
8500
8502
  Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."),
8501
8503
  Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."),
8504
+ Class_constructor_may_not_be_a_generator: diag(1360, ts.DiagnosticCategory.Error, "Class_constructor_may_not_be_a_generator_1360", "Class constructor may not be a generator."),
8502
8505
  _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."),
8503
8506
  _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."),
8504
8507
  A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."),
@@ -9088,6 +9091,7 @@ var ts;
9088
9091
  Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
9089
9092
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
9090
9093
  All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
9094
+ This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
9091
9095
  Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
9092
9096
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
9093
9097
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -13398,6 +13402,19 @@ var ts;
13398
13402
  return isLiteralKind(node.kind);
13399
13403
  }
13400
13404
  ts.isLiteralExpression = isLiteralExpression;
13405
+ /** @internal */
13406
+ function isLiteralExpressionOfObject(node) {
13407
+ switch (node.kind) {
13408
+ case 205 /* ObjectLiteralExpression */:
13409
+ case 204 /* ArrayLiteralExpression */:
13410
+ case 13 /* RegularExpressionLiteral */:
13411
+ case 213 /* FunctionExpression */:
13412
+ case 226 /* ClassExpression */:
13413
+ return true;
13414
+ }
13415
+ return false;
13416
+ }
13417
+ ts.isLiteralExpressionOfObject = isLiteralExpressionOfObject;
13401
13418
  // Pseudo-literals
13402
13419
  /* @internal */
13403
13420
  function isTemplateLiteralKind(kind) {
@@ -35396,9 +35413,22 @@ var ts;
35396
35413
  }
35397
35414
  scanJsxIdentifier();
35398
35415
  var pos = getNodePos();
35399
- return finishNode(factory.createJsxAttribute(parseIdentifierName(), token() !== 63 /* EqualsToken */ ? undefined :
35400
- scanJsxAttributeValue() === 10 /* StringLiteral */ ? parseLiteralNode() :
35401
- parseJsxExpression(/*inExpressionContext*/ true)), pos);
35416
+ return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
35417
+ }
35418
+ function parseJsxAttributeValue() {
35419
+ if (token() === 63 /* EqualsToken */) {
35420
+ if (scanJsxAttributeValue() === 10 /* StringLiteral */) {
35421
+ return parseLiteralNode();
35422
+ }
35423
+ if (token() === 18 /* OpenBraceToken */) {
35424
+ return parseJsxExpression(/*inExpressionContext*/ true);
35425
+ }
35426
+ if (token() === 29 /* LessThanToken */) {
35427
+ return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ true);
35428
+ }
35429
+ parseErrorAtCurrentToken(ts.Diagnostics.or_JSX_element_expected);
35430
+ }
35431
+ return undefined;
35402
35432
  }
35403
35433
  function parseJsxSpreadAttribute() {
35404
35434
  var pos = getNodePos();
@@ -51671,8 +51701,9 @@ var ts;
51671
51701
  function getExportSymbolOfValueSymbolIfExported(symbol) {
51672
51702
  return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
51673
51703
  }
51674
- function symbolIsValue(symbol) {
51675
- return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && !getTypeOnlyAliasDeclaration(symbol));
51704
+ function symbolIsValue(symbol, includeTypeOnlyMembers) {
51705
+ return !!(symbol.flags & 111551 /* Value */ ||
51706
+ symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
51676
51707
  }
51677
51708
  function findConstructorDeclaration(node) {
51678
51709
  var members = node.members;
@@ -59362,12 +59393,12 @@ var ts;
59362
59393
  * @param type a type to look up property from
59363
59394
  * @param name a name of property to look up in a given type
59364
59395
  */
59365
- function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment) {
59396
+ function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {
59366
59397
  type = getReducedApparentType(type);
59367
59398
  if (type.flags & 524288 /* Object */) {
59368
59399
  var resolved = resolveStructuredTypeMembers(type);
59369
59400
  var symbol = resolved.members.get(name);
59370
- if (symbol && symbolIsValue(symbol)) {
59401
+ if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
59371
59402
  return symbol;
59372
59403
  }
59373
59404
  if (skipObjectFunctionPropertyAugment)
@@ -62747,7 +62778,7 @@ var ts;
62747
62778
  // the `exports` lookup process that only looks up namespace members which is used for most type references
62748
62779
  var mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));
62749
62780
  var next = node.isTypeOf
62750
- ? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText)
62781
+ ? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ true)
62751
62782
  : getSymbol(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);
62752
62783
  if (!next) {
62753
62784
  error(current, ts.Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), ts.declarationNameToString(current));
@@ -74663,9 +74694,8 @@ var ts;
74663
74694
  markAliasReferenced(parentSymbol, node);
74664
74695
  }
74665
74696
  return isErrorType(apparentType) ? errorType : apparentType;
74666
- ;
74667
74697
  }
74668
- prop = getPropertyOfType(apparentType, right.escapedText);
74698
+ prop = getPropertyOfType(apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ node.kind === 161 /* QualifiedName */);
74669
74699
  }
74670
74700
  // In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
74671
74701
  // `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
@@ -79157,6 +79187,10 @@ var ts;
79157
79187
  case 35 /* ExclamationEqualsToken */:
79158
79188
  case 36 /* EqualsEqualsEqualsToken */:
79159
79189
  case 37 /* ExclamationEqualsEqualsToken */:
79190
+ if (ts.isLiteralExpressionOfObject(left) || ts.isLiteralExpressionOfObject(right)) {
79191
+ var eqType = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */;
79192
+ error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
79193
+ }
79160
79194
  reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
79161
79195
  return booleanType;
79162
79196
  case 102 /* InstanceOfKeyword */:
@@ -80448,6 +80482,9 @@ var ts;
80448
80482
  // Grammar checking
80449
80483
  if (!checkGrammarMethod(node))
80450
80484
  checkGrammarComputedPropertyName(node.name);
80485
+ if (ts.isMethodDeclaration(node) && node.asteriskToken && ts.isIdentifier(node.name) && ts.idText(node.name) === "constructor") {
80486
+ error(node.name, ts.Diagnostics.Class_constructor_may_not_be_a_generator);
80487
+ }
80451
80488
  // Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration
80452
80489
  checkFunctionOrMethodDeclaration(node);
80453
80490
  // method signatures already report "implementation not allowed in ambient context" elsewhere
@@ -80575,6 +80612,9 @@ var ts;
80575
80612
  return !!ts.forEachChild(node, nodeImmediatelyReferencesSuperOrThis);
80576
80613
  }
80577
80614
  function checkAccessorDeclaration(node) {
80615
+ if (ts.isIdentifier(node.name) && ts.idText(node.name) === "constructor") {
80616
+ error(node.name, ts.Diagnostics.Class_constructor_may_not_be_an_accessor);
80617
+ }
80578
80618
  addLazyDiagnostic(checkAccessorDeclarationDiagnostics);
80579
80619
  checkSourceElement(node.body);
80580
80620
  setNodeLinksForPrivateIdentifierScope(node);
@@ -98003,22 +98043,29 @@ var ts;
98003
98043
  if (node === undefined) {
98004
98044
  return factory.createTrue();
98005
98045
  }
98006
- else if (node.kind === 10 /* StringLiteral */) {
98046
+ if (node.kind === 10 /* StringLiteral */) {
98007
98047
  // Always recreate the literal to escape any escape sequences or newlines which may be in the original jsx string and which
98008
98048
  // Need to be escaped to be handled correctly in a normal string
98009
98049
  var singleQuote = node.singleQuote !== undefined ? node.singleQuote : !ts.isStringDoubleQuoted(node, currentSourceFile);
98010
98050
  var literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
98011
98051
  return ts.setTextRange(literal, node);
98012
98052
  }
98013
- else if (node.kind === 288 /* JsxExpression */) {
98053
+ if (node.kind === 288 /* JsxExpression */) {
98014
98054
  if (node.expression === undefined) {
98015
98055
  return factory.createTrue();
98016
98056
  }
98017
98057
  return ts.visitNode(node.expression, visitor, ts.isExpression);
98018
98058
  }
98019
- else {
98020
- return ts.Debug.failBadSyntaxKind(node);
98059
+ if (ts.isJsxElement(node)) {
98060
+ return visitJsxElement(node, /*isChild*/ false);
98061
+ }
98062
+ if (ts.isJsxSelfClosingElement(node)) {
98063
+ return visitJsxSelfClosingElement(node, /*isChild*/ false);
98064
+ }
98065
+ if (ts.isJsxFragment(node)) {
98066
+ return visitJsxFragment(node, /*isChild*/ false);
98021
98067
  }
98068
+ return ts.Debug.failBadSyntaxKind(node);
98022
98069
  }
98023
98070
  function visitJsxText(node) {
98024
98071
  var fixed = fixupWhitespaceAndDecodeEntities(node.text);
@@ -116592,6 +116639,8 @@ var ts;
116592
116639
  ts.Diagnostics.extends_clause_already_seen.code,
116593
116640
  ts.Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code,
116594
116641
  ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,
116642
+ ts.Diagnostics.Class_constructor_may_not_be_a_generator.code,
116643
+ ts.Diagnostics.Class_constructor_may_not_be_an_accessor.code,
116595
116644
  ]);
116596
116645
  /**
116597
116646
  * Determine if source file needs to be re-created even if its text hasn't changed
@@ -123119,6 +123168,13 @@ var ts;
123119
123168
  ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
123120
123169
  WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
123121
123170
  PackageJson: "package.json file",
123171
+ ClosedScriptInfo: "Closed Script info",
123172
+ ConfigFileForInferredRoot: "Config file for the inferred project root",
123173
+ NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
123174
+ MissingSourceMapFile: "Missing source map file",
123175
+ NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
123176
+ MissingGeneratedFile: "Missing generated file",
123177
+ NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
123122
123178
  };
123123
123179
  function createWatchFactory(host, options) {
123124
123180
  var watchLogLevel = host.trace ? options.extendedDiagnostics ? ts.WatchLogLevel.Verbose : options.diagnostics ? ts.WatchLogLevel.TriggerOnly : ts.WatchLogLevel.None : ts.WatchLogLevel.None;
@@ -166302,7 +166358,7 @@ var ts;
166302
166358
  function getDefaultLibFilePath(options) {
166303
166359
  // Check __dirname is defined and that we are on a node.js system.
166304
166360
  if (typeof __dirname !== "undefined") {
166305
- return __dirname + ts.directorySeparator + ts.getDefaultLibFileName(options);
166361
+ return ts.combinePaths(__dirname, ts.getDefaultLibFileName(options));
166306
166362
  }
166307
166363
  throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
166308
166364
  }
@@ -168014,16 +168070,6 @@ var ts;
168014
168070
  server.stringifyIndented = stringifyIndented;
168015
168071
  })(server = ts.server || (ts.server = {}));
168016
168072
  })(ts || (ts = {}));
168017
- /* @internal */
168018
- var ts;
168019
- (function (ts) {
168020
- ts.WatchType.ClosedScriptInfo = "Closed Script info";
168021
- ts.WatchType.ConfigFileForInferredRoot = "Config file for the inferred project root";
168022
- ts.WatchType.NodeModules = "node_modules for closed script infos and package.jsons affecting module specifier cache";
168023
- ts.WatchType.MissingSourceMapFile = "Missing source map file";
168024
- ts.WatchType.NoopConfigFileForInferredRoot = "Noop Config file for the inferred project root";
168025
- ts.WatchType.MissingGeneratedFile = "Missing generated file";
168026
- })(ts || (ts = {}));
168027
168073
  /* eslint-disable @typescript-eslint/no-unnecessary-qualifier */
168028
168074
  /**
168029
168075
  * Declaration module describing the TypeScript Server protocol
@@ -1388,8 +1388,9 @@ declare namespace ts {
1388
1388
  readonly kind: SyntaxKind.JsxAttribute;
1389
1389
  readonly parent: JsxAttributes;
1390
1390
  readonly name: Identifier;
1391
- readonly initializer?: StringLiteral | JsxExpression;
1391
+ readonly initializer?: JsxAttributeValue;
1392
1392
  }
1393
+ export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
1393
1394
  export interface JsxSpreadAttribute extends ObjectLiteralElement {
1394
1395
  readonly kind: SyntaxKind.JsxSpreadAttribute;
1395
1396
  readonly parent: JsxAttributes;
@@ -3746,8 +3747,8 @@ declare namespace ts {
3746
3747
  createJsxOpeningFragment(): JsxOpeningFragment;
3747
3748
  createJsxJsxClosingFragment(): JsxClosingFragment;
3748
3749
  updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
3749
- createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
3750
- updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined): JsxAttribute;
3750
+ createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
3751
+ updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
3751
3752
  createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
3752
3753
  updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
3753
3754
  createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
@@ -7481,9 +7482,9 @@ declare namespace ts {
7481
7482
  /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
7482
7483
  const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
7483
7484
  /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
7484
- const createJsxAttribute: (name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
7485
+ const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
7485
7486
  /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
7486
- const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression | undefined) => JsxAttribute;
7487
+ const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
7487
7488
  /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
7488
7489
  const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
7489
7490
  /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */