@typescript-deploys/pr-build 5.5.0-pr-57749-2 → 5.5.0-pr-57686-4

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/tsc.js CHANGED
@@ -6096,8 +6096,6 @@ var Diagnostics = {
6096
6096
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
6097
6097
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
6098
6098
  Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
6099
- Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: diag(1497, 1 /* Error */, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."),
6100
- Invalid_syntax_in_decorator: diag(1498, 1 /* Error */, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."),
6101
6099
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
6102
6100
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
6103
6101
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -7745,8 +7743,6 @@ var Diagnostics = {
7745
7743
  Add_optional_parameter_to_0: diag(95191, 3 /* Message */, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"),
7746
7744
  Add_optional_parameters_to_0: diag(95192, 3 /* Message */, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"),
7747
7745
  Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"),
7748
- Wrap_in_parentheses: diag(95194, 3 /* Message */, "Wrap_in_parentheses_95194", "Wrap in parentheses"),
7749
- Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"),
7750
7746
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
7751
7747
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
7752
7748
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -17651,6 +17647,21 @@ function replaceFirstStar(s, replacement) {
17651
17647
  function getNameFromImportAttribute(node) {
17652
17648
  return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
17653
17649
  }
17650
+ function isSyntacticallyString(expr) {
17651
+ switch (expr.kind) {
17652
+ case 226 /* BinaryExpression */:
17653
+ const left = expr.left;
17654
+ const right = expr.right;
17655
+ return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
17656
+ case 217 /* ParenthesizedExpression */:
17657
+ return isSyntacticallyString(expr.expression);
17658
+ case 228 /* TemplateExpression */:
17659
+ case 11 /* StringLiteral */:
17660
+ case 15 /* NoSubstitutionTemplateLiteral */:
17661
+ return true;
17662
+ }
17663
+ return false;
17664
+ }
17654
17665
 
17655
17666
  // src/compiler/factory/baseNodeFactory.ts
17656
17667
  function createBaseNodeFactory() {
@@ -77346,56 +77357,7 @@ function createTypeChecker(host) {
77346
77357
  }
77347
77358
  }
77348
77359
  }
77349
- function checkGrammarDecorator(decorator) {
77350
- const sourceFile = getSourceFileOfNode(decorator);
77351
- if (!hasParseDiagnostics(sourceFile)) {
77352
- let node = decorator.expression;
77353
- if (isParenthesizedExpression(node)) {
77354
- return false;
77355
- }
77356
- let canHaveCallExpression = true;
77357
- let errorNode;
77358
- while (true) {
77359
- if (isExpressionWithTypeArguments(node) || isNonNullExpression(node)) {
77360
- node = node.expression;
77361
- continue;
77362
- }
77363
- if (isCallExpression(node)) {
77364
- if (!canHaveCallExpression) {
77365
- errorNode = node;
77366
- }
77367
- if (node.questionDotToken) {
77368
- errorNode = node.questionDotToken;
77369
- }
77370
- node = node.expression;
77371
- canHaveCallExpression = false;
77372
- continue;
77373
- }
77374
- if (isPropertyAccessExpression(node)) {
77375
- if (node.questionDotToken) {
77376
- errorNode = node.questionDotToken;
77377
- }
77378
- node = node.expression;
77379
- canHaveCallExpression = false;
77380
- continue;
77381
- }
77382
- if (!isIdentifier(node)) {
77383
- errorNode = node;
77384
- }
77385
- break;
77386
- }
77387
- if (errorNode) {
77388
- addRelatedInfo(
77389
- error(decorator.expression, Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),
77390
- createDiagnosticForNode(errorNode, Diagnostics.Invalid_syntax_in_decorator)
77391
- );
77392
- return true;
77393
- }
77394
- }
77395
- return false;
77396
- }
77397
77360
  function checkDecorator(node) {
77398
- checkGrammarDecorator(node);
77399
77361
  const signature = getResolvedSignature(node);
77400
77362
  checkDeprecatedSignature(signature, node);
77401
77363
  const returnType = getReturnTypeOfSignature(signature);
@@ -89385,7 +89347,7 @@ function transformTypeScript(context) {
89385
89347
  ),
89386
89348
  valueExpression
89387
89349
  );
89388
- const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment(
89350
+ const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
89389
89351
  factory2.createElementAccessExpression(
89390
89352
  currentNamespaceContainerName,
89391
89353
  innerAssignment
package/lib/tsserver.js CHANGED
@@ -1760,6 +1760,7 @@ __export(server_exports, {
1760
1760
  isSuperProperty: () => isSuperProperty,
1761
1761
  isSupportedSourceFileName: () => isSupportedSourceFileName,
1762
1762
  isSwitchStatement: () => isSwitchStatement,
1763
+ isSyntacticallyString: () => isSyntacticallyString,
1763
1764
  isSyntaxList: () => isSyntaxList,
1764
1765
  isSyntheticExpression: () => isSyntheticExpression,
1765
1766
  isSyntheticReference: () => isSyntheticReference,
@@ -9675,8 +9676,6 @@ var Diagnostics = {
9675
9676
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
9676
9677
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
9677
9678
  Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
9678
- Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: diag(1497, 1 /* Error */, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."),
9679
- Invalid_syntax_in_decorator: diag(1498, 1 /* Error */, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."),
9680
9679
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
9681
9680
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
9682
9681
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -11324,8 +11323,6 @@ var Diagnostics = {
11324
11323
  Add_optional_parameter_to_0: diag(95191, 3 /* Message */, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"),
11325
11324
  Add_optional_parameters_to_0: diag(95192, 3 /* Message */, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"),
11326
11325
  Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"),
11327
- Wrap_in_parentheses: diag(95194, 3 /* Message */, "Wrap_in_parentheses_95194", "Wrap in parentheses"),
11328
- Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"),
11329
11326
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
11330
11327
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
11331
11328
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -21911,6 +21908,21 @@ function replaceFirstStar(s, replacement) {
21911
21908
  function getNameFromImportAttribute(node) {
21912
21909
  return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
21913
21910
  }
21911
+ function isSyntacticallyString(expr) {
21912
+ switch (expr.kind) {
21913
+ case 226 /* BinaryExpression */:
21914
+ const left = expr.left;
21915
+ const right = expr.right;
21916
+ return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
21917
+ case 217 /* ParenthesizedExpression */:
21918
+ return isSyntacticallyString(expr.expression);
21919
+ case 228 /* TemplateExpression */:
21920
+ case 11 /* StringLiteral */:
21921
+ case 15 /* NoSubstitutionTemplateLiteral */:
21922
+ return true;
21923
+ }
21924
+ return false;
21925
+ }
21914
21926
 
21915
21927
  // src/compiler/factory/baseNodeFactory.ts
21916
21928
  function createBaseNodeFactory() {
@@ -82098,56 +82110,7 @@ function createTypeChecker(host) {
82098
82110
  }
82099
82111
  }
82100
82112
  }
82101
- function checkGrammarDecorator(decorator) {
82102
- const sourceFile = getSourceFileOfNode(decorator);
82103
- if (!hasParseDiagnostics(sourceFile)) {
82104
- let node = decorator.expression;
82105
- if (isParenthesizedExpression(node)) {
82106
- return false;
82107
- }
82108
- let canHaveCallExpression = true;
82109
- let errorNode;
82110
- while (true) {
82111
- if (isExpressionWithTypeArguments(node) || isNonNullExpression(node)) {
82112
- node = node.expression;
82113
- continue;
82114
- }
82115
- if (isCallExpression(node)) {
82116
- if (!canHaveCallExpression) {
82117
- errorNode = node;
82118
- }
82119
- if (node.questionDotToken) {
82120
- errorNode = node.questionDotToken;
82121
- }
82122
- node = node.expression;
82123
- canHaveCallExpression = false;
82124
- continue;
82125
- }
82126
- if (isPropertyAccessExpression(node)) {
82127
- if (node.questionDotToken) {
82128
- errorNode = node.questionDotToken;
82129
- }
82130
- node = node.expression;
82131
- canHaveCallExpression = false;
82132
- continue;
82133
- }
82134
- if (!isIdentifier(node)) {
82135
- errorNode = node;
82136
- }
82137
- break;
82138
- }
82139
- if (errorNode) {
82140
- addRelatedInfo(
82141
- error2(decorator.expression, Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),
82142
- createDiagnosticForNode(errorNode, Diagnostics.Invalid_syntax_in_decorator)
82143
- );
82144
- return true;
82145
- }
82146
- }
82147
- return false;
82148
- }
82149
82113
  function checkDecorator(node) {
82150
- checkGrammarDecorator(node);
82151
82114
  const signature = getResolvedSignature(node);
82152
82115
  checkDeprecatedSignature(signature, node);
82153
82116
  const returnType = getReturnTypeOfSignature(signature);
@@ -94324,7 +94287,7 @@ function transformTypeScript(context) {
94324
94287
  ),
94325
94288
  valueExpression
94326
94289
  );
94327
- const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment(
94290
+ const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
94328
94291
  factory2.createElementAccessExpression(
94329
94292
  currentNamespaceContainerName,
94330
94293
  innerAssignment
@@ -145685,22 +145648,22 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
145685
145648
  }
145686
145649
  return [];
145687
145650
  }
145688
- function getCodeFixesAtPosition(fileName, start2, end, errorCodes66, formatOptions, preferences = emptyOptions) {
145651
+ function getCodeFixesAtPosition(fileName, start2, end, errorCodes65, formatOptions, preferences = emptyOptions) {
145689
145652
  synchronizeHostData();
145690
145653
  const sourceFile = getValidSourceFile(fileName);
145691
145654
  const span = createTextSpanFromBounds(start2, end);
145692
145655
  const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);
145693
- return flatMap(deduplicate(errorCodes66, equateValues, compareValues), (errorCode) => {
145656
+ return flatMap(deduplicate(errorCodes65, equateValues, compareValues), (errorCode) => {
145694
145657
  cancellationToken.throwIfCancellationRequested();
145695
145658
  return ts_codefix_exports.getFixes({ errorCode, sourceFile, span, program, host, cancellationToken, formatContext, preferences });
145696
145659
  });
145697
145660
  }
145698
- function getCombinedCodeFix(scope, fixId53, formatOptions, preferences = emptyOptions) {
145661
+ function getCombinedCodeFix(scope, fixId52, formatOptions, preferences = emptyOptions) {
145699
145662
  synchronizeHostData();
145700
145663
  Debug.assert(scope.type === "file");
145701
145664
  const sourceFile = getValidSourceFile(scope.fileName);
145702
145665
  const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);
145703
- return ts_codefix_exports.getAllFixes({ fixId: fixId53, sourceFile, program, host, cancellationToken, formatContext, preferences });
145666
+ return ts_codefix_exports.getAllFixes({ fixId: fixId52, sourceFile, program, host, cancellationToken, formatContext, preferences });
145704
145667
  }
145705
145668
  function organizeImports2(args, formatOptions, preferences = emptyOptions) {
145706
145669
  synchronizeHostData();
@@ -147379,14 +147342,14 @@ function createCodeFixActionWithoutFixAll(fixName8, changes, description3) {
147379
147342
  void 0
147380
147343
  );
147381
147344
  }
147382
- function createCodeFixAction(fixName8, changes, description3, fixId53, fixAllDescription, command) {
147383
- return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId53, diagnosticToString(fixAllDescription), command);
147345
+ function createCodeFixAction(fixName8, changes, description3, fixId52, fixAllDescription, command) {
147346
+ return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId52, diagnosticToString(fixAllDescription), command);
147384
147347
  }
147385
- function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId53, fixAllDescription, command) {
147386
- return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId53, fixAllDescription && diagnosticToString(fixAllDescription), command);
147348
+ function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId52, fixAllDescription, command) {
147349
+ return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId52, fixAllDescription && diagnosticToString(fixAllDescription), command);
147387
147350
  }
147388
- function createCodeFixActionWorker(fixName8, description3, changes, fixId53, fixAllDescription, command) {
147389
- return { fixName: fixName8, description: description3, changes, fixId: fixId53, fixAllDescription, commands: command ? [command] : void 0 };
147351
+ function createCodeFixActionWorker(fixName8, description3, changes, fixId52, fixAllDescription, command) {
147352
+ return { fixName: fixName8, description: description3, changes, fixId: fixId52, fixAllDescription, commands: command ? [command] : void 0 };
147390
147353
  }
147391
147354
  function registerCodeFix(reg) {
147392
147355
  for (const error2 of reg.errorCodes) {
@@ -147394,9 +147357,9 @@ function registerCodeFix(reg) {
147394
147357
  errorCodeToFixes.add(String(error2), reg);
147395
147358
  }
147396
147359
  if (reg.fixIds) {
147397
- for (const fixId53 of reg.fixIds) {
147398
- Debug.assert(!fixIdToRegistration.has(fixId53));
147399
- fixIdToRegistration.set(fixId53, reg);
147360
+ for (const fixId52 of reg.fixIds) {
147361
+ Debug.assert(!fixIdToRegistration.has(fixId52));
147362
+ fixIdToRegistration.set(fixId52, reg);
147400
147363
  }
147401
147364
  }
147402
147365
  }
@@ -147405,17 +147368,17 @@ function getSupportedErrorCodes() {
147405
147368
  return errorCodeToFixesArray ?? (errorCodeToFixesArray = arrayFrom(errorCodeToFixes.keys()));
147406
147369
  }
147407
147370
  function removeFixIdIfFixAllUnavailable(registration, diagnostics) {
147408
- const { errorCodes: errorCodes66 } = registration;
147371
+ const { errorCodes: errorCodes65 } = registration;
147409
147372
  let maybeFixableDiagnostics = 0;
147410
147373
  for (const diag2 of diagnostics) {
147411
- if (contains(errorCodes66, diag2.code))
147374
+ if (contains(errorCodes65, diag2.code))
147412
147375
  maybeFixableDiagnostics++;
147413
147376
  if (maybeFixableDiagnostics > 1)
147414
147377
  break;
147415
147378
  }
147416
147379
  const fixAllUnavailable = maybeFixableDiagnostics < 2;
147417
- return ({ fixId: fixId53, fixAllDescription, ...action }) => {
147418
- return fixAllUnavailable ? action : { ...action, fixId: fixId53, fixAllDescription };
147380
+ return ({ fixId: fixId52, fixAllDescription, ...action }) => {
147381
+ return fixAllUnavailable ? action : { ...action, fixId: fixId52, fixAllDescription };
147419
147382
  };
147420
147383
  }
147421
147384
  function getFixes(context) {
@@ -147432,14 +147395,14 @@ function createCombinedCodeActions(changes, commands) {
147432
147395
  function createFileTextChanges(fileName, textChanges2) {
147433
147396
  return { fileName, textChanges: textChanges2 };
147434
147397
  }
147435
- function codeFixAll(context, errorCodes66, use) {
147398
+ function codeFixAll(context, errorCodes65, use) {
147436
147399
  const commands = [];
147437
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes66, (diag2) => use(t, diag2, commands)));
147400
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes65, (diag2) => use(t, diag2, commands)));
147438
147401
  return createCombinedCodeActions(changes, commands.length === 0 ? void 0 : commands);
147439
147402
  }
147440
- function eachDiagnostic(context, errorCodes66, cb) {
147403
+ function eachDiagnostic(context, errorCodes65, cb) {
147441
147404
  for (const diag2 of getDiagnostics(context)) {
147442
- if (contains(errorCodes66, diag2.code)) {
147405
+ if (contains(errorCodes65, diag2.code)) {
147443
147406
  cb(diag2);
147444
147407
  }
147445
147408
  }
@@ -151850,10 +151813,10 @@ registerCodeFix({
151850
151813
  const info = errorCodeFixIdMap[errorCode];
151851
151814
  if (!info)
151852
151815
  return emptyArray;
151853
- const { descriptions, fixId: fixId53, fixAllDescriptions } = info;
151816
+ const { descriptions, fixId: fixId52, fixAllDescriptions } = info;
151854
151817
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => dispatchChanges(changes2, context, errorCode, span.start));
151855
151818
  return [
151856
- createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId53, fixAllDescriptions)
151819
+ createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId52, fixAllDescriptions)
151857
151820
  ];
151858
151821
  },
151859
151822
  fixIds: [fixName, fixAddOverrideId, fixRemoveOverrideId],
@@ -152658,7 +152621,7 @@ registerCodeFix({
152658
152621
  },
152659
152622
  fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes],
152660
152623
  getAllCodeActions: (context) => {
152661
- const { program, fixId: fixId53 } = context;
152624
+ const { program, fixId: fixId52 } = context;
152662
152625
  const checker = program.getTypeChecker();
152663
152626
  const seen = /* @__PURE__ */ new Map();
152664
152627
  const typeDeclToMembers = /* @__PURE__ */ new Map();
@@ -152668,11 +152631,11 @@ registerCodeFix({
152668
152631
  if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 /* ObjectLiteral */ ? info.identifier : info.token.text))) {
152669
152632
  return;
152670
152633
  }
152671
- if (fixId53 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) {
152634
+ if (fixId52 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) {
152672
152635
  addFunctionDeclaration(changes, context, info);
152673
- } else if (fixId53 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {
152636
+ } else if (fixId52 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {
152674
152637
  addObjectLiteralProperties(changes, context, info);
152675
- } else if (fixId53 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {
152638
+ } else if (fixId52 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {
152676
152639
  addJsxAttributes(changes, context, info);
152677
152640
  } else {
152678
152641
  if (info.kind === 1 /* Enum */) {
@@ -154566,21 +154529,21 @@ registerCodeFix({
154566
154529
  actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types));
154567
154530
  }
154568
154531
  return actions2;
154569
- function fix(type2, fixId53, fixAllDescription) {
154532
+ function fix(type2, fixId52, fixAllDescription) {
154570
154533
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange29(t, sourceFile, typeNode, type2, checker));
154571
- return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId53, fixAllDescription);
154534
+ return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId52, fixAllDescription);
154572
154535
  }
154573
154536
  },
154574
154537
  fixIds: [fixIdPlain, fixIdNullable],
154575
154538
  getAllCodeActions(context) {
154576
- const { fixId: fixId53, program, sourceFile } = context;
154539
+ const { fixId: fixId52, program, sourceFile } = context;
154577
154540
  const checker = program.getTypeChecker();
154578
154541
  return codeFixAll(context, errorCodes45, (changes, err) => {
154579
154542
  const info = getInfo15(err.file, err.start, checker);
154580
154543
  if (!info)
154581
154544
  return;
154582
154545
  const { typeNode, type } = info;
154583
- const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId53 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type;
154546
+ const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type;
154584
154547
  doChange29(changes, sourceFile, typeNode, fixedType, checker);
154585
154548
  });
154586
154549
  }
@@ -157288,31 +157251,11 @@ function flattenInvalidBinaryExpr(node) {
157288
157251
  }
157289
157252
  }
157290
157253
 
157291
- // src/services/codefixes/wrapDecoratorInParentheses.ts
157292
- var fixId45 = "wrapDecoratorInParentheses";
157293
- var errorCodes58 = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];
157294
- registerCodeFix({
157295
- errorCodes: errorCodes58,
157296
- getCodeActions: function getCodeActionsToWrapDecoratorExpressionInParentheses(context) {
157297
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span.start));
157298
- return [createCodeFixAction(fixId45, changes, Diagnostics.Wrap_in_parentheses, fixId45, Diagnostics.Wrap_all_invalid_decorator_expressions_in_parentheses)];
157299
- },
157300
- fixIds: [fixId45],
157301
- getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => makeChange10(changes, diag2.file, diag2.start))
157302
- });
157303
- function makeChange10(changeTracker, sourceFile, pos) {
157304
- const token = getTokenAtPosition(sourceFile, pos);
157305
- const decorator = findAncestor(token, isDecorator);
157306
- Debug.assert(!!decorator, "Expected position to be owned by a decorator.");
157307
- const replacement = factory.createParenthesizedExpression(decorator.expression);
157308
- changeTracker.replaceNode(sourceFile, decorator.expression, replacement);
157309
- }
157310
-
157311
157254
  // src/services/codefixes/convertToMappedObjectType.ts
157312
- var fixId46 = "fixConvertToMappedObjectType";
157313
- var errorCodes59 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
157255
+ var fixId45 = "fixConvertToMappedObjectType";
157256
+ var errorCodes58 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
157314
157257
  registerCodeFix({
157315
- errorCodes: errorCodes59,
157258
+ errorCodes: errorCodes58,
157316
157259
  getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {
157317
157260
  const { sourceFile, span } = context;
157318
157261
  const info = getInfo20(sourceFile, span.start);
@@ -157320,10 +157263,10 @@ registerCodeFix({
157320
157263
  return void 0;
157321
157264
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange39(t, sourceFile, info));
157322
157265
  const name = idText(info.container.name);
157323
- return [createCodeFixAction(fixId46, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId46, [Diagnostics.Convert_0_to_mapped_object_type, name])];
157266
+ return [createCodeFixAction(fixId45, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId45, [Diagnostics.Convert_0_to_mapped_object_type, name])];
157324
157267
  },
157325
- fixIds: [fixId46],
157326
- getAllCodeActions: (context) => codeFixAll(context, errorCodes59, (changes, diag2) => {
157268
+ fixIds: [fixId45],
157269
+ getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => {
157327
157270
  const info = getInfo20(diag2.file, diag2.start);
157328
157271
  if (info)
157329
157272
  doChange39(changes, diag2.file, info);
@@ -157371,12 +157314,12 @@ function doChange39(changes, sourceFile, { indexSignature, container }) {
157371
157314
  }
157372
157315
 
157373
157316
  // src/services/codefixes/removeAccidentalCallParentheses.ts
157374
- var fixId47 = "removeAccidentalCallParentheses";
157375
- var errorCodes60 = [
157317
+ var fixId46 = "removeAccidentalCallParentheses";
157318
+ var errorCodes59 = [
157376
157319
  Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code
157377
157320
  ];
157378
157321
  registerCodeFix({
157379
- errorCodes: errorCodes60,
157322
+ errorCodes: errorCodes59,
157380
157323
  getCodeActions(context) {
157381
157324
  const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression);
157382
157325
  if (!callExpression) {
@@ -157385,30 +157328,30 @@ registerCodeFix({
157385
157328
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {
157386
157329
  t.deleteRange(context.sourceFile, { pos: callExpression.expression.end, end: callExpression.end });
157387
157330
  });
157388
- return [createCodeFixActionWithoutFixAll(fixId47, changes, Diagnostics.Remove_parentheses)];
157331
+ return [createCodeFixActionWithoutFixAll(fixId46, changes, Diagnostics.Remove_parentheses)];
157389
157332
  },
157390
- fixIds: [fixId47]
157333
+ fixIds: [fixId46]
157391
157334
  });
157392
157335
 
157393
157336
  // src/services/codefixes/removeUnnecessaryAwait.ts
157394
- var fixId48 = "removeUnnecessaryAwait";
157395
- var errorCodes61 = [
157337
+ var fixId47 = "removeUnnecessaryAwait";
157338
+ var errorCodes60 = [
157396
157339
  Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code
157397
157340
  ];
157398
157341
  registerCodeFix({
157399
- errorCodes: errorCodes61,
157342
+ errorCodes: errorCodes60,
157400
157343
  getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
157401
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span));
157344
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span));
157402
157345
  if (changes.length > 0) {
157403
- return [createCodeFixAction(fixId48, changes, Diagnostics.Remove_unnecessary_await, fixId48, Diagnostics.Remove_all_unnecessary_uses_of_await)];
157346
+ return [createCodeFixAction(fixId47, changes, Diagnostics.Remove_unnecessary_await, fixId47, Diagnostics.Remove_all_unnecessary_uses_of_await)];
157404
157347
  }
157405
157348
  },
157406
- fixIds: [fixId48],
157349
+ fixIds: [fixId47],
157407
157350
  getAllCodeActions: (context) => {
157408
- return codeFixAll(context, errorCodes61, (changes, diag2) => makeChange11(changes, diag2.file, diag2));
157351
+ return codeFixAll(context, errorCodes60, (changes, diag2) => makeChange10(changes, diag2.file, diag2));
157409
157352
  }
157410
157353
  });
157411
- function makeChange11(changeTracker, sourceFile, span) {
157354
+ function makeChange10(changeTracker, sourceFile, span) {
157412
157355
  const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 135 /* AwaitKeyword */);
157413
157356
  const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression);
157414
157357
  if (!awaitExpression) {
@@ -157433,20 +157376,20 @@ function makeChange11(changeTracker, sourceFile, span) {
157433
157376
  }
157434
157377
 
157435
157378
  // src/services/codefixes/splitTypeOnlyImport.ts
157436
- var errorCodes62 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
157437
- var fixId49 = "splitTypeOnlyImport";
157379
+ var errorCodes61 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
157380
+ var fixId48 = "splitTypeOnlyImport";
157438
157381
  registerCodeFix({
157439
- errorCodes: errorCodes62,
157440
- fixIds: [fixId49],
157382
+ errorCodes: errorCodes61,
157383
+ fixIds: [fixId48],
157441
157384
  getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {
157442
157385
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {
157443
157386
  return splitTypeOnlyImport(t, getImportDeclaration2(context.sourceFile, context.span), context);
157444
157387
  });
157445
157388
  if (changes.length) {
157446
- return [createCodeFixAction(fixId49, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId49, Diagnostics.Split_all_invalid_type_only_imports)];
157389
+ return [createCodeFixAction(fixId48, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId48, Diagnostics.Split_all_invalid_type_only_imports)];
157447
157390
  }
157448
157391
  },
157449
- getAllCodeActions: (context) => codeFixAll(context, errorCodes62, (changes, error2) => {
157392
+ getAllCodeActions: (context) => codeFixAll(context, errorCodes61, (changes, error2) => {
157450
157393
  splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context);
157451
157394
  })
157452
157395
  });
@@ -157495,23 +157438,23 @@ function splitTypeOnlyImport(changes, importDeclaration, context) {
157495
157438
  }
157496
157439
 
157497
157440
  // src/services/codefixes/convertConstToLet.ts
157498
- var fixId50 = "fixConvertConstToLet";
157499
- var errorCodes63 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
157441
+ var fixId49 = "fixConvertConstToLet";
157442
+ var errorCodes62 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
157500
157443
  registerCodeFix({
157501
- errorCodes: errorCodes63,
157444
+ errorCodes: errorCodes62,
157502
157445
  getCodeActions: function getCodeActionsToConvertConstToLet(context) {
157503
157446
  const { sourceFile, span, program } = context;
157504
157447
  const info = getInfo21(sourceFile, span.start, program);
157505
157448
  if (info === void 0)
157506
157449
  return;
157507
157450
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange40(t, sourceFile, info.token));
157508
- return [createCodeFixActionMaybeFixAll(fixId50, changes, Diagnostics.Convert_const_to_let, fixId50, Diagnostics.Convert_all_const_to_let)];
157451
+ return [createCodeFixActionMaybeFixAll(fixId49, changes, Diagnostics.Convert_const_to_let, fixId49, Diagnostics.Convert_all_const_to_let)];
157509
157452
  },
157510
157453
  getAllCodeActions: (context) => {
157511
157454
  const { program } = context;
157512
157455
  const seen = /* @__PURE__ */ new Map();
157513
157456
  return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {
157514
- eachDiagnostic(context, errorCodes63, (diag2) => {
157457
+ eachDiagnostic(context, errorCodes62, (diag2) => {
157515
157458
  const info = getInfo21(diag2.file, diag2.start, program);
157516
157459
  if (info) {
157517
157460
  if (addToSeen(seen, getSymbolId(info.symbol))) {
@@ -157522,7 +157465,7 @@ registerCodeFix({
157522
157465
  });
157523
157466
  }));
157524
157467
  },
157525
- fixIds: [fixId50]
157468
+ fixIds: [fixId49]
157526
157469
  });
157527
157470
  function getInfo21(sourceFile, pos, program) {
157528
157471
  var _a;
@@ -157543,11 +157486,11 @@ function doChange40(changes, sourceFile, token) {
157543
157486
  }
157544
157487
 
157545
157488
  // src/services/codefixes/fixExpectedComma.ts
157546
- var fixId51 = "fixExpectedComma";
157489
+ var fixId50 = "fixExpectedComma";
157547
157490
  var expectedErrorCode = Diagnostics._0_expected.code;
157548
- var errorCodes64 = [expectedErrorCode];
157491
+ var errorCodes63 = [expectedErrorCode];
157549
157492
  registerCodeFix({
157550
- errorCodes: errorCodes64,
157493
+ errorCodes: errorCodes63,
157551
157494
  getCodeActions(context) {
157552
157495
  const { sourceFile } = context;
157553
157496
  const info = getInfo22(sourceFile, context.span.start, context.errorCode);
@@ -157555,15 +157498,15 @@ registerCodeFix({
157555
157498
  return void 0;
157556
157499
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange41(t, sourceFile, info));
157557
157500
  return [createCodeFixAction(
157558
- fixId51,
157501
+ fixId50,
157559
157502
  changes,
157560
157503
  [Diagnostics.Change_0_to_1, ";", ","],
157561
- fixId51,
157504
+ fixId50,
157562
157505
  [Diagnostics.Change_0_to_1, ";", ","]
157563
157506
  )];
157564
157507
  },
157565
- fixIds: [fixId51],
157566
- getAllCodeActions: (context) => codeFixAll(context, errorCodes64, (changes, diag2) => {
157508
+ fixIds: [fixId50],
157509
+ getAllCodeActions: (context) => codeFixAll(context, errorCodes63, (changes, diag2) => {
157567
157510
  const info = getInfo22(diag2.file, diag2.start, diag2.code);
157568
157511
  if (info)
157569
157512
  doChange41(changes, context.sourceFile, info);
@@ -157580,25 +157523,25 @@ function doChange41(changes, sourceFile, { node }) {
157580
157523
 
157581
157524
  // src/services/codefixes/fixAddVoidToPromise.ts
157582
157525
  var fixName7 = "addVoidToPromise";
157583
- var fixId52 = "addVoidToPromise";
157584
- var errorCodes65 = [
157526
+ var fixId51 = "addVoidToPromise";
157527
+ var errorCodes64 = [
157585
157528
  Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
157586
157529
  Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
157587
157530
  ];
157588
157531
  registerCodeFix({
157589
- errorCodes: errorCodes65,
157590
- fixIds: [fixId52],
157532
+ errorCodes: errorCodes64,
157533
+ fixIds: [fixId51],
157591
157534
  getCodeActions(context) {
157592
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange12(t, context.sourceFile, context.span, context.program));
157535
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span, context.program));
157593
157536
  if (changes.length > 0) {
157594
- return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId52, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];
157537
+ return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId51, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];
157595
157538
  }
157596
157539
  },
157597
157540
  getAllCodeActions(context) {
157598
- return codeFixAll(context, errorCodes65, (changes, diag2) => makeChange12(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set()));
157541
+ return codeFixAll(context, errorCodes64, (changes, diag2) => makeChange11(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set()));
157599
157542
  }
157600
157543
  });
157601
- function makeChange12(changes, sourceFile, span, program, seen) {
157544
+ function makeChange11(changes, sourceFile, span, program, seen) {
157602
157545
  const node = getTokenAtPosition(sourceFile, span.start);
157603
157546
  if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0)
157604
157547
  return;
@@ -165628,7 +165571,7 @@ function provideInlayHints(context) {
165628
165571
  return type.symbol && type.symbol.flags & 1536 /* Module */;
165629
165572
  }
165630
165573
  function visitVariableLikeDeclaration(decl) {
165631
- if (!decl.initializer || isBindingPattern(decl.name) || isVariableDeclaration(decl) && !isHintableDeclaration(decl)) {
165574
+ if (decl.initializer === void 0 && !(isPropertyDeclaration(decl) && !(checker.getTypeAtLocation(decl).flags & 1 /* Any */)) || isBindingPattern(decl.name) || isVariableDeclaration(decl) && !isHintableDeclaration(decl)) {
165632
165575
  return;
165633
165576
  }
165634
165577
  const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(decl);
@@ -175083,6 +175026,7 @@ __export(ts_exports2, {
175083
175026
  isSuperProperty: () => isSuperProperty,
175084
175027
  isSupportedSourceFileName: () => isSupportedSourceFileName,
175085
175028
  isSwitchStatement: () => isSwitchStatement,
175029
+ isSyntacticallyString: () => isSyntacticallyString,
175086
175030
  isSyntaxList: () => isSyntaxList,
175087
175031
  isSyntheticExpression: () => isSyntheticExpression,
175088
175032
  isSyntheticReference: () => isSyntheticReference,
@@ -186086,10 +186030,10 @@ ${e.message}`;
186086
186030
  }
186087
186031
  return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions;
186088
186032
  }
186089
- getCombinedCodeFix({ scope, fixId: fixId53 }, simplifiedResult) {
186033
+ getCombinedCodeFix({ scope, fixId: fixId52 }, simplifiedResult) {
186090
186034
  Debug.assert(scope.type === "file");
186091
186035
  const { file, project } = this.getFileAndProject(scope.args);
186092
- const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId53, this.getFormatOptions(file), this.getPreferences(file));
186036
+ const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId52, this.getFormatOptions(file), this.getPreferences(file));
186093
186037
  if (simplifiedResult) {
186094
186038
  return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands };
186095
186039
  } else {
@@ -186128,8 +186072,8 @@ ${e.message}`;
186128
186072
  mapCodeAction({ description: description3, changes, commands }) {
186129
186073
  return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands };
186130
186074
  }
186131
- mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId53, fixAllDescription }) {
186132
- return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId53, fixAllDescription };
186075
+ mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId52, fixAllDescription }) {
186076
+ return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId52, fixAllDescription };
186133
186077
  }
186134
186078
  mapTextChangesToCodeEdits(textChanges2) {
186135
186079
  return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change));
@@ -189859,6 +189803,7 @@ start(initializeNodeSystem(), require("os").platform());
189859
189803
  isSuperProperty,
189860
189804
  isSupportedSourceFileName,
189861
189805
  isSwitchStatement,
189806
+ isSyntacticallyString,
189862
189807
  isSyntaxList,
189863
189808
  isSyntheticExpression,
189864
189809
  isSyntheticReference,
package/lib/typescript.js CHANGED
@@ -1760,6 +1760,7 @@ __export(typescript_exports, {
1760
1760
  isSuperProperty: () => isSuperProperty,
1761
1761
  isSupportedSourceFileName: () => isSupportedSourceFileName,
1762
1762
  isSwitchStatement: () => isSwitchStatement,
1763
+ isSyntacticallyString: () => isSyntacticallyString,
1763
1764
  isSyntaxList: () => isSyntaxList,
1764
1765
  isSyntheticExpression: () => isSyntheticExpression,
1765
1766
  isSyntheticReference: () => isSyntheticReference,
@@ -9675,8 +9676,6 @@ var Diagnostics = {
9675
9676
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
9676
9677
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
9677
9678
  Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
9678
- Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: diag(1497, 1 /* Error */, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."),
9679
- Invalid_syntax_in_decorator: diag(1498, 1 /* Error */, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."),
9680
9679
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
9681
9680
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
9682
9681
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -11324,8 +11323,6 @@ var Diagnostics = {
11324
11323
  Add_optional_parameter_to_0: diag(95191, 3 /* Message */, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"),
11325
11324
  Add_optional_parameters_to_0: diag(95192, 3 /* Message */, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"),
11326
11325
  Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"),
11327
- Wrap_in_parentheses: diag(95194, 3 /* Message */, "Wrap_in_parentheses_95194", "Wrap in parentheses"),
11328
- Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"),
11329
11326
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
11330
11327
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
11331
11328
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -21911,6 +21908,21 @@ function replaceFirstStar(s, replacement) {
21911
21908
  function getNameFromImportAttribute(node) {
21912
21909
  return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
21913
21910
  }
21911
+ function isSyntacticallyString(expr) {
21912
+ switch (expr.kind) {
21913
+ case 226 /* BinaryExpression */:
21914
+ const left = expr.left;
21915
+ const right = expr.right;
21916
+ return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
21917
+ case 217 /* ParenthesizedExpression */:
21918
+ return isSyntacticallyString(expr.expression);
21919
+ case 228 /* TemplateExpression */:
21920
+ case 11 /* StringLiteral */:
21921
+ case 15 /* NoSubstitutionTemplateLiteral */:
21922
+ return true;
21923
+ }
21924
+ return false;
21925
+ }
21914
21926
 
21915
21927
  // src/compiler/factory/baseNodeFactory.ts
21916
21928
  function createBaseNodeFactory() {
@@ -82098,56 +82110,7 @@ function createTypeChecker(host) {
82098
82110
  }
82099
82111
  }
82100
82112
  }
82101
- function checkGrammarDecorator(decorator) {
82102
- const sourceFile = getSourceFileOfNode(decorator);
82103
- if (!hasParseDiagnostics(sourceFile)) {
82104
- let node = decorator.expression;
82105
- if (isParenthesizedExpression(node)) {
82106
- return false;
82107
- }
82108
- let canHaveCallExpression = true;
82109
- let errorNode;
82110
- while (true) {
82111
- if (isExpressionWithTypeArguments(node) || isNonNullExpression(node)) {
82112
- node = node.expression;
82113
- continue;
82114
- }
82115
- if (isCallExpression(node)) {
82116
- if (!canHaveCallExpression) {
82117
- errorNode = node;
82118
- }
82119
- if (node.questionDotToken) {
82120
- errorNode = node.questionDotToken;
82121
- }
82122
- node = node.expression;
82123
- canHaveCallExpression = false;
82124
- continue;
82125
- }
82126
- if (isPropertyAccessExpression(node)) {
82127
- if (node.questionDotToken) {
82128
- errorNode = node.questionDotToken;
82129
- }
82130
- node = node.expression;
82131
- canHaveCallExpression = false;
82132
- continue;
82133
- }
82134
- if (!isIdentifier(node)) {
82135
- errorNode = node;
82136
- }
82137
- break;
82138
- }
82139
- if (errorNode) {
82140
- addRelatedInfo(
82141
- error2(decorator.expression, Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),
82142
- createDiagnosticForNode(errorNode, Diagnostics.Invalid_syntax_in_decorator)
82143
- );
82144
- return true;
82145
- }
82146
- }
82147
- return false;
82148
- }
82149
82113
  function checkDecorator(node) {
82150
- checkGrammarDecorator(node);
82151
82114
  const signature = getResolvedSignature(node);
82152
82115
  checkDeprecatedSignature(signature, node);
82153
82116
  const returnType = getReturnTypeOfSignature(signature);
@@ -94324,7 +94287,7 @@ function transformTypeScript(context) {
94324
94287
  ),
94325
94288
  valueExpression
94326
94289
  );
94327
- const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment(
94290
+ const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
94328
94291
  factory2.createElementAccessExpression(
94329
94292
  currentNamespaceContainerName,
94330
94293
  innerAssignment
@@ -145685,22 +145648,22 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
145685
145648
  }
145686
145649
  return [];
145687
145650
  }
145688
- function getCodeFixesAtPosition(fileName, start, end, errorCodes66, formatOptions, preferences = emptyOptions) {
145651
+ function getCodeFixesAtPosition(fileName, start, end, errorCodes65, formatOptions, preferences = emptyOptions) {
145689
145652
  synchronizeHostData();
145690
145653
  const sourceFile = getValidSourceFile(fileName);
145691
145654
  const span = createTextSpanFromBounds(start, end);
145692
145655
  const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);
145693
- return flatMap(deduplicate(errorCodes66, equateValues, compareValues), (errorCode) => {
145656
+ return flatMap(deduplicate(errorCodes65, equateValues, compareValues), (errorCode) => {
145694
145657
  cancellationToken.throwIfCancellationRequested();
145695
145658
  return ts_codefix_exports.getFixes({ errorCode, sourceFile, span, program, host, cancellationToken, formatContext, preferences });
145696
145659
  });
145697
145660
  }
145698
- function getCombinedCodeFix(scope, fixId53, formatOptions, preferences = emptyOptions) {
145661
+ function getCombinedCodeFix(scope, fixId52, formatOptions, preferences = emptyOptions) {
145699
145662
  synchronizeHostData();
145700
145663
  Debug.assert(scope.type === "file");
145701
145664
  const sourceFile = getValidSourceFile(scope.fileName);
145702
145665
  const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);
145703
- return ts_codefix_exports.getAllFixes({ fixId: fixId53, sourceFile, program, host, cancellationToken, formatContext, preferences });
145666
+ return ts_codefix_exports.getAllFixes({ fixId: fixId52, sourceFile, program, host, cancellationToken, formatContext, preferences });
145704
145667
  }
145705
145668
  function organizeImports2(args, formatOptions, preferences = emptyOptions) {
145706
145669
  synchronizeHostData();
@@ -147379,14 +147342,14 @@ function createCodeFixActionWithoutFixAll(fixName8, changes, description3) {
147379
147342
  void 0
147380
147343
  );
147381
147344
  }
147382
- function createCodeFixAction(fixName8, changes, description3, fixId53, fixAllDescription, command) {
147383
- return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId53, diagnosticToString(fixAllDescription), command);
147345
+ function createCodeFixAction(fixName8, changes, description3, fixId52, fixAllDescription, command) {
147346
+ return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId52, diagnosticToString(fixAllDescription), command);
147384
147347
  }
147385
- function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId53, fixAllDescription, command) {
147386
- return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId53, fixAllDescription && diagnosticToString(fixAllDescription), command);
147348
+ function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId52, fixAllDescription, command) {
147349
+ return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId52, fixAllDescription && diagnosticToString(fixAllDescription), command);
147387
147350
  }
147388
- function createCodeFixActionWorker(fixName8, description3, changes, fixId53, fixAllDescription, command) {
147389
- return { fixName: fixName8, description: description3, changes, fixId: fixId53, fixAllDescription, commands: command ? [command] : void 0 };
147351
+ function createCodeFixActionWorker(fixName8, description3, changes, fixId52, fixAllDescription, command) {
147352
+ return { fixName: fixName8, description: description3, changes, fixId: fixId52, fixAllDescription, commands: command ? [command] : void 0 };
147390
147353
  }
147391
147354
  function registerCodeFix(reg) {
147392
147355
  for (const error2 of reg.errorCodes) {
@@ -147394,9 +147357,9 @@ function registerCodeFix(reg) {
147394
147357
  errorCodeToFixes.add(String(error2), reg);
147395
147358
  }
147396
147359
  if (reg.fixIds) {
147397
- for (const fixId53 of reg.fixIds) {
147398
- Debug.assert(!fixIdToRegistration.has(fixId53));
147399
- fixIdToRegistration.set(fixId53, reg);
147360
+ for (const fixId52 of reg.fixIds) {
147361
+ Debug.assert(!fixIdToRegistration.has(fixId52));
147362
+ fixIdToRegistration.set(fixId52, reg);
147400
147363
  }
147401
147364
  }
147402
147365
  }
@@ -147405,17 +147368,17 @@ function getSupportedErrorCodes() {
147405
147368
  return errorCodeToFixesArray ?? (errorCodeToFixesArray = arrayFrom(errorCodeToFixes.keys()));
147406
147369
  }
147407
147370
  function removeFixIdIfFixAllUnavailable(registration, diagnostics) {
147408
- const { errorCodes: errorCodes66 } = registration;
147371
+ const { errorCodes: errorCodes65 } = registration;
147409
147372
  let maybeFixableDiagnostics = 0;
147410
147373
  for (const diag2 of diagnostics) {
147411
- if (contains(errorCodes66, diag2.code))
147374
+ if (contains(errorCodes65, diag2.code))
147412
147375
  maybeFixableDiagnostics++;
147413
147376
  if (maybeFixableDiagnostics > 1)
147414
147377
  break;
147415
147378
  }
147416
147379
  const fixAllUnavailable = maybeFixableDiagnostics < 2;
147417
- return ({ fixId: fixId53, fixAllDescription, ...action }) => {
147418
- return fixAllUnavailable ? action : { ...action, fixId: fixId53, fixAllDescription };
147380
+ return ({ fixId: fixId52, fixAllDescription, ...action }) => {
147381
+ return fixAllUnavailable ? action : { ...action, fixId: fixId52, fixAllDescription };
147419
147382
  };
147420
147383
  }
147421
147384
  function getFixes(context) {
@@ -147432,14 +147395,14 @@ function createCombinedCodeActions(changes, commands) {
147432
147395
  function createFileTextChanges(fileName, textChanges2) {
147433
147396
  return { fileName, textChanges: textChanges2 };
147434
147397
  }
147435
- function codeFixAll(context, errorCodes66, use) {
147398
+ function codeFixAll(context, errorCodes65, use) {
147436
147399
  const commands = [];
147437
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes66, (diag2) => use(t, diag2, commands)));
147400
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes65, (diag2) => use(t, diag2, commands)));
147438
147401
  return createCombinedCodeActions(changes, commands.length === 0 ? void 0 : commands);
147439
147402
  }
147440
- function eachDiagnostic(context, errorCodes66, cb) {
147403
+ function eachDiagnostic(context, errorCodes65, cb) {
147441
147404
  for (const diag2 of getDiagnostics(context)) {
147442
- if (contains(errorCodes66, diag2.code)) {
147405
+ if (contains(errorCodes65, diag2.code)) {
147443
147406
  cb(diag2);
147444
147407
  }
147445
147408
  }
@@ -151850,10 +151813,10 @@ registerCodeFix({
151850
151813
  const info = errorCodeFixIdMap[errorCode];
151851
151814
  if (!info)
151852
151815
  return emptyArray;
151853
- const { descriptions, fixId: fixId53, fixAllDescriptions } = info;
151816
+ const { descriptions, fixId: fixId52, fixAllDescriptions } = info;
151854
151817
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => dispatchChanges(changes2, context, errorCode, span.start));
151855
151818
  return [
151856
- createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId53, fixAllDescriptions)
151819
+ createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId52, fixAllDescriptions)
151857
151820
  ];
151858
151821
  },
151859
151822
  fixIds: [fixName, fixAddOverrideId, fixRemoveOverrideId],
@@ -152658,7 +152621,7 @@ registerCodeFix({
152658
152621
  },
152659
152622
  fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes],
152660
152623
  getAllCodeActions: (context) => {
152661
- const { program, fixId: fixId53 } = context;
152624
+ const { program, fixId: fixId52 } = context;
152662
152625
  const checker = program.getTypeChecker();
152663
152626
  const seen = /* @__PURE__ */ new Map();
152664
152627
  const typeDeclToMembers = /* @__PURE__ */ new Map();
@@ -152668,11 +152631,11 @@ registerCodeFix({
152668
152631
  if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 /* ObjectLiteral */ ? info.identifier : info.token.text))) {
152669
152632
  return;
152670
152633
  }
152671
- if (fixId53 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) {
152634
+ if (fixId52 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) {
152672
152635
  addFunctionDeclaration(changes, context, info);
152673
- } else if (fixId53 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {
152636
+ } else if (fixId52 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {
152674
152637
  addObjectLiteralProperties(changes, context, info);
152675
- } else if (fixId53 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {
152638
+ } else if (fixId52 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {
152676
152639
  addJsxAttributes(changes, context, info);
152677
152640
  } else {
152678
152641
  if (info.kind === 1 /* Enum */) {
@@ -154566,21 +154529,21 @@ registerCodeFix({
154566
154529
  actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types));
154567
154530
  }
154568
154531
  return actions2;
154569
- function fix(type2, fixId53, fixAllDescription) {
154532
+ function fix(type2, fixId52, fixAllDescription) {
154570
154533
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange29(t, sourceFile, typeNode, type2, checker));
154571
- return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId53, fixAllDescription);
154534
+ return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId52, fixAllDescription);
154572
154535
  }
154573
154536
  },
154574
154537
  fixIds: [fixIdPlain, fixIdNullable],
154575
154538
  getAllCodeActions(context) {
154576
- const { fixId: fixId53, program, sourceFile } = context;
154539
+ const { fixId: fixId52, program, sourceFile } = context;
154577
154540
  const checker = program.getTypeChecker();
154578
154541
  return codeFixAll(context, errorCodes45, (changes, err) => {
154579
154542
  const info = getInfo15(err.file, err.start, checker);
154580
154543
  if (!info)
154581
154544
  return;
154582
154545
  const { typeNode, type } = info;
154583
- const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId53 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type;
154546
+ const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type;
154584
154547
  doChange29(changes, sourceFile, typeNode, fixedType, checker);
154585
154548
  });
154586
154549
  }
@@ -157288,31 +157251,11 @@ function flattenInvalidBinaryExpr(node) {
157288
157251
  }
157289
157252
  }
157290
157253
 
157291
- // src/services/codefixes/wrapDecoratorInParentheses.ts
157292
- var fixId45 = "wrapDecoratorInParentheses";
157293
- var errorCodes58 = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];
157294
- registerCodeFix({
157295
- errorCodes: errorCodes58,
157296
- getCodeActions: function getCodeActionsToWrapDecoratorExpressionInParentheses(context) {
157297
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span.start));
157298
- return [createCodeFixAction(fixId45, changes, Diagnostics.Wrap_in_parentheses, fixId45, Diagnostics.Wrap_all_invalid_decorator_expressions_in_parentheses)];
157299
- },
157300
- fixIds: [fixId45],
157301
- getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => makeChange10(changes, diag2.file, diag2.start))
157302
- });
157303
- function makeChange10(changeTracker, sourceFile, pos) {
157304
- const token = getTokenAtPosition(sourceFile, pos);
157305
- const decorator = findAncestor(token, isDecorator);
157306
- Debug.assert(!!decorator, "Expected position to be owned by a decorator.");
157307
- const replacement = factory.createParenthesizedExpression(decorator.expression);
157308
- changeTracker.replaceNode(sourceFile, decorator.expression, replacement);
157309
- }
157310
-
157311
157254
  // src/services/codefixes/convertToMappedObjectType.ts
157312
- var fixId46 = "fixConvertToMappedObjectType";
157313
- var errorCodes59 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
157255
+ var fixId45 = "fixConvertToMappedObjectType";
157256
+ var errorCodes58 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
157314
157257
  registerCodeFix({
157315
- errorCodes: errorCodes59,
157258
+ errorCodes: errorCodes58,
157316
157259
  getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {
157317
157260
  const { sourceFile, span } = context;
157318
157261
  const info = getInfo20(sourceFile, span.start);
@@ -157320,10 +157263,10 @@ registerCodeFix({
157320
157263
  return void 0;
157321
157264
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange39(t, sourceFile, info));
157322
157265
  const name = idText(info.container.name);
157323
- return [createCodeFixAction(fixId46, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId46, [Diagnostics.Convert_0_to_mapped_object_type, name])];
157266
+ return [createCodeFixAction(fixId45, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId45, [Diagnostics.Convert_0_to_mapped_object_type, name])];
157324
157267
  },
157325
- fixIds: [fixId46],
157326
- getAllCodeActions: (context) => codeFixAll(context, errorCodes59, (changes, diag2) => {
157268
+ fixIds: [fixId45],
157269
+ getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => {
157327
157270
  const info = getInfo20(diag2.file, diag2.start);
157328
157271
  if (info)
157329
157272
  doChange39(changes, diag2.file, info);
@@ -157371,12 +157314,12 @@ function doChange39(changes, sourceFile, { indexSignature, container }) {
157371
157314
  }
157372
157315
 
157373
157316
  // src/services/codefixes/removeAccidentalCallParentheses.ts
157374
- var fixId47 = "removeAccidentalCallParentheses";
157375
- var errorCodes60 = [
157317
+ var fixId46 = "removeAccidentalCallParentheses";
157318
+ var errorCodes59 = [
157376
157319
  Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code
157377
157320
  ];
157378
157321
  registerCodeFix({
157379
- errorCodes: errorCodes60,
157322
+ errorCodes: errorCodes59,
157380
157323
  getCodeActions(context) {
157381
157324
  const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression);
157382
157325
  if (!callExpression) {
@@ -157385,30 +157328,30 @@ registerCodeFix({
157385
157328
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {
157386
157329
  t.deleteRange(context.sourceFile, { pos: callExpression.expression.end, end: callExpression.end });
157387
157330
  });
157388
- return [createCodeFixActionWithoutFixAll(fixId47, changes, Diagnostics.Remove_parentheses)];
157331
+ return [createCodeFixActionWithoutFixAll(fixId46, changes, Diagnostics.Remove_parentheses)];
157389
157332
  },
157390
- fixIds: [fixId47]
157333
+ fixIds: [fixId46]
157391
157334
  });
157392
157335
 
157393
157336
  // src/services/codefixes/removeUnnecessaryAwait.ts
157394
- var fixId48 = "removeUnnecessaryAwait";
157395
- var errorCodes61 = [
157337
+ var fixId47 = "removeUnnecessaryAwait";
157338
+ var errorCodes60 = [
157396
157339
  Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code
157397
157340
  ];
157398
157341
  registerCodeFix({
157399
- errorCodes: errorCodes61,
157342
+ errorCodes: errorCodes60,
157400
157343
  getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
157401
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span));
157344
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span));
157402
157345
  if (changes.length > 0) {
157403
- return [createCodeFixAction(fixId48, changes, Diagnostics.Remove_unnecessary_await, fixId48, Diagnostics.Remove_all_unnecessary_uses_of_await)];
157346
+ return [createCodeFixAction(fixId47, changes, Diagnostics.Remove_unnecessary_await, fixId47, Diagnostics.Remove_all_unnecessary_uses_of_await)];
157404
157347
  }
157405
157348
  },
157406
- fixIds: [fixId48],
157349
+ fixIds: [fixId47],
157407
157350
  getAllCodeActions: (context) => {
157408
- return codeFixAll(context, errorCodes61, (changes, diag2) => makeChange11(changes, diag2.file, diag2));
157351
+ return codeFixAll(context, errorCodes60, (changes, diag2) => makeChange10(changes, diag2.file, diag2));
157409
157352
  }
157410
157353
  });
157411
- function makeChange11(changeTracker, sourceFile, span) {
157354
+ function makeChange10(changeTracker, sourceFile, span) {
157412
157355
  const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 135 /* AwaitKeyword */);
157413
157356
  const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression);
157414
157357
  if (!awaitExpression) {
@@ -157433,20 +157376,20 @@ function makeChange11(changeTracker, sourceFile, span) {
157433
157376
  }
157434
157377
 
157435
157378
  // src/services/codefixes/splitTypeOnlyImport.ts
157436
- var errorCodes62 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
157437
- var fixId49 = "splitTypeOnlyImport";
157379
+ var errorCodes61 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
157380
+ var fixId48 = "splitTypeOnlyImport";
157438
157381
  registerCodeFix({
157439
- errorCodes: errorCodes62,
157440
- fixIds: [fixId49],
157382
+ errorCodes: errorCodes61,
157383
+ fixIds: [fixId48],
157441
157384
  getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {
157442
157385
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {
157443
157386
  return splitTypeOnlyImport(t, getImportDeclaration2(context.sourceFile, context.span), context);
157444
157387
  });
157445
157388
  if (changes.length) {
157446
- return [createCodeFixAction(fixId49, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId49, Diagnostics.Split_all_invalid_type_only_imports)];
157389
+ return [createCodeFixAction(fixId48, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId48, Diagnostics.Split_all_invalid_type_only_imports)];
157447
157390
  }
157448
157391
  },
157449
- getAllCodeActions: (context) => codeFixAll(context, errorCodes62, (changes, error2) => {
157392
+ getAllCodeActions: (context) => codeFixAll(context, errorCodes61, (changes, error2) => {
157450
157393
  splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context);
157451
157394
  })
157452
157395
  });
@@ -157495,23 +157438,23 @@ function splitTypeOnlyImport(changes, importDeclaration, context) {
157495
157438
  }
157496
157439
 
157497
157440
  // src/services/codefixes/convertConstToLet.ts
157498
- var fixId50 = "fixConvertConstToLet";
157499
- var errorCodes63 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
157441
+ var fixId49 = "fixConvertConstToLet";
157442
+ var errorCodes62 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
157500
157443
  registerCodeFix({
157501
- errorCodes: errorCodes63,
157444
+ errorCodes: errorCodes62,
157502
157445
  getCodeActions: function getCodeActionsToConvertConstToLet(context) {
157503
157446
  const { sourceFile, span, program } = context;
157504
157447
  const info = getInfo21(sourceFile, span.start, program);
157505
157448
  if (info === void 0)
157506
157449
  return;
157507
157450
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange40(t, sourceFile, info.token));
157508
- return [createCodeFixActionMaybeFixAll(fixId50, changes, Diagnostics.Convert_const_to_let, fixId50, Diagnostics.Convert_all_const_to_let)];
157451
+ return [createCodeFixActionMaybeFixAll(fixId49, changes, Diagnostics.Convert_const_to_let, fixId49, Diagnostics.Convert_all_const_to_let)];
157509
157452
  },
157510
157453
  getAllCodeActions: (context) => {
157511
157454
  const { program } = context;
157512
157455
  const seen = /* @__PURE__ */ new Map();
157513
157456
  return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {
157514
- eachDiagnostic(context, errorCodes63, (diag2) => {
157457
+ eachDiagnostic(context, errorCodes62, (diag2) => {
157515
157458
  const info = getInfo21(diag2.file, diag2.start, program);
157516
157459
  if (info) {
157517
157460
  if (addToSeen(seen, getSymbolId(info.symbol))) {
@@ -157522,7 +157465,7 @@ registerCodeFix({
157522
157465
  });
157523
157466
  }));
157524
157467
  },
157525
- fixIds: [fixId50]
157468
+ fixIds: [fixId49]
157526
157469
  });
157527
157470
  function getInfo21(sourceFile, pos, program) {
157528
157471
  var _a;
@@ -157543,11 +157486,11 @@ function doChange40(changes, sourceFile, token) {
157543
157486
  }
157544
157487
 
157545
157488
  // src/services/codefixes/fixExpectedComma.ts
157546
- var fixId51 = "fixExpectedComma";
157489
+ var fixId50 = "fixExpectedComma";
157547
157490
  var expectedErrorCode = Diagnostics._0_expected.code;
157548
- var errorCodes64 = [expectedErrorCode];
157491
+ var errorCodes63 = [expectedErrorCode];
157549
157492
  registerCodeFix({
157550
- errorCodes: errorCodes64,
157493
+ errorCodes: errorCodes63,
157551
157494
  getCodeActions(context) {
157552
157495
  const { sourceFile } = context;
157553
157496
  const info = getInfo22(sourceFile, context.span.start, context.errorCode);
@@ -157555,15 +157498,15 @@ registerCodeFix({
157555
157498
  return void 0;
157556
157499
  const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange41(t, sourceFile, info));
157557
157500
  return [createCodeFixAction(
157558
- fixId51,
157501
+ fixId50,
157559
157502
  changes,
157560
157503
  [Diagnostics.Change_0_to_1, ";", ","],
157561
- fixId51,
157504
+ fixId50,
157562
157505
  [Diagnostics.Change_0_to_1, ";", ","]
157563
157506
  )];
157564
157507
  },
157565
- fixIds: [fixId51],
157566
- getAllCodeActions: (context) => codeFixAll(context, errorCodes64, (changes, diag2) => {
157508
+ fixIds: [fixId50],
157509
+ getAllCodeActions: (context) => codeFixAll(context, errorCodes63, (changes, diag2) => {
157567
157510
  const info = getInfo22(diag2.file, diag2.start, diag2.code);
157568
157511
  if (info)
157569
157512
  doChange41(changes, context.sourceFile, info);
@@ -157580,25 +157523,25 @@ function doChange41(changes, sourceFile, { node }) {
157580
157523
 
157581
157524
  // src/services/codefixes/fixAddVoidToPromise.ts
157582
157525
  var fixName7 = "addVoidToPromise";
157583
- var fixId52 = "addVoidToPromise";
157584
- var errorCodes65 = [
157526
+ var fixId51 = "addVoidToPromise";
157527
+ var errorCodes64 = [
157585
157528
  Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
157586
157529
  Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
157587
157530
  ];
157588
157531
  registerCodeFix({
157589
- errorCodes: errorCodes65,
157590
- fixIds: [fixId52],
157532
+ errorCodes: errorCodes64,
157533
+ fixIds: [fixId51],
157591
157534
  getCodeActions(context) {
157592
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange12(t, context.sourceFile, context.span, context.program));
157535
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span, context.program));
157593
157536
  if (changes.length > 0) {
157594
- return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId52, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];
157537
+ return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId51, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];
157595
157538
  }
157596
157539
  },
157597
157540
  getAllCodeActions(context) {
157598
- return codeFixAll(context, errorCodes65, (changes, diag2) => makeChange12(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set()));
157541
+ return codeFixAll(context, errorCodes64, (changes, diag2) => makeChange11(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set()));
157599
157542
  }
157600
157543
  });
157601
- function makeChange12(changes, sourceFile, span, program, seen) {
157544
+ function makeChange11(changes, sourceFile, span, program, seen) {
157602
157545
  const node = getTokenAtPosition(sourceFile, span.start);
157603
157546
  if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0)
157604
157547
  return;
@@ -165628,7 +165571,7 @@ function provideInlayHints(context) {
165628
165571
  return type.symbol && type.symbol.flags & 1536 /* Module */;
165629
165572
  }
165630
165573
  function visitVariableLikeDeclaration(decl) {
165631
- if (!decl.initializer || isBindingPattern(decl.name) || isVariableDeclaration(decl) && !isHintableDeclaration(decl)) {
165574
+ if (decl.initializer === void 0 && !(isPropertyDeclaration(decl) && !(checker.getTypeAtLocation(decl).flags & 1 /* Any */)) || isBindingPattern(decl.name) || isVariableDeclaration(decl) && !isHintableDeclaration(decl)) {
165632
165575
  return;
165633
165576
  }
165634
165577
  const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(decl);
@@ -175083,6 +175026,7 @@ __export(ts_exports2, {
175083
175026
  isSuperProperty: () => isSuperProperty,
175084
175027
  isSupportedSourceFileName: () => isSupportedSourceFileName,
175085
175028
  isSwitchStatement: () => isSwitchStatement,
175029
+ isSyntacticallyString: () => isSyntacticallyString,
175086
175030
  isSyntaxList: () => isSyntaxList,
175087
175031
  isSyntheticExpression: () => isSyntheticExpression,
175088
175032
  isSyntheticReference: () => isSyntheticReference,
@@ -186086,10 +186030,10 @@ ${e.message}`;
186086
186030
  }
186087
186031
  return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions;
186088
186032
  }
186089
- getCombinedCodeFix({ scope, fixId: fixId53 }, simplifiedResult) {
186033
+ getCombinedCodeFix({ scope, fixId: fixId52 }, simplifiedResult) {
186090
186034
  Debug.assert(scope.type === "file");
186091
186035
  const { file, project } = this.getFileAndProject(scope.args);
186092
- const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId53, this.getFormatOptions(file), this.getPreferences(file));
186036
+ const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId52, this.getFormatOptions(file), this.getPreferences(file));
186093
186037
  if (simplifiedResult) {
186094
186038
  return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands };
186095
186039
  } else {
@@ -186128,8 +186072,8 @@ ${e.message}`;
186128
186072
  mapCodeAction({ description: description3, changes, commands }) {
186129
186073
  return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands };
186130
186074
  }
186131
- mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId53, fixAllDescription }) {
186132
- return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId53, fixAllDescription };
186075
+ mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId52, fixAllDescription }) {
186076
+ return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId52, fixAllDescription };
186133
186077
  }
186134
186078
  mapTextChangesToCodeEdits(textChanges2) {
186135
186079
  return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change));
@@ -189284,6 +189228,7 @@ if (typeof console !== "undefined") {
189284
189228
  isSuperProperty,
189285
189229
  isSupportedSourceFileName,
189286
189230
  isSwitchStatement,
189231
+ isSyntacticallyString,
189287
189232
  isSyntaxList,
189288
189233
  isSyntheticExpression,
189289
189234
  isSyntheticReference,
@@ -5481,8 +5481,6 @@ var Diagnostics = {
5481
5481
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
5482
5482
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
5483
5483
  Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
5484
- Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: diag(1497, 1 /* Error */, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."),
5485
- Invalid_syntax_in_decorator: diag(1498, 1 /* Error */, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."),
5486
5484
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
5487
5485
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
5488
5486
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -7130,8 +7128,6 @@ var Diagnostics = {
7130
7128
  Add_optional_parameter_to_0: diag(95191, 3 /* Message */, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"),
7131
7129
  Add_optional_parameters_to_0: diag(95192, 3 /* Message */, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"),
7132
7130
  Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"),
7133
- Wrap_in_parentheses: diag(95194, 3 /* Message */, "Wrap_in_parentheses_95194", "Wrap in parentheses"),
7134
- Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"),
7135
7131
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
7136
7132
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
7137
7133
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.5.0-pr-57749-2",
5
+ "version": "5.5.0-pr-57686-4",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "ea3bbc27d9f03aad63a25335fe169598fea13147"
116
+ "gitHead": "1553ea578452313298576241b0e1c059813925f0"
117
117
  }