@artel/artc 0.6.25215 → 0.6.25217

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.
Files changed (41) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +23 -9
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +381 -339
  5. package/build/{chunk-TT3Q66WU.js → chunk-CMPXXHBQ.js} +3 -3
  6. package/build/{chunk-GEFYL4SZ.js → chunk-HN3XZZQX.js} +3 -3
  7. package/build/{chunk-DZ66PBHU.js → chunk-TXAEJ2GI.js} +3397 -2484
  8. package/build/types/analysis/Analyzer.d.ts +163 -159
  9. package/build/types/analysis/CallArgumentToParameterMatchResult.d.ts +3 -4
  10. package/build/types/analysis/DiagnosticCollector.d.ts +1 -0
  11. package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +12 -7
  12. package/build/types/analysis/SourceFileMembers.d.ts +11 -1
  13. package/build/types/diagnostic/DiagnosticCode.d.ts +107 -103
  14. package/build/types/emitter/EmitterContext.d.ts +9 -0
  15. package/build/types/emitter/Entities.d.ts +8 -2
  16. package/build/types/emitter/IrToJs.d.ts +0 -1
  17. package/build/types/emitter/Transformer.d.ts +2 -3
  18. package/build/types/emitter/ir/LoweringOptions.d.ts +3 -1
  19. package/build/types/emitter/ir/LoweringState.d.ts +24 -0
  20. package/build/types/emitter/ir/Nodes.d.ts +74 -85
  21. package/build/types/emitter/ir/types.d.ts +3 -2
  22. package/build/types/entities/AliasTypeEntity.d.ts +1 -1
  23. package/build/types/entities/DereferenceOperatorEntity.d.ts +7 -0
  24. package/build/types/entities/IndexerEntity.d.ts +7 -0
  25. package/build/types/entities/MethodTypeEntity.d.ts +9 -1
  26. package/build/types/entities/StructuredTypeEntity.d.ts +11 -3
  27. package/build/types/entities/TypeParameterEntity.d.ts +1 -1
  28. package/build/types/entities/VariantTypeEntity.d.ts +9 -1
  29. package/build/types/parser/Scanner.d.ts +0 -6
  30. package/build/types/parser/UnescapeText.d.ts +1 -1
  31. package/build/types/services/DisplayService.d.ts +201 -162
  32. package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +1 -3
  33. package/build/types/services/workspace/CompilationController.d.ts +23 -1
  34. package/build/types/services/workspace/Workspace.d.ts +1 -0
  35. package/build/types/tree/NodeKind.d.ts +85 -86
  36. package/build/types/tree/green/Nodes.d.ts +4 -13
  37. package/build/types/tree/red/Nodes.d.ts +5 -19
  38. package/build/types/ts-interop/Entities.d.ts +28 -8
  39. package/build/types/types/MethodType.d.ts +2 -2
  40. package/build/types/types/VariantType.d.ts +2 -2
  41. package/package.json +1 -1
@@ -182,7 +182,7 @@ import {
182
182
  unwrapParenthesizedExpressions,
183
183
  visitChildren,
184
184
  yieldExecution
185
- } from "../chunk-DZ66PBHU.js";
185
+ } from "../chunk-TXAEJ2GI.js";
186
186
 
187
187
  // source/services/CustomCommand.ts
188
188
  import * as ls from "vscode-languageserver";
@@ -302,7 +302,7 @@ var AddPropertyAssignmentService = class {
302
302
  let result;
303
303
  let leftValueText;
304
304
  if (propertyName !== void 0) {
305
- if (assignmentNode.left.kind !== 79 /* PropertyAccessExpression */) {
305
+ if (assignmentNode.left.kind !== 78 /* PropertyAccessExpression */) {
306
306
  return void 0;
307
307
  }
308
308
  const propertyReceiver = assignmentNode.left.expression;
@@ -367,19 +367,19 @@ var AddPropertyAssignmentService = class {
367
367
  case 56 /* TypeVariableSetterDeclaration */:
368
368
  case 58 /* NestedMethodDeclaration */:
369
369
  case 67 /* MethodBlockLiteral */:
370
- case 75 /* MethodLiteral */:
370
+ case 74 /* MethodLiteral */:
371
371
  case 53 /* OperatorDeclaration */:
372
372
  return void 0;
373
- case 99 /* RunStatement */:
373
+ case 98 /* RunStatement */:
374
374
  return this.ifShouldBeAssignedAtTheEndOfSubprogramThenBody(parent);
375
- case 100 /* OnErrorClause */:
376
- case 102 /* FinallyClause */:
377
- case 107 /* ForStatement */:
378
- case 108 /* IfStatement */:
379
- case 110 /* ElseIfClause */:
380
- case 114 /* LoopStatement */:
381
- case 119 /* SwitchStatementCaseClause */:
382
- case 120 /* WhileStatement */:
375
+ case 99 /* OnErrorClause */:
376
+ case 101 /* FinallyClause */:
377
+ case 106 /* ForStatement */:
378
+ case 107 /* IfStatement */:
379
+ case 109 /* ElseIfClause */:
380
+ case 113 /* LoopStatement */:
381
+ case 118 /* SwitchStatementCaseClause */:
382
+ case 119 /* WhileStatement */:
383
383
  return this.getContainingSubprogram(parent)?.body;
384
384
  default:
385
385
  Debug.never(parent);
@@ -414,7 +414,7 @@ function isSubprogramDeclaration(node) {
414
414
  case 56 /* TypeVariableSetterDeclaration */:
415
415
  case 58 /* NestedMethodDeclaration */:
416
416
  case 67 /* MethodBlockLiteral */:
417
- case 75 /* MethodLiteral */:
417
+ case 74 /* MethodLiteral */:
418
418
  return true;
419
419
  default:
420
420
  Debug.typeIsAssignableTo();
@@ -2032,19 +2032,19 @@ var SyntaxToCode = class _SyntaxToCode {
2032
2032
  [54 /* TypeVariableDeclaration */]: this.prototype.writeTypeVariableDeclaration,
2033
2033
  [55 /* TypeVariableGetterDeclaration */]: this.prototype.writeTypeVariableGetterDeclaration,
2034
2034
  [56 /* TypeVariableSetterDeclaration */]: this.prototype.writeTypeVariableSetterDeclaration,
2035
- [94 /* StatementBlock */]: this.prototype.writeStatementBlock,
2036
- [133 /* QualifiedName */]: this.prototype.writeQualifiedName,
2037
- [140 /* VariantDeclaration */]: this.prototype.writeVariantDeclaration,
2038
- [141 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
2039
- [142 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
2040
- [143 /* CallArgument */]: this.prototype.writeCallArgument,
2041
- [145 /* Tag */]: this.prototype.writeTag,
2042
- [147 /* Modifier */]: this.prototype.writeModifier,
2043
- [148 /* ParameterClause */]: this.prototype.writeParameterClause,
2044
- [149 /* ParameterList */]: this.prototype.writeParameterList,
2045
- [150 /* SetterParameterClause */]: this.prototype.writeSetterParameterClause,
2046
- [152 /* TypeArgumentClause */]: this.prototype.writeTypeArgumentClause,
2047
- [154 /* TypeParameterClause */]: this.prototype.writeTypeParameterClause,
2035
+ [93 /* StatementBlock */]: this.prototype.writeStatementBlock,
2036
+ [132 /* QualifiedName */]: this.prototype.writeQualifiedName,
2037
+ [139 /* VariantDeclaration */]: this.prototype.writeVariantDeclaration,
2038
+ [140 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
2039
+ [141 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
2040
+ [142 /* CallArgument */]: this.prototype.writeCallArgument,
2041
+ [144 /* Tag */]: this.prototype.writeTag,
2042
+ [146 /* Modifier */]: this.prototype.writeModifier,
2043
+ [147 /* ParameterClause */]: this.prototype.writeParameterClause,
2044
+ [148 /* ParameterList */]: this.prototype.writeParameterList,
2045
+ [149 /* SetterParameterClause */]: this.prototype.writeSetterParameterClause,
2046
+ [151 /* TypeArgumentClause */]: this.prototype.writeTypeArgumentClause,
2047
+ [153 /* TypeParameterClause */]: this.prototype.writeTypeParameterClause,
2048
2048
  [17 /* AnonymousMethodTypeDeclaration */]: this.prototype.writeAnonymousMethodTypeDeclaration,
2049
2049
  [18 /* AnonymousStructuredTypeDeclaration */]: this.prototype.writeAnonymousStructuredTypeDeclaration,
2050
2050
  [19 /* AnonymousVariantTypeDeclaration */]: this.prototype.writeAnonymousVariantTypeDeclaration,
@@ -2075,79 +2075,78 @@ var SyntaxToCode = class _SyntaxToCode {
2075
2075
  [68 /* CallArgumentList */]: this.prototype.writeNodeDefault,
2076
2076
  [69 /* CallExpression */]: this.prototype.writeNodeDefault,
2077
2077
  [70 /* AutotypeCallExpression */]: this.prototype.writeNodeDefault,
2078
- [71 /* IndexedAccessArgumentList */]: this.prototype.writeNodeDefault,
2079
- [72 /* IndexedAccessExpression */]: this.prototype.writeNodeDefault,
2080
- [73 /* InvalidExpression */]: this.prototype.writeNodeDefault,
2081
- [74 /* IsExpression */]: this.prototype.writeNodeDefault,
2082
- [75 /* MethodLiteral */]: this.prototype.writeNodeDefault,
2083
- [76 /* ParenthesizedExpression */]: this.prototype.writeNodeDefault,
2084
- [77 /* WhenTernaryExpression */]: this.prototype.writeNodeDefault,
2085
- [78 /* PrefixUnaryExpression */]: this.prototype.writeNodeDefault,
2086
- [79 /* PropertyAccessExpression */]: this.prototype.writeNodeDefault,
2087
- [80 /* ReferenceExpression */]: this.prototype.writeNodeDefault,
2088
- [81 /* DereferenceExpression */]: this.prototype.writeNodeDefault,
2089
- [82 /* TextTemplateLiteral */]: this.prototype.writeNodeDefault,
2090
- [83 /* TextTemplateSpanList */]: this.prototype.writeNodeDefault,
2091
- [84 /* TextTemplateSpan */]: this.prototype.writeNodeDefault,
2092
- [85 /* TokenExpression */]: this.prototype.writeNodeDefault,
2093
- [86 /* KeywordExpression */]: this.prototype.writeNodeDefault,
2094
- [87 /* ObjectExpression */]: this.prototype.writeNodeDefault,
2095
- [88 /* BaseExpression */]: this.prototype.writeNodeDefault,
2096
- [89 /* IdentifierExpression */]: this.prototype.writeNodeDefault,
2097
- [90 /* GenericSpecializationExpression */]: this.prototype.writeNodeDefault,
2098
- [91 /* DefaultMatchExpression */]: this.prototype.writeNodeDefault,
2099
- [92 /* AssignmentStatement */]: this.prototype.writeNodeDefault,
2100
- [93 /* StatementList */]: this.prototype.writeNodeDefault,
2101
- [95 /* BreakLoopStatement */]: this.prototype.writeNodeDefault,
2102
- [96 /* ContinueLoopStatement */]: this.prototype.writeNodeDefault,
2103
- [97 /* DisposeStatement */]: this.prototype.writeNodeDefault,
2104
- [98 /* RunStatementClauseList */]: this.prototype.writeNodeDefault,
2105
- [99 /* RunStatement */]: this.prototype.writeNodeDefault,
2106
- [100 /* OnErrorClause */]: this.prototype.writeNodeDefault,
2107
- [101 /* ErrorVariableDeclaration */]: this.prototype.writeNodeDefault,
2108
- [102 /* FinallyClause */]: this.prototype.writeNodeDefault,
2109
- [103 /* EmptyStatement */]: this.prototype.writeNodeDefault,
2110
- [104 /* ErrorStatement */]: this.prototype.writeNodeDefault,
2111
- [105 /* ExpressionStatement */]: this.prototype.writeNodeDefault,
2112
- [106 /* EnumerationVariableList */]: this.prototype.writeNodeDefault,
2113
- [107 /* ForStatement */]: this.prototype.writeNodeDefault,
2114
- [108 /* IfStatement */]: this.prototype.writeNodeDefault,
2115
- [109 /* ElseIfClauseList */]: this.prototype.writeNodeDefault,
2116
- [110 /* ElseIfClause */]: this.prototype.writeNodeDefault,
2117
- [111 /* InvalidStatement */]: this.prototype.writeNodeDefault,
2118
- [112 /* NestedMethodDeclarationStatement */]: this.prototype.writeNodeDefault,
2119
- [113 /* LocalVariableDeclarationStatement */]: this.prototype.writeNodeDefault,
2120
- [114 /* LoopStatement */]: this.prototype.writeNodeDefault,
2121
- [115 /* ReturnStatement */]: this.prototype.writeNodeDefault,
2122
- [116 /* CaseClauseList */]: this.prototype.writeNodeDefault,
2123
- [117 /* SwitchStatement */]: this.prototype.writeNodeDefault,
2124
- [118 /* MatchExpressionList */]: this.prototype.writeNodeDefault,
2125
- [119 /* SwitchStatementCaseClause */]: this.prototype.writeNodeDefault,
2126
- [120 /* WhileStatement */]: this.prototype.writeNodeDefault,
2127
- [121 /* YieldStatement */]: this.prototype.writeNodeDefault,
2128
- [122 /* TranslationParameterList */]: this.prototype.writeNodeDefault,
2129
- [123 /* TranslationParameterClause */]: this.prototype.writeTranslationParameterClause,
2130
- [124 /* ConstructorTranslation */]: this.prototype.writeConstructorTranslation,
2131
- [125 /* IndexerTranslationParameterClause */]: this.prototype.writeIndexerTranslationParameterClause,
2132
- [126 /* IndexerTranslation */]: this.prototype.writeIndexerTranslation,
2133
- [127 /* TranslationTypeParameterList */]: this.prototype.writeNodeDefault,
2134
- [128 /* TranslationTypeParameterClause */]: this.prototype.writeTranslationTypeParameterClause,
2135
- [129 /* PackageMethodTranslation */]: this.prototype.writePackageMethodTranslation,
2136
- [130 /* TypeMethodTranslation */]: this.prototype.writeTypeMethodTranslation,
2137
- [131 /* MethodTypeTranslation */]: this.prototype.writeMethodTypeTranslation,
2138
- [132 /* PackageImportTranslation */]: this.prototype.writePackageImportTranslation,
2139
- [134 /* PackageVariableTranslation */]: this.prototype.writePackageVariableTranslation,
2140
- [135 /* TypeVariableOrVariantTranslation */]: this.prototype.writeTypeVariableOrVariantTranslation,
2141
- [136 /* TypeMemberTranslationList */]: this.prototype.writeNodeDefault,
2142
- [137 /* TypeTranslation */]: this.prototype.writeTypeTranslation,
2143
- [138 /* TextLiteralTranslation */]: this.prototype.writeNodeDefault,
2144
- [139 /* TextTemplateLiteralTranslation */]: this.prototype.writeNodeDefault,
2145
- [144 /* TagList */]: this.prototype.writeNodeDefault,
2146
- [146 /* ModifierList */]: this.prototype.writeNodeDefault,
2147
- [151 /* SetterParameterDeclaration */]: this.prototype.writeNodeDefault,
2148
- [153 /* TypeArgumentList */]: this.prototype.writeNodeDefault,
2149
- [155 /* TypeParameterList */]: this.prototype.writeNodeDefault,
2150
- [156 /* TypeAnnotation */]: this.prototype.writeNodeDefault
2078
+ [71 /* IndexedAccessExpression */]: this.prototype.writeNodeDefault,
2079
+ [72 /* InvalidExpression */]: this.prototype.writeNodeDefault,
2080
+ [73 /* IsExpression */]: this.prototype.writeNodeDefault,
2081
+ [74 /* MethodLiteral */]: this.prototype.writeNodeDefault,
2082
+ [75 /* ParenthesizedExpression */]: this.prototype.writeNodeDefault,
2083
+ [76 /* WhenTernaryExpression */]: this.prototype.writeNodeDefault,
2084
+ [77 /* PrefixUnaryExpression */]: this.prototype.writeNodeDefault,
2085
+ [78 /* PropertyAccessExpression */]: this.prototype.writeNodeDefault,
2086
+ [79 /* ReferenceExpression */]: this.prototype.writeNodeDefault,
2087
+ [80 /* DereferenceExpression */]: this.prototype.writeNodeDefault,
2088
+ [81 /* TextTemplateLiteral */]: this.prototype.writeNodeDefault,
2089
+ [82 /* TextTemplateSpanList */]: this.prototype.writeNodeDefault,
2090
+ [83 /* TextTemplateSpan */]: this.prototype.writeNodeDefault,
2091
+ [84 /* TokenExpression */]: this.prototype.writeNodeDefault,
2092
+ [85 /* KeywordExpression */]: this.prototype.writeNodeDefault,
2093
+ [86 /* ObjectExpression */]: this.prototype.writeNodeDefault,
2094
+ [87 /* BaseExpression */]: this.prototype.writeNodeDefault,
2095
+ [88 /* IdentifierExpression */]: this.prototype.writeNodeDefault,
2096
+ [89 /* GenericSpecializationExpression */]: this.prototype.writeNodeDefault,
2097
+ [90 /* DefaultMatchExpression */]: this.prototype.writeNodeDefault,
2098
+ [91 /* AssignmentStatement */]: this.prototype.writeNodeDefault,
2099
+ [92 /* StatementList */]: this.prototype.writeNodeDefault,
2100
+ [94 /* BreakLoopStatement */]: this.prototype.writeNodeDefault,
2101
+ [95 /* ContinueLoopStatement */]: this.prototype.writeNodeDefault,
2102
+ [96 /* DisposeStatement */]: this.prototype.writeNodeDefault,
2103
+ [97 /* RunStatementClauseList */]: this.prototype.writeNodeDefault,
2104
+ [98 /* RunStatement */]: this.prototype.writeNodeDefault,
2105
+ [99 /* OnErrorClause */]: this.prototype.writeNodeDefault,
2106
+ [100 /* ErrorVariableDeclaration */]: this.prototype.writeNodeDefault,
2107
+ [101 /* FinallyClause */]: this.prototype.writeNodeDefault,
2108
+ [102 /* EmptyStatement */]: this.prototype.writeNodeDefault,
2109
+ [103 /* ErrorStatement */]: this.prototype.writeNodeDefault,
2110
+ [104 /* ExpressionStatement */]: this.prototype.writeNodeDefault,
2111
+ [105 /* EnumerationVariableList */]: this.prototype.writeNodeDefault,
2112
+ [106 /* ForStatement */]: this.prototype.writeNodeDefault,
2113
+ [107 /* IfStatement */]: this.prototype.writeNodeDefault,
2114
+ [108 /* ElseIfClauseList */]: this.prototype.writeNodeDefault,
2115
+ [109 /* ElseIfClause */]: this.prototype.writeNodeDefault,
2116
+ [110 /* InvalidStatement */]: this.prototype.writeNodeDefault,
2117
+ [111 /* NestedMethodDeclarationStatement */]: this.prototype.writeNodeDefault,
2118
+ [112 /* LocalVariableDeclarationStatement */]: this.prototype.writeNodeDefault,
2119
+ [113 /* LoopStatement */]: this.prototype.writeNodeDefault,
2120
+ [114 /* ReturnStatement */]: this.prototype.writeNodeDefault,
2121
+ [115 /* CaseClauseList */]: this.prototype.writeNodeDefault,
2122
+ [116 /* SwitchStatement */]: this.prototype.writeNodeDefault,
2123
+ [117 /* MatchExpressionList */]: this.prototype.writeNodeDefault,
2124
+ [118 /* SwitchStatementCaseClause */]: this.prototype.writeNodeDefault,
2125
+ [119 /* WhileStatement */]: this.prototype.writeNodeDefault,
2126
+ [120 /* YieldStatement */]: this.prototype.writeNodeDefault,
2127
+ [121 /* TranslationParameterList */]: this.prototype.writeNodeDefault,
2128
+ [122 /* TranslationParameterClause */]: this.prototype.writeTranslationParameterClause,
2129
+ [123 /* ConstructorTranslation */]: this.prototype.writeConstructorTranslation,
2130
+ [124 /* IndexerTranslationParameterClause */]: this.prototype.writeIndexerTranslationParameterClause,
2131
+ [125 /* IndexerTranslation */]: this.prototype.writeIndexerTranslation,
2132
+ [126 /* TranslationTypeParameterList */]: this.prototype.writeNodeDefault,
2133
+ [127 /* TranslationTypeParameterClause */]: this.prototype.writeTranslationTypeParameterClause,
2134
+ [128 /* PackageMethodTranslation */]: this.prototype.writePackageMethodTranslation,
2135
+ [129 /* TypeMethodTranslation */]: this.prototype.writeTypeMethodTranslation,
2136
+ [130 /* MethodTypeTranslation */]: this.prototype.writeMethodTypeTranslation,
2137
+ [131 /* PackageImportTranslation */]: this.prototype.writePackageImportTranslation,
2138
+ [133 /* PackageVariableTranslation */]: this.prototype.writePackageVariableTranslation,
2139
+ [134 /* TypeVariableOrVariantTranslation */]: this.prototype.writeTypeVariableOrVariantTranslation,
2140
+ [135 /* TypeMemberTranslationList */]: this.prototype.writeNodeDefault,
2141
+ [136 /* TypeTranslation */]: this.prototype.writeTypeTranslation,
2142
+ [137 /* TextLiteralTranslation */]: this.prototype.writeNodeDefault,
2143
+ [138 /* TextTemplateLiteralTranslation */]: this.prototype.writeNodeDefault,
2144
+ [143 /* TagList */]: this.prototype.writeNodeDefault,
2145
+ [145 /* ModifierList */]: this.prototype.writeNodeDefault,
2146
+ [150 /* SetterParameterDeclaration */]: this.prototype.writeNodeDefault,
2147
+ [152 /* TypeArgumentList */]: this.prototype.writeNodeDefault,
2148
+ [154 /* TypeParameterList */]: this.prototype.writeNodeDefault,
2149
+ [155 /* TypeAnnotation */]: this.prototype.writeNodeDefault
2151
2150
  };
2152
2151
  return writeFunctions;
2153
2152
  }
@@ -2333,7 +2332,7 @@ var TranslationsGenerationService = class {
2333
2332
  return void 0;
2334
2333
  }
2335
2334
  let result;
2336
- if (tokenOrKeyword.isToken(63 /* Identifier */) && tokenOrKeyword.parent.kind === 137 /* TypeTranslation */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
2335
+ if (tokenOrKeyword.isToken(63 /* Identifier */) && tokenOrKeyword.parent.kind === 136 /* TypeTranslation */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
2337
2336
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
2338
2337
  if (translationPackage !== void 0) {
2339
2338
  const generator = new TranslationsGenerator(
@@ -2379,7 +2378,7 @@ var TranslationsGenerationService = class {
2379
2378
  return false;
2380
2379
  }
2381
2380
  const generator = new TranslationsGenerator(analyzer, sourceFile, translationPackage, sourceFile.package.dialect);
2382
- return Query.from(tokenOrKeyword.parent.translationList.translationDeclarations).filter((t) => t.kind === 137 /* TypeTranslation */).mapAndFilter((t) => translationPackage.getTypeTranslationTarget(t).target).any((t) => generator.collectNotTranslatedTypeMembers(t).length > 0);
2381
+ return Query.from(tokenOrKeyword.parent.translationList.translationDeclarations).filter((t) => t.kind === 136 /* TypeTranslation */).mapAndFilter((t) => translationPackage.getTypeTranslationTarget(t).target).any((t) => generator.collectNotTranslatedTypeMembers(t).length > 0);
2383
2382
  }
2384
2383
  };
2385
2384
  var TranslationsGenerator = class _TranslationsGenerator {
@@ -2406,7 +2405,7 @@ var TranslationsGenerator = class _TranslationsGenerator {
2406
2405
  };
2407
2406
  const memberTranslationsCode = Query.from(memberEntities).mapAndFilter((m) => this.createPackageMemberTranslationNode(m)).uniqueWithComparator(compareNodes).map((n) => {
2408
2407
  const code = new SyntaxToCode(n, syntaxToCodeOptions).convert();
2409
- if (n.kind === 137 /* TypeTranslation */) {
2408
+ if (n.kind === 136 /* TypeTranslation */) {
2410
2409
  const startOffset = Math.max(code.indexOf(newLine), 0);
2411
2410
  return this.addNewLineBeforeArrowsInTranslation(
2412
2411
  code,
@@ -2438,7 +2437,7 @@ var TranslationsGenerator = class _TranslationsGenerator {
2438
2437
  generateMissingTranslationsForPartiallyTranslatedTypes(translationsDeclaration) {
2439
2438
  const result = new Array();
2440
2439
  for (const translation of translationsDeclaration.translationList.translationDeclarations) {
2441
- if (translation.kind === 137 /* TypeTranslation */) {
2440
+ if (translation.kind === 136 /* TypeTranslation */) {
2442
2441
  const edits = this.generateMissingTypeMemberTranslations(translation);
2443
2442
  if (edits !== void 0) {
2444
2443
  result.push(...edits);
@@ -2546,13 +2545,13 @@ var TranslationsGenerator = class _TranslationsGenerator {
2546
2545
  }
2547
2546
  detectIndentationStepForTypeMemberTranslations(node) {
2548
2547
  let indentationStepSize;
2549
- if (node.kind === 137 /* TypeTranslation */) {
2548
+ if (node.kind === 136 /* TypeTranslation */) {
2550
2549
  indentationStepSize = tryDetectIndentationStepSizeUsingTypeTranslation(node, this._sourceFile);
2551
2550
  }
2552
2551
  if (indentationStepSize === void 0) {
2553
2552
  const translationsDeclarations = node.kind === 21 /* TranslationsDeclaration */ ? node : node.parent.parent;
2554
2553
  for (const member of translationsDeclarations.translationList.translationDeclarations) {
2555
- if (member.kind === 137 /* TypeTranslation */) {
2554
+ if (member.kind === 136 /* TypeTranslation */) {
2556
2555
  indentationStepSize = tryDetectIndentationStepSizeUsingTypeTranslation(member, this._sourceFile);
2557
2556
  if (indentationStepSize !== void 0) {
2558
2557
  break;
@@ -2740,7 +2739,7 @@ var CodeActionsService = class {
2740
2739
  }
2741
2740
  const result = new Array();
2742
2741
  const diagnosticCodeSet = new Set(diagnosticCodes);
2743
- if (diagnosticCodeSet.has(103 /* TheFollowingDeclarationsAreNotTranslated0 */) || diagnosticCodeSet.has(104 /* TheFollowingDeclarationAreNotTranslated0And1More */)) {
2742
+ if (diagnosticCodeSet.has(104 /* TheFollowingDeclarationsAreNotTranslated0 */) || diagnosticCodeSet.has(105 /* TheFollowingDeclarationAreNotTranslated0And1More */)) {
2744
2743
  const data = { onlyTypeMembers: false };
2745
2744
  result.push(CodeAction.unresolved(
2746
2745
  "\u0421\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u044B.",
@@ -2799,56 +2798,38 @@ function isGenerateMissingTranslationsCodeActionData(value) {
2799
2798
 
2800
2799
  // source/services/signature-help/SignatureWithValueParameters.ts
2801
2800
  var ValueArgumentFactory = class _ValueArgumentFactory {
2802
- static {
2803
- this.createValueArgumentFromCallArgument = (argument) => new ValueArgument(argument.name?.value, argument.value);
2804
- }
2805
- static {
2806
- this.createValueArgumentFromIndexerArgument = (argument) => new ValueArgument(void 0, argument);
2807
- }
2808
2801
  static createValueArgumentsOfCallExpression(node) {
2809
- return _ValueArgumentFactory.createValueArgumentsFromListElement(
2810
- node.callArgumentList.elements,
2811
- _ValueArgumentFactory.createValueArgumentFromCallArgument
2812
- );
2802
+ return _ValueArgumentFactory.createValueArgumentsFromList(node.callArgumentList);
2813
2803
  }
2814
2804
  static createValueArgumentsOfAutotypeCallExpression(node) {
2815
- return _ValueArgumentFactory.createValueArgumentsFromListElement(
2816
- node.callArgumentList.elements,
2817
- _ValueArgumentFactory.createValueArgumentFromCallArgument
2818
- );
2805
+ return _ValueArgumentFactory.createValueArgumentsFromList(node.callArgumentList);
2819
2806
  }
2820
2807
  static createValueArgumentsOfIndexedAccessExpression(node) {
2821
- return _ValueArgumentFactory.createValueArgumentsFromListElement(
2822
- node.argumentsList.elements,
2823
- _ValueArgumentFactory.createValueArgumentFromIndexerArgument
2824
- );
2808
+ return _ValueArgumentFactory.createValueArgumentsFromList(node.argumentsList);
2825
2809
  }
2826
2810
  static createValueArgumentsOfTag(node) {
2827
2811
  if (node.callArgumentList !== void 0) {
2828
- return _ValueArgumentFactory.createValueArgumentsFromListElement(
2829
- node.callArgumentList.elements,
2830
- _ValueArgumentFactory.createValueArgumentFromCallArgument
2831
- );
2812
+ return _ValueArgumentFactory.createValueArgumentsFromList(node.callArgumentList);
2832
2813
  }
2833
2814
  return [];
2834
2815
  }
2835
- static createValueArgumentsFromListElement(elements, createValueArgument) {
2816
+ static createValueArgumentsFromList(list) {
2836
2817
  const result = new Array();
2837
2818
  let previousElementIsArgument = false;
2838
- for (const element of elements) {
2819
+ for (const element of list.elements) {
2839
2820
  if (element.kind === 0 /* Token */) {
2840
2821
  if (!previousElementIsArgument) {
2841
2822
  result.push(new ValueArgument(void 0, void 0));
2842
2823
  }
2843
2824
  previousElementIsArgument = false;
2844
2825
  } else {
2845
- result.push(createValueArgument(element));
2826
+ result.push(new ValueArgument(element.name?.value, element.value));
2846
2827
  previousElementIsArgument = true;
2847
2828
  }
2848
2829
  }
2849
- if (elements.length > 0 && elements[elements.length - 1].kind === 0 /* Token */) {
2830
+ if (list.elements.length > 0 && list.elements[list.elements.length - 1].kind === 0 /* Token */) {
2850
2831
  result.push(new ValueArgument(void 0, void 0));
2851
- } else if (elements.length === 0) {
2832
+ } else if (list.elements.length === 0) {
2852
2833
  result.push(new ValueArgument(void 0, void 0));
2853
2834
  }
2854
2835
  return result;
@@ -2861,9 +2842,9 @@ var SignatureForNode = class _SignatureForNode {
2861
2842
  return _SignatureForNode.getSignaturesForCallExpression(analyzer, node);
2862
2843
  case 70 /* AutotypeCallExpression */:
2863
2844
  return _SignatureForNode.getSignaturesForAutotypeCallExpression(analyzer, node);
2864
- case 72 /* IndexedAccessExpression */:
2845
+ case 71 /* IndexedAccessExpression */:
2865
2846
  return _SignatureForNode.getSignaturesForIndexedAccessExpression(analyzer, node);
2866
- case 145 /* Tag */:
2847
+ case 144 /* Tag */:
2867
2848
  return _SignatureForNode.getSignaturesForTag(analyzer, node);
2868
2849
  default:
2869
2850
  Debug.never(node);
@@ -2916,22 +2897,21 @@ var SignatureForNode = class _SignatureForNode {
2916
2897
  return void 0;
2917
2898
  }
2918
2899
  static getSignaturesForIndexedAccessExpression(analyzer, node) {
2919
- const meaning = analyzer.getIndexedAccessExpressionMeaning(node);
2920
- let indexer;
2900
+ const meaning = analyzer.resolveIndexedAccessExpression(node).meaning;
2921
2901
  switch (meaning.kind) {
2922
- case "resolved":
2923
- indexer = meaning.indexer;
2924
- break;
2902
+ case "resolved": {
2903
+ let suitableSignatureIndex;
2904
+ if (meaning.singleSuitableIndexer !== void 0) {
2905
+ suitableSignatureIndex = meaning.candidates.indexOf(meaning.singleSuitableIndexer);
2906
+ }
2907
+ const signatures = meaning.candidates.map((i) => new IndexerSignature(i));
2908
+ return new SignaturesWithSingleSuitable(signatures, suitableSignatureIndex);
2909
+ }
2925
2910
  case "unresolved":
2926
- break;
2911
+ return void 0;
2927
2912
  default:
2928
2913
  Debug.never(meaning);
2929
2914
  }
2930
- if (indexer !== void 0) {
2931
- const signature = new IndexerSignature(indexer);
2932
- return new SignaturesWithSingleSuitable([signature], 0);
2933
- }
2934
- return void 0;
2935
2915
  }
2936
2916
  static getSignaturesForTag(analyzer, node) {
2937
2917
  const meaning = analyzer.getTagMeaning(node);
@@ -3003,7 +2983,7 @@ var SimplifiedOverloadResolver = class _SimplifiedOverloadResolver {
3003
2983
  result = false;
3004
2984
  break;
3005
2985
  }
3006
- if (argument.expression === void 0 || argument.expression.kind === 73 /* InvalidExpression */) {
2986
+ if (argument.expression === void 0 || argument.expression.kind === 72 /* InvalidExpression */) {
3007
2987
  continue;
3008
2988
  }
3009
2989
  const targetParameterType = targetParameter.getType();
@@ -3297,7 +3277,7 @@ var CompletionService = class {
3297
3277
  if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || this.tokenOrKeywordIsPackageImportListChild(tokenOrKeyword)) {
3298
3278
  return new PackageImportCompletionContext([], void 0);
3299
3279
  }
3300
- if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 79 /* PropertyAccessExpression */) {
3280
+ if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 78 /* PropertyAccessExpression */) {
3301
3281
  const propertyAccess = tokenOrKeyword.parent;
3302
3282
  {
3303
3283
  const info = this._analyzer.checkExpressionDenotesPackageNameSegment(propertyAccess.expression);
@@ -3338,7 +3318,7 @@ var CompletionService = class {
3338
3318
  typeExtensionLookup
3339
3319
  );
3340
3320
  }
3341
- if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 133 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
3321
+ if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 132 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
3342
3322
  const namedTypeSpecifier = tokenOrKeyword.parent.parent;
3343
3323
  const resolutionResult = this._analyzer.resolveNamedTypeSpecifier(namedTypeSpecifier);
3344
3324
  const segmentIndex = Math.floor(
@@ -3346,7 +3326,7 @@ var CompletionService = class {
3346
3326
  );
3347
3327
  if (segmentIndex < resolutionResult.resolvedQualifiers.length) {
3348
3328
  let completionInIsOrAsExpressionInfo;
3349
- if (namedTypeSpecifier.parent.kind === 74 /* IsExpression */ || namedTypeSpecifier.parent.kind === 65 /* AsExpression */) {
3329
+ if (namedTypeSpecifier.parent.kind === 73 /* IsExpression */ || namedTypeSpecifier.parent.kind === 65 /* AsExpression */) {
3350
3330
  completionInIsOrAsExpressionInfo = {
3351
3331
  expressionType: this._analyzer.type.ofExpression(namedTypeSpecifier.parent.expression)
3352
3332
  };
@@ -3382,7 +3362,7 @@ var CompletionService = class {
3382
3362
  }
3383
3363
  if (syntaxContext.isUnqualifiedTypeContext !== void 0) {
3384
3364
  let completionInIsOrAsExpressionInfo;
3385
- if (tokenOrKeyword.parent.kind === 74 /* IsExpression */ || tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
3365
+ if (tokenOrKeyword.parent.kind === 73 /* IsExpression */ || tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
3386
3366
  completionInIsOrAsExpressionInfo = {
3387
3367
  expressionType: this._analyzer.type.ofExpression(tokenOrKeyword.parent.expression)
3388
3368
  };
@@ -3432,17 +3412,17 @@ var CompletionService = class {
3432
3412
  translationKind = 0 /* Any */;
3433
3413
  hasPrecedingKeyword = false;
3434
3414
  }
3435
- if (tokenOrKeyword.isKeyword(17 /* Import */) && tokenOrKeyword.parent.kind === 132 /* PackageImportTranslation */) {
3415
+ if (tokenOrKeyword.isKeyword(17 /* Import */) && tokenOrKeyword.parent.kind === 131 /* PackageImportTranslation */) {
3436
3416
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3437
3417
  translationKind = 1 /* PackageImport */;
3438
3418
  hasPrecedingKeyword = true;
3439
3419
  }
3440
- if (tokenOrKeyword.isKeyword(15 /* Type */) && (tokenOrKeyword.parent.kind === 137 /* TypeTranslation */ || tokenOrKeyword.parent.kind === 131 /* MethodTypeTranslation */)) {
3420
+ if (tokenOrKeyword.isKeyword(15 /* Type */) && (tokenOrKeyword.parent.kind === 136 /* TypeTranslation */ || tokenOrKeyword.parent.kind === 130 /* MethodTypeTranslation */)) {
3441
3421
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3442
3422
  translationKind = 3 /* Type */;
3443
3423
  hasPrecedingKeyword = true;
3444
3424
  }
3445
- if (tokenOrKeyword.isKeyword(11 /* Function */) && tokenOrKeyword.parent.kind === 129 /* PackageMethodTranslation */) {
3425
+ if (tokenOrKeyword.isKeyword(11 /* Function */) && tokenOrKeyword.parent.kind === 128 /* PackageMethodTranslation */) {
3446
3426
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3447
3427
  translationKind = 2 /* Method */;
3448
3428
  hasPrecedingKeyword = true;
@@ -3462,9 +3442,9 @@ var CompletionService = class {
3462
3442
  hasPrecedingKeyword
3463
3443
  );
3464
3444
  }
3465
- if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 133 /* QualifiedName */) {
3445
+ if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 132 /* QualifiedName */) {
3466
3446
  const qualifiedName = tokenOrKeyword.parent;
3467
- if (qualifiedName.parent.kind === 132 /* PackageImportTranslation */ && qualifiedName === qualifiedName.parent.sourceName) {
3447
+ if (qualifiedName.parent.kind === 131 /* PackageImportTranslation */ && qualifiedName === qualifiedName.parent.sourceName) {
3468
3448
  const precedingSegmentNames = qualifiedName.qualifiers.takeWhile((s) => s.rangeStart < tokenOrKeyword.value.rangeStart).map((p) => this._analyzer.createNameFromIdentifier(p)).toArray();
3469
3449
  const sourceLocale = translationPackage.getTranslatedPackage().getLocale();
3470
3450
  return new PackageImportCompletionContext(precedingSegmentNames, { sourceLocale });
@@ -3489,12 +3469,12 @@ var CompletionService = class {
3489
3469
  translationKind = 0 /* Any */;
3490
3470
  hasPrecedingKeyword = false;
3491
3471
  }
3492
- if (tokenOrKeyword.isKeyword(11 /* Function */) && tokenOrKeyword.parent.kind === 130 /* TypeMethodTranslation */) {
3472
+ if (tokenOrKeyword.isKeyword(11 /* Function */) && tokenOrKeyword.parent.kind === 129 /* TypeMethodTranslation */) {
3493
3473
  typeTranslation = tokenOrKeyword.parent.parent.parent;
3494
3474
  translationKind = 1 /* Method */;
3495
3475
  hasPrecedingKeyword = true;
3496
3476
  }
3497
- if (tokenOrKeyword.isKeyword(28 /* Creation */) && tokenOrKeyword.parent.kind === 124 /* ConstructorTranslation */) {
3477
+ if (tokenOrKeyword.isKeyword(28 /* Creation */) && tokenOrKeyword.parent.kind === 123 /* ConstructorTranslation */) {
3498
3478
  typeTranslation = tokenOrKeyword.parent.parent.parent;
3499
3479
  translationKind = 3 /* Constructor */;
3500
3480
  hasPrecedingKeyword = true;
@@ -3534,10 +3514,19 @@ var CompletionService = class {
3534
3514
  role.argumentList.parent
3535
3515
  );
3536
3516
  break;
3537
- case 145 /* Tag */:
3517
+ case 144 /* Tag */:
3538
3518
  signatures = SignatureForNode.getSignaturesForTag(this._analyzer, role.argumentList.parent);
3539
3519
  valueArguments = ValueArgumentFactory.createValueArgumentsOfTag(role.argumentList.parent);
3540
3520
  break;
3521
+ case 71 /* IndexedAccessExpression */:
3522
+ signatures = SignatureForNode.getSignaturesForIndexedAccessExpression(
3523
+ this._analyzer,
3524
+ role.argumentList.parent
3525
+ );
3526
+ valueArguments = ValueArgumentFactory.createValueArgumentsOfIndexedAccessExpression(role.argumentList.parent);
3527
+ break;
3528
+ default:
3529
+ Debug.never(role.argumentList.parent);
3541
3530
  }
3542
3531
  if (signatures !== void 0) {
3543
3532
  return this.getTargetTypesAndTargetSignaturesParametersFromSignatures(
@@ -3549,22 +3538,6 @@ var CompletionService = class {
3549
3538
  return { targetTypes: void 0, targetSignaturesParameters: void 0 };
3550
3539
  }
3551
3540
  }
3552
- if (role.kind === "indexed-access-argument") {
3553
- const signatures = SignatureForNode.getSignaturesForIndexedAccessExpression(
3554
- this._analyzer,
3555
- role.argumentList.parent
3556
- );
3557
- const valueArguments = ValueArgumentFactory.createValueArgumentsOfIndexedAccessExpression(role.argumentList.parent);
3558
- if (signatures !== void 0) {
3559
- return this.getTargetTypesAndTargetSignaturesParametersFromSignatures(
3560
- signatures.values,
3561
- valueArguments,
3562
- role.index
3563
- );
3564
- } else {
3565
- return { targetTypes: void 0, targetSignaturesParameters: void 0 };
3566
- }
3567
- }
3568
3541
  if (role.kind === "array-element") {
3569
3542
  let type = this._analyzer.type.ofExpression(role.array);
3570
3543
  type = this._analyzer.excludeNoneFromType(type);
@@ -3671,10 +3644,10 @@ var CompletionService = class {
3671
3644
  }
3672
3645
  const kinds = /* @__PURE__ */ new Set();
3673
3646
  if (syntaxContext.isPackageMemberDeclarationListContext) {
3674
- kinds.add(17 /* Import */).add(7 /* Run */).add(28 /* Creation */).add(11 /* Function */).add(15 /* Type */).add(57 /* Get */).add(58 /* Set */).add(54 /* Translations */);
3647
+ kinds.add(17 /* Import */).add(7 /* Run */).add(28 /* Creation */).add(11 /* Function */).add(16 /* Basic */).add(15 /* Type */).add(57 /* Get */).add(58 /* Set */).add(54 /* Translations */);
3675
3648
  }
3676
3649
  if (syntaxContext.isPackageMemberDeclarationListContext || syntaxContext.isTypeMemberDeclarationListContext) {
3677
- kinds.add(34 /* Hidden */).add(39 /* Static */).add(16 /* Basic */).add(36 /* Redefinable */).add(35 /* Abstract */).add(37 /* Redefined */).add(38 /* Async */).add(33 /* Const */);
3650
+ kinds.add(34 /* Hidden */).add(39 /* Static */).add(36 /* Redefinable */).add(35 /* Abstract */).add(37 /* Redefined */).add(38 /* Async */).add(33 /* Const */);
3678
3651
  }
3679
3652
  if (syntaxContext.isTypeMemberDeclarationListContext) {
3680
3653
  kinds.add(28 /* Creation */).add(11 /* Function */).add(46 /* Destruction */).add(57 /* Get */).add(58 /* Set */);
@@ -3724,7 +3697,7 @@ var CompletionService = class {
3724
3697
  if (syntaxContext.isUnqualifiedTypeContext?.allowsAnonymousTypes === true) {
3725
3698
  kinds.add(5 /* PlainObject */).add(4 /* Object */).add(6 /* Variant */).add(3 /* Aspect */).add(11 /* Function */).add(38 /* Async */);
3726
3699
  }
3727
- if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(38 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 58 /* NestedMethodDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 75 /* MethodLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 29 /* MethodTypeDeclarationBody */)) {
3700
+ if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(38 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 58 /* NestedMethodDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 74 /* MethodLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 29 /* MethodTypeDeclarationBody */)) {
3728
3701
  kinds.add(11 /* Function */);
3729
3702
  }
3730
3703
  return Query.from(kinds.values()).map(
@@ -3736,28 +3709,28 @@ var CompletionService = class {
3736
3709
  return false;
3737
3710
  }
3738
3711
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3739
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 114 /* LoopStatement */;
3712
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 113 /* LoopStatement */;
3740
3713
  }
3741
3714
  isModifierLevelContext(positionDescription) {
3742
3715
  if (positionDescription.kind !== "after-token-or-keyword") {
3743
3716
  return false;
3744
3717
  }
3745
3718
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3746
- return tokenOrKeyword.isToken(44 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 147 /* Modifier */;
3719
+ return tokenOrKeyword.isToken(44 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 146 /* Modifier */;
3747
3720
  }
3748
3721
  isElseOrElseIfKeywordContext(positionDescription) {
3749
3722
  if (positionDescription.kind !== "after-token-or-keyword") {
3750
3723
  return false;
3751
3724
  }
3752
3725
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3753
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 108 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.thenBlock || tokenOrKeyword.parent.parent.kind === 110 /* ElseIfClause */);
3726
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 107 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.thenBlock || tokenOrKeyword.parent.parent.kind === 109 /* ElseIfClause */);
3754
3727
  }
3755
3728
  isRunStatementAccessorListContext(positionDescription) {
3756
3729
  if (positionDescription.kind !== "after-token-or-keyword") {
3757
3730
  return false;
3758
3731
  }
3759
3732
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3760
- return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 99 /* RunStatement */ || tokenOrKeyword.parent.parent.kind === 100 /* OnErrorClause */ || tokenOrKeyword.parent.parent.kind === 102 /* FinallyClause */);
3733
+ return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 98 /* RunStatement */ || tokenOrKeyword.parent.parent.kind === 99 /* OnErrorClause */ || tokenOrKeyword.parent.parent.kind === 101 /* FinallyClause */);
3761
3734
  }
3762
3735
  isTypeKindCompletionContext(positionDescription) {
3763
3736
  return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(57 /* Equals */) && NodeTypeUtils.isPackageTypeDeclaration(positionDescription.tokenOrKeyword.parent);
@@ -3774,10 +3747,10 @@ var CompletionService = class {
3774
3747
  return false;
3775
3748
  }
3776
3749
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3777
- if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 119 /* SwitchStatementCaseClause */) {
3750
+ if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 118 /* SwitchStatementCaseClause */) {
3778
3751
  return true;
3779
3752
  }
3780
- if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 117 /* SwitchStatement */) {
3753
+ if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 116 /* SwitchStatement */) {
3781
3754
  return true;
3782
3755
  }
3783
3756
  return false;
@@ -4088,11 +4061,7 @@ var CompletionService = class {
4088
4061
  }
4089
4062
  getTopLevelAliasListCompletionItemInfos(ctx) {
4090
4063
  let result;
4091
- const displayService_ = new DisplayService(
4092
- this._analyzer,
4093
- new LocalizationContext([], ctx.sourceLocale),
4094
- this._dialect
4095
- );
4064
+ const displayService_ = new DisplayService(this._analyzer, ctx.sourceLocale, this._dialect);
4096
4065
  if (ctx.translationKind === 1 /* PackageImport */) {
4097
4066
  let items;
4098
4067
  if (this._sourceFile.package.kind === "translation") {
@@ -4188,11 +4157,7 @@ var CompletionService = class {
4188
4157
  getTypeAliasMemberListItemInfos(ctx) {
4189
4158
  let result = Query.empty();
4190
4159
  if (ctx.typeEntity !== void 0) {
4191
- const displayService_ = new DisplayService(
4192
- this._analyzer,
4193
- new LocalizationContext([], ctx.sourceLocale),
4194
- this._dialect
4195
- );
4160
+ const displayService_ = new DisplayService(this._analyzer, ctx.sourceLocale, this._dialect);
4196
4161
  if (ctx.translationKind === 1 /* Method */) {
4197
4162
  result = Query.from(ctx.typeEntity.getMembers().getNamedMembers()).mapAndFilter((m) => {
4198
4163
  if (m.kind === 5 /* Method */) {
@@ -4411,9 +4376,9 @@ function getRightmostChildExcludingValidEmptyNodes(node) {
4411
4376
  }
4412
4377
  function isInvalidNode(node) {
4413
4378
  switch (node.kind) {
4414
- case 73 /* InvalidExpression */:
4379
+ case 72 /* InvalidExpression */:
4415
4380
  case 43 /* InvalidPackageMemberDeclaration */:
4416
- case 111 /* InvalidStatement */:
4381
+ case 110 /* InvalidStatement */:
4417
4382
  case 57 /* InvalidTypeMemberDeclaration */:
4418
4383
  case 16 /* InvalidTypeSpecifier */:
4419
4384
  return true;
@@ -5199,13 +5164,6 @@ var ExpressionRole_callArgument = class {
5199
5164
  this.kind = "call-argument";
5200
5165
  }
5201
5166
  };
5202
- var ExpressionRole_indexedAccessArgument = class {
5203
- constructor(argumentList, index) {
5204
- this.argumentList = argumentList;
5205
- this.index = index;
5206
- this.kind = "indexed-access-argument";
5207
- }
5208
- };
5209
5167
  var ExpressionRole_arrayElement = class {
5210
5168
  constructor(array) {
5211
5169
  this.array = array;
@@ -5284,7 +5242,7 @@ var SyntaxContextFactory = class {
5284
5242
  }
5285
5243
  static isExpressionOrStatementContext(tokenOrKeyword) {
5286
5244
  if (tokenOrKeyword.isToken(57 /* Equals */)) {
5287
- if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
5245
+ if (tokenOrKeyword.parent.kind === 91 /* AssignmentStatement */) {
5288
5246
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
5289
5247
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5290
5248
  }
@@ -5300,24 +5258,24 @@ var SyntaxContextFactory = class {
5300
5258
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.initializer);
5301
5259
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5302
5260
  }
5303
- if (tokenOrKeyword.parent.kind === 142 /* ParameterDeclaration */) {
5261
+ if (tokenOrKeyword.parent.kind === 141 /* ParameterDeclaration */) {
5304
5262
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.defaultValue);
5305
5263
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5306
5264
  }
5307
- if (tokenOrKeyword.parent.kind === 143 /* CallArgument */) {
5265
+ if (tokenOrKeyword.parent.kind === 142 /* CallArgument */) {
5308
5266
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
5309
5267
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5310
5268
  }
5311
- if (tokenOrKeyword.parent.kind === 140 /* VariantDeclaration */) {
5269
+ if (tokenOrKeyword.parent.kind === 139 /* VariantDeclaration */) {
5312
5270
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
5313
5271
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5314
5272
  }
5315
5273
  }
5316
- if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
5274
+ if (tokenOrKeyword.parent.kind === 91 /* AssignmentStatement */) {
5317
5275
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
5318
5276
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5319
5277
  }
5320
- if (tokenOrKeyword.parent.kind === 78 /* PrefixUnaryExpression */) {
5278
+ if (tokenOrKeyword.parent.kind === 77 /* PrefixUnaryExpression */) {
5321
5279
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.operand);
5322
5280
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5323
5281
  }
@@ -5325,11 +5283,11 @@ var SyntaxContextFactory = class {
5325
5283
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
5326
5284
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5327
5285
  }
5328
- if (tokenOrKeyword.isToken(7 /* TextTemplateHead */) && tokenOrKeyword.parent.kind === 82 /* TextTemplateLiteral */) {
5286
+ if (tokenOrKeyword.isToken(7 /* TextTemplateHead */) && tokenOrKeyword.parent.kind === 81 /* TextTemplateLiteral */) {
5329
5287
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.spanList.spans.at(0)?.expression);
5330
5288
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5331
5289
  }
5332
- if (tokenOrKeyword.isToken(8 /* TextTemplatePart */) && tokenOrKeyword.parent.kind === 84 /* TextTemplateSpan */) {
5290
+ if (tokenOrKeyword.isToken(8 /* TextTemplatePart */) && tokenOrKeyword.parent.kind === 83 /* TextTemplateSpan */) {
5333
5291
  let expressionForTargetType;
5334
5292
  const spanList = tokenOrKeyword.parent.parent;
5335
5293
  const spanIndex = spanList.spans.indexOf(tokenOrKeyword.parent);
@@ -5341,18 +5299,18 @@ var SyntaxContextFactory = class {
5341
5299
  isStatementContext: false
5342
5300
  };
5343
5301
  }
5344
- if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */) {
5302
+ if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 93 /* StatementBlock */) {
5345
5303
  return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
5346
5304
  }
5347
- if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 93 /* StatementList */) {
5305
+ if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 92 /* StatementList */) {
5348
5306
  return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
5349
5307
  }
5350
5308
  if (tokenOrKeyword.isToken(44 /* OpenParenthesis */)) {
5351
- if (tokenOrKeyword.parent.kind === 76 /* ParenthesizedExpression */) {
5309
+ if (tokenOrKeyword.parent.kind === 75 /* ParenthesizedExpression */) {
5352
5310
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5353
5311
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5354
5312
  }
5355
- if (tokenOrKeyword.parent.kind === 80 /* ReferenceExpression */) {
5313
+ if (tokenOrKeyword.parent.kind === 79 /* ReferenceExpression */) {
5356
5314
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5357
5315
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5358
5316
  }
@@ -5364,7 +5322,7 @@ var SyntaxContextFactory = class {
5364
5322
  const expressionRole = new ExpressionRole_callArgument(tokenOrKeyword.parent.callArgumentList, 0);
5365
5323
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5366
5324
  }
5367
- if (tokenOrKeyword.parent.kind === 145 /* Tag */) {
5325
+ if (tokenOrKeyword.parent.kind === 144 /* Tag */) {
5368
5326
  const callArgumentList = tokenOrKeyword.parent.callArgumentList;
5369
5327
  if (callArgumentList !== void 0) {
5370
5328
  const expressionRole = new ExpressionRole_callArgument(callArgumentList, 0);
@@ -5372,8 +5330,8 @@ var SyntaxContextFactory = class {
5372
5330
  }
5373
5331
  }
5374
5332
  }
5375
- if (tokenOrKeyword.isToken(45 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 72 /* IndexedAccessExpression */) {
5376
- const expressionRole = new ExpressionRole_indexedAccessArgument(tokenOrKeyword.parent.argumentsList, 0);
5333
+ if (tokenOrKeyword.isToken(45 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 71 /* IndexedAccessExpression */) {
5334
+ const expressionRole = new ExpressionRole_callArgument(tokenOrKeyword.parent.argumentsList, 0);
5377
5335
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5378
5336
  }
5379
5337
  if (tokenOrKeyword.isToken(45 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 61 /* ArrayLiteral */) {
@@ -5395,21 +5353,7 @@ var SyntaxContextFactory = class {
5395
5353
  const expressionRole = new ExpressionRole_callArgument(argumentList, index);
5396
5354
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5397
5355
  }
5398
- if (tokenOrKeyword.parent.kind === 71 /* IndexedAccessArgumentList */) {
5399
- const argumentList = tokenOrKeyword.parent;
5400
- let index = 0;
5401
- for (const element of argumentList.elements) {
5402
- if (element.kind === 0 /* Token */) {
5403
- index++;
5404
- if (element === tokenOrKeyword.value) {
5405
- break;
5406
- }
5407
- }
5408
- }
5409
- const expressionRole = new ExpressionRole_indexedAccessArgument(argumentList, index);
5410
- return { isExpressionContext: { expressionRole }, isStatementContext: false };
5411
- }
5412
- if (tokenOrKeyword.parent.kind === 118 /* MatchExpressionList */) {
5356
+ if (tokenOrKeyword.parent.kind === 117 /* MatchExpressionList */) {
5413
5357
  const expressionRole = new ExpressionRole_matchListElement(tokenOrKeyword.parent.parent.parent.parent);
5414
5358
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5415
5359
  }
@@ -5418,47 +5362,47 @@ var SyntaxContextFactory = class {
5418
5362
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5419
5363
  }
5420
5364
  }
5421
- if (tokenOrKeyword.isKeyword(43 /* Case */) && tokenOrKeyword.parent.kind === 119 /* SwitchStatementCaseClause */) {
5365
+ if (tokenOrKeyword.isKeyword(43 /* Case */) && tokenOrKeyword.parent.kind === 118 /* SwitchStatementCaseClause */) {
5422
5366
  const expressionRole = new ExpressionRole_matchListElement(tokenOrKeyword.parent.parent.parent);
5423
5367
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5424
5368
  }
5425
- if (tokenOrKeyword.isKeyword(14 /* Return */) && tokenOrKeyword.parent.kind === 115 /* ReturnStatement */) {
5369
+ if (tokenOrKeyword.isKeyword(14 /* Return */) && tokenOrKeyword.parent.kind === 114 /* ReturnStatement */) {
5426
5370
  const expressionRole = new ExpressionRole_returnedValue(tokenOrKeyword.parent);
5427
5371
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5428
5372
  }
5429
- if (tokenOrKeyword.isKeyword(42 /* Switch */) && tokenOrKeyword.parent.kind === 117 /* SwitchStatement */) {
5373
+ if (tokenOrKeyword.isKeyword(42 /* Switch */) && tokenOrKeyword.parent.kind === 116 /* SwitchStatement */) {
5430
5374
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5431
5375
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5432
5376
  }
5433
- if (tokenOrKeyword.isKeyword(12 /* If */) && tokenOrKeyword.parent.kind === 108 /* IfStatement */) {
5377
+ if (tokenOrKeyword.isKeyword(12 /* If */) && tokenOrKeyword.parent.kind === 107 /* IfStatement */) {
5434
5378
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5435
5379
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5436
5380
  }
5437
- if (tokenOrKeyword.isKeyword(10 /* ElseIf */) && tokenOrKeyword.parent.kind === 110 /* ElseIfClause */) {
5381
+ if (tokenOrKeyword.isKeyword(10 /* ElseIf */) && tokenOrKeyword.parent.kind === 109 /* ElseIfClause */) {
5438
5382
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5439
5383
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5440
5384
  }
5441
- if (tokenOrKeyword.isKeyword(8 /* From */) && tokenOrKeyword.parent.kind === 107 /* ForStatement */) {
5385
+ if (tokenOrKeyword.isKeyword(8 /* From */) && tokenOrKeyword.parent.kind === 106 /* ForStatement */) {
5442
5386
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.enumeratedExpression);
5443
5387
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5444
5388
  }
5445
- if (tokenOrKeyword.isKeyword(23 /* While */) && tokenOrKeyword.parent.kind === 120 /* WhileStatement */) {
5389
+ if (tokenOrKeyword.isKeyword(23 /* While */) && tokenOrKeyword.parent.kind === 119 /* WhileStatement */) {
5446
5390
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5447
5391
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5448
5392
  }
5449
- if (tokenOrKeyword.isKeyword(25 /* RepeatWhile */) && tokenOrKeyword.parent.kind === 114 /* LoopStatement */) {
5393
+ if (tokenOrKeyword.isKeyword(25 /* RepeatWhile */) && tokenOrKeyword.parent.kind === 113 /* LoopStatement */) {
5450
5394
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5451
5395
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5452
5396
  }
5453
- if (tokenOrKeyword.isKeyword(26 /* Yield */) && tokenOrKeyword.parent.kind === 121 /* YieldStatement */) {
5397
+ if (tokenOrKeyword.isKeyword(26 /* Yield */) && tokenOrKeyword.parent.kind === 120 /* YieldStatement */) {
5454
5398
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5455
5399
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5456
5400
  }
5457
- if (tokenOrKeyword.isKeyword(27 /* When */) && tokenOrKeyword.parent.kind === 77 /* WhenTernaryExpression */) {
5401
+ if (tokenOrKeyword.isKeyword(27 /* When */) && tokenOrKeyword.parent.kind === 76 /* WhenTernaryExpression */) {
5458
5402
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5459
5403
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5460
5404
  }
5461
- if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 77 /* WhenTernaryExpression */) {
5405
+ if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 76 /* WhenTernaryExpression */) {
5462
5406
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.secondExpression);
5463
5407
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5464
5408
  }
@@ -5480,7 +5424,7 @@ var SyntaxContextFactory = class {
5480
5424
  if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 32 /* TypeMemberDeclarationBlock */ && (tokenOrKeyword.parent.parent.kind === 40 /* TypeExtensionDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 33 /* PackageStructuredTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 38 /* PackageVariantTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 22 /* PackageAliasTypeDeclaration */)) {
5481
5425
  return true;
5482
5426
  }
5483
- if (tokenOrKeyword.isToken(20 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 25 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 26 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 27 /* PackageMethodDeclaration */))) {
5427
+ if (tokenOrKeyword.isToken(20 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 21 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 93 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 25 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 26 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 27 /* PackageMethodDeclaration */))) {
5484
5428
  return true;
5485
5429
  }
5486
5430
  if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */) {
@@ -5492,10 +5436,10 @@ var SyntaxContextFactory = class {
5492
5436
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 37 /* PackageVariableSetterDeclaration */)) {
5493
5437
  return true;
5494
5438
  }
5495
- if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 147 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5439
+ if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 146 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5496
5440
  return true;
5497
5441
  }
5498
- if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 147 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5442
+ if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 146 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5499
5443
  return true;
5500
5444
  }
5501
5445
  return false;
@@ -5516,13 +5460,13 @@ var SyntaxContextFactory = class {
5516
5460
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5517
5461
  tokenOrKeyword,
5518
5462
  51 /* TypeDereferencedVariableSetterDeclaration */
5519
- ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* TypeMethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 45 /* TypeConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 46 /* TypeDestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 140 /* VariantDeclaration */)) {
5463
+ ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* TypeMethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 45 /* TypeConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 46 /* TypeDestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 139 /* VariantDeclaration */)) {
5520
5464
  return true;
5521
5465
  }
5522
- if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 147 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5466
+ if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 146 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5523
5467
  return true;
5524
5468
  }
5525
- if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 147 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5469
+ if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 146 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5526
5470
  return true;
5527
5471
  }
5528
5472
  return false;
@@ -5559,7 +5503,7 @@ var SyntaxContextFactory = class {
5559
5503
  return result;
5560
5504
  }
5561
5505
  static isUnqualifiedTypeContext(tokenOrKeyword) {
5562
- if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 156 /* TypeAnnotation */) {
5506
+ if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 155 /* TypeAnnotation */) {
5563
5507
  return { allowsAnonymousTypes: true };
5564
5508
  }
5565
5509
  if ((tokenOrKeyword.isKeyword(4 /* Object */) || tokenOrKeyword.isKeyword(5 /* PlainObject */) || tokenOrKeyword.isKeyword(3 /* Aspect */)) && tokenOrKeyword.parent.kind === 34 /* StructuredTypeDeclarationBody */) {
@@ -5568,22 +5512,22 @@ var SyntaxContextFactory = class {
5568
5512
  if (tokenOrKeyword.isKeyword(15 /* Type */) && (NodeTypeUtils.isPackageTypeDeclaration(tokenOrKeyword.parent) || tokenOrKeyword.parent.kind === 40 /* TypeExtensionDeclaration */)) {
5569
5513
  return { allowsAnonymousTypes: false };
5570
5514
  }
5571
- if (tokenOrKeyword.isToken(36 /* LessThan */) && tokenOrKeyword.parent.kind === 152 /* TypeArgumentClause */) {
5515
+ if (tokenOrKeyword.isToken(36 /* LessThan */) && tokenOrKeyword.parent.kind === 151 /* TypeArgumentClause */) {
5572
5516
  return { allowsAnonymousTypes: true };
5573
5517
  }
5574
- if (tokenOrKeyword.isToken(24 /* Comma */) && (tokenOrKeyword.parent.kind === 30 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 153 /* TypeArgumentList */)) {
5575
- return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 153 /* TypeArgumentList */ };
5518
+ if (tokenOrKeyword.isToken(24 /* Comma */) && (tokenOrKeyword.parent.kind === 30 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 152 /* TypeArgumentList */)) {
5519
+ return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 152 /* TypeArgumentList */ };
5576
5520
  }
5577
- if (tokenOrKeyword.isToken(35 /* HashSign */) && tokenOrKeyword.parent.kind === 145 /* Tag */) {
5521
+ if (tokenOrKeyword.isToken(35 /* HashSign */) && tokenOrKeyword.parent.kind === 144 /* Tag */) {
5578
5522
  return { allowsAnonymousTypes: false };
5579
5523
  }
5580
- if ((tokenOrKeyword.isToken(23 /* Colon */) || tokenOrKeyword.isToken(57 /* Equals */)) && tokenOrKeyword.parent.kind === 141 /* TypeParameterDeclaration */) {
5524
+ if ((tokenOrKeyword.isToken(23 /* Colon */) || tokenOrKeyword.isToken(57 /* Equals */)) && tokenOrKeyword.parent.kind === 140 /* TypeParameterDeclaration */) {
5581
5525
  return { allowsAnonymousTypes: false };
5582
5526
  }
5583
5527
  if (tokenOrKeyword.isToken(57 /* Equals */) && tokenOrKeyword.parent.kind === 22 /* PackageAliasTypeDeclaration */) {
5584
5528
  return { allowsAnonymousTypes: false };
5585
5529
  }
5586
- if (tokenOrKeyword.isKeyword(13 /* Is */) && tokenOrKeyword.parent.kind === 74 /* IsExpression */) {
5530
+ if (tokenOrKeyword.isKeyword(13 /* Is */) && tokenOrKeyword.parent.kind === 73 /* IsExpression */) {
5587
5531
  return { allowsAnonymousTypes: true };
5588
5532
  }
5589
5533
  if (tokenOrKeyword.isKeyword(40 /* As */) && tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
@@ -5603,32 +5547,32 @@ var SyntaxContextFactory = class {
5603
5547
  }
5604
5548
  const packageImport = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5605
5549
  tokenOrKeyword,
5606
- 132 /* PackageImportTranslation */
5550
+ 131 /* PackageImportTranslation */
5607
5551
  );
5608
5552
  if (packageImport !== void 0) {
5609
5553
  return { translationsDeclaration: packageImport.parent.parent };
5610
5554
  }
5611
- const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 137 /* TypeTranslation */);
5555
+ const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 136 /* TypeTranslation */);
5612
5556
  if (type !== void 0) {
5613
5557
  return { translationsDeclaration: type.parent.parent };
5614
5558
  }
5615
5559
  const methodType = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5616
5560
  tokenOrKeyword,
5617
- 131 /* MethodTypeTranslation */
5561
+ 130 /* MethodTypeTranslation */
5618
5562
  );
5619
5563
  if (methodType !== void 0) {
5620
5564
  return { translationsDeclaration: methodType.parent.parent };
5621
5565
  }
5622
5566
  const variable = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5623
5567
  tokenOrKeyword,
5624
- 134 /* PackageVariableTranslation */
5568
+ 133 /* PackageVariableTranslation */
5625
5569
  );
5626
5570
  if (variable !== void 0) {
5627
5571
  return { translationsDeclaration: variable.parent.parent };
5628
5572
  }
5629
5573
  const method = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5630
5574
  tokenOrKeyword,
5631
- 129 /* PackageMethodTranslation */
5575
+ 128 /* PackageMethodTranslation */
5632
5576
  );
5633
5577
  if (method !== void 0) {
5634
5578
  return { translationsDeclaration: method.parent.parent };
@@ -5636,33 +5580,33 @@ var SyntaxContextFactory = class {
5636
5580
  return void 0;
5637
5581
  }
5638
5582
  static isTypeMemberTranslationListContext(tokenOrKeyword) {
5639
- if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 136 /* TypeMemberTranslationList */) {
5583
+ if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 135 /* TypeMemberTranslationList */) {
5640
5584
  return { typeTranslation: tokenOrKeyword.parent.parent };
5641
5585
  }
5642
- if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 137 /* TypeTranslation */) {
5586
+ if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 136 /* TypeTranslation */) {
5643
5587
  return { typeTranslation: tokenOrKeyword.parent };
5644
5588
  }
5645
- const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 126 /* IndexerTranslation */);
5589
+ const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 125 /* IndexerTranslation */);
5646
5590
  if (indexer !== void 0) {
5647
5591
  return { typeTranslation: indexer.parent.parent };
5648
5592
  }
5649
5593
  const constructor = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5650
5594
  tokenOrKeyword,
5651
- 124 /* ConstructorTranslation */
5595
+ 123 /* ConstructorTranslation */
5652
5596
  );
5653
5597
  if (constructor !== void 0) {
5654
5598
  return { typeTranslation: constructor.parent.parent };
5655
5599
  }
5656
5600
  const variableOrVariant = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5657
5601
  tokenOrKeyword,
5658
- 135 /* TypeVariableOrVariantTranslation */
5602
+ 134 /* TypeVariableOrVariantTranslation */
5659
5603
  );
5660
5604
  if (variableOrVariant !== void 0) {
5661
5605
  return { typeTranslation: variableOrVariant.parent.parent };
5662
5606
  }
5663
5607
  const method = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5664
5608
  tokenOrKeyword,
5665
- 130 /* TypeMethodTranslation */
5609
+ 129 /* TypeMethodTranslation */
5666
5610
  );
5667
5611
  if (method !== void 0) {
5668
5612
  return { typeTranslation: method.parent.parent };
@@ -5777,27 +5721,27 @@ var NodeSemanticInfoService = class {
5777
5721
  return this.ofNonKeywordIdentifier(analyzer, tokenOrKeyword.value, options6);
5778
5722
  } else if (tokenOrKeyword.isKeyword(2 /* Autotype */) && tokenOrKeyword.parent.kind === 70 /* AutotypeCallExpression */) {
5779
5723
  return this.ofAutotypeCallExpression(analyzer, tokenOrKeyword.parent, options6);
5780
- } else if (tokenOrKeyword.parent.kind === 78 /* PrefixUnaryExpression */) {
5724
+ } else if (tokenOrKeyword.parent.kind === 77 /* PrefixUnaryExpression */) {
5781
5725
  return this.ofPrefixUnaryExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
5782
5726
  } else if (tokenOrKeyword.parent.kind === 66 /* BinaryExpression */) {
5783
5727
  return this.ofBinaryExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
5784
5728
  } else if (tokenOrKeyword.isToken(19 /* Caret */) && (tokenOrKeyword.parent.kind === 50 /* TypeDereferencedVariableGetterDeclaration */ || tokenOrKeyword.parent.kind === 51 /* TypeDereferencedVariableSetterDeclaration */)) {
5785
5729
  return this.ofDereferenceOperatorDeclaration(analyzer, tokenOrKeyword.parent);
5786
- } else if (tokenOrKeyword.isToken(19 /* Caret */) && tokenOrKeyword.parent.kind === 81 /* DereferenceExpression */) {
5730
+ } else if (tokenOrKeyword.isToken(19 /* Caret */) && tokenOrKeyword.parent.kind === 80 /* DereferenceExpression */) {
5787
5731
  return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
5788
- } else if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
5732
+ } else if (tokenOrKeyword.parent.kind === 91 /* AssignmentStatement */) {
5789
5733
  return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options6);
5790
5734
  } else if (tokenOrKeyword.isKeyword(28 /* Creation */) && tokenOrKeyword.parent.kind === 45 /* TypeConstructorDeclaration */) {
5791
5735
  return this.ofTypeConstructorDeclaration(analyzer, tokenOrKeyword.parent);
5792
- } else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 91 /* DefaultMatchExpression */) {
5736
+ } else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 90 /* DefaultMatchExpression */) {
5793
5737
  return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
5794
- } else if (tokenOrKeyword.isKeyword(4 /* Object */) && tokenOrKeyword.parent.kind === 87 /* ObjectExpression */) {
5738
+ } else if (tokenOrKeyword.isKeyword(4 /* Object */) && tokenOrKeyword.parent.kind === 86 /* ObjectExpression */) {
5795
5739
  return this.ofObjectExpression(analyzer, tokenOrKeyword.parent, options6);
5796
- } else if (tokenOrKeyword.isKeyword(55 /* Base */) && tokenOrKeyword.parent.kind === 88 /* BaseExpression */) {
5740
+ } else if (tokenOrKeyword.isKeyword(55 /* Base */) && tokenOrKeyword.parent.kind === 87 /* BaseExpression */) {
5797
5741
  return this.ofBaseExpression(analyzer, tokenOrKeyword.parent, options6);
5798
5742
  } else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 49 /* TypeIndexerParameterClause */) {
5799
5743
  return this.ofTypeIndexerDeclaration(analyzer, tokenOrKeyword.parent.parent);
5800
- } else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 72 /* IndexedAccessExpression */) {
5744
+ } else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 71 /* IndexedAccessExpression */) {
5801
5745
  return this.ofIndexedAccessExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
5802
5746
  }
5803
5747
  return void 0;
@@ -5810,11 +5754,11 @@ var NodeSemanticInfoService = class {
5810
5754
  let result;
5811
5755
  const parent = node.parent;
5812
5756
  switch (parent.kind) {
5813
- case 127 /* TranslationTypeParameterList */:
5757
+ case 126 /* TranslationTypeParameterList */:
5814
5758
  break;
5815
- case 122 /* TranslationParameterList */:
5759
+ case 121 /* TranslationParameterList */:
5816
5760
  break;
5817
- case 143 /* CallArgument */: {
5761
+ case 142 /* CallArgument */: {
5818
5762
  const respectiveParameter = analyzer.getRespectiveParameter(parent);
5819
5763
  if (respectiveParameter !== void 0) {
5820
5764
  const target = new SimpleWithLocalization(
@@ -5831,7 +5775,7 @@ var NodeSemanticInfoService = class {
5831
5775
  case 60 /* EnumerationVariableDeclaration */:
5832
5776
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofEnumerationVariableDeclaration(parent));
5833
5777
  break;
5834
- case 101 /* ErrorVariableDeclaration */:
5778
+ case 100 /* ErrorVariableDeclaration */:
5835
5779
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofErrorVariableDeclaration(parent));
5836
5780
  break;
5837
5781
  case 22 /* PackageAliasTypeDeclaration */:
@@ -5852,7 +5796,7 @@ var NodeSemanticInfoService = class {
5852
5796
  case 38 /* PackageVariantTypeDeclaration */:
5853
5797
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageVariantTypeDeclaration(parent));
5854
5798
  break;
5855
- case 89 /* IdentifierExpression */:
5799
+ case 88 /* IdentifierExpression */:
5856
5800
  result = this.ofIdentifierExpression(analyzer, parent, options6);
5857
5801
  break;
5858
5802
  case 58 /* NestedMethodDeclaration */:
@@ -5861,10 +5805,10 @@ var NodeSemanticInfoService = class {
5861
5805
  case 59 /* LocalVariableDeclaration */:
5862
5806
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofLocalVariableDeclaration(parent));
5863
5807
  break;
5864
- case 133 /* QualifiedName */:
5808
+ case 132 /* QualifiedName */:
5865
5809
  result = this.ofQualifiedNameQualifier(analyzer, parent, node, options6);
5866
5810
  break;
5867
- case 134 /* PackageVariableTranslation */: {
5811
+ case 133 /* PackageVariableTranslation */: {
5868
5812
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5869
5813
  const getTargetResult = translationPackage?.getPackageVariableTranslationTarget(parent);
5870
5814
  if (translationPackage !== void 0 && getTargetResult?.target !== void 0) {
@@ -5884,7 +5828,7 @@ var NodeSemanticInfoService = class {
5884
5828
  }
5885
5829
  break;
5886
5830
  }
5887
- case 135 /* TypeVariableOrVariantTranslation */: {
5831
+ case 134 /* TypeVariableOrVariantTranslation */: {
5888
5832
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5889
5833
  const getTargetsResult = translationPackage?.getTypeVariableOrVariantTranslationTargets(parent);
5890
5834
  if (translationPackage !== void 0 && isNonEmptyArray(getTargetsResult?.targets)) {
@@ -5908,7 +5852,7 @@ var NodeSemanticInfoService = class {
5908
5852
  }
5909
5853
  break;
5910
5854
  }
5911
- case 129 /* PackageMethodTranslation */: {
5855
+ case 128 /* PackageMethodTranslation */: {
5912
5856
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5913
5857
  const getTargetsResult = translationPackage?.getPackageMethodTranslationTargets(parent);
5914
5858
  if (translationPackage !== void 0 && isNonEmptyArray(getTargetsResult?.targets)) {
@@ -5932,7 +5876,7 @@ var NodeSemanticInfoService = class {
5932
5876
  }
5933
5877
  break;
5934
5878
  }
5935
- case 130 /* TypeMethodTranslation */: {
5879
+ case 129 /* TypeMethodTranslation */: {
5936
5880
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5937
5881
  const getTargetsResult = translationPackage?.getTypeMethodTranslationTargets(parent);
5938
5882
  if (translationPackage !== void 0 && isNonEmptyArray(getTargetsResult?.targets)) {
@@ -5956,7 +5900,7 @@ var NodeSemanticInfoService = class {
5956
5900
  }
5957
5901
  break;
5958
5902
  }
5959
- case 137 /* TypeTranslation */: {
5903
+ case 136 /* TypeTranslation */: {
5960
5904
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5961
5905
  const getTargetResult = translationPackage?.getTypeTranslationTarget(parent);
5962
5906
  if (translationPackage !== void 0 && getTargetResult?.target !== void 0) {
@@ -5976,7 +5920,7 @@ var NodeSemanticInfoService = class {
5976
5920
  }
5977
5921
  break;
5978
5922
  }
5979
- case 131 /* MethodTypeTranslation */: {
5923
+ case 130 /* MethodTypeTranslation */: {
5980
5924
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5981
5925
  const getTargetResult = translationPackage?.getMethodTypeTranslationTarget(parent);
5982
5926
  if (translationPackage !== void 0 && getTargetResult?.target !== void 0) {
@@ -5996,7 +5940,7 @@ var NodeSemanticInfoService = class {
5996
5940
  }
5997
5941
  break;
5998
5942
  }
5999
- case 142 /* ParameterDeclaration */:
5943
+ case 141 /* ParameterDeclaration */:
6000
5944
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofParameterDeclaration(parent));
6001
5945
  break;
6002
5946
  case 8 /* PackageImport */:
@@ -6005,7 +5949,7 @@ var NodeSemanticInfoService = class {
6005
5949
  case 9 /* PackagePath */:
6006
5950
  result = void 0;
6007
5951
  break;
6008
- case 79 /* PropertyAccessExpression */:
5952
+ case 78 /* PropertyAccessExpression */:
6009
5953
  result = this.ofProperty(analyzer, parent, options6);
6010
5954
  break;
6011
5955
  case 52 /* TypeMethodDeclaration */:
@@ -6017,10 +5961,10 @@ var NodeSemanticInfoService = class {
6017
5961
  case 54 /* TypeVariableDeclaration */:
6018
5962
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTypeVariableDeclaration(parent));
6019
5963
  break;
6020
- case 141 /* TypeParameterDeclaration */:
5964
+ case 140 /* TypeParameterDeclaration */:
6021
5965
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTypeParameterDeclaration(parent));
6022
5966
  break;
6023
- case 140 /* VariantDeclaration */:
5967
+ case 139 /* VariantDeclaration */:
6024
5968
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofVariantDeclaration(parent));
6025
5969
  break;
6026
5970
  case 36 /* PackageVariableGetterDeclaration */:
@@ -6031,7 +5975,7 @@ var NodeSemanticInfoService = class {
6031
5975
  case 56 /* TypeVariableSetterDeclaration */:
6032
5976
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofComputedTypeVariableDeclaration(parent));
6033
5977
  break;
6034
- case 151 /* SetterParameterDeclaration */:
5978
+ case 150 /* SetterParameterDeclaration */:
6035
5979
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofSetterParameterDeclaration(parent));
6036
5980
  break;
6037
5981
  case 3 /* Keyword */:
@@ -6185,7 +6129,7 @@ var NodeSemanticInfoService = class {
6185
6129
  return result;
6186
6130
  }
6187
6131
  case 42 /* ExtendedTypeClause */:
6188
- case 132 /* PackageImportTranslation */:
6132
+ case 131 /* PackageImportTranslation */:
6189
6133
  return void 0;
6190
6134
  default:
6191
6135
  Debug.never(node.parent);
@@ -6312,19 +6256,28 @@ var NodeSemanticInfoService = class {
6312
6256
  return new DefinitionNodeSemanticInfo(entity);
6313
6257
  }
6314
6258
  static ofIndexedAccessExpressionOperator(analyzer, node, options6) {
6315
- const meaning = analyzer.getIndexedAccessExpressionMeaning(node);
6259
+ const meaning = analyzer.resolveIndexedAccessExpression(node).meaning;
6316
6260
  if (meaning.kind === "resolved") {
6317
- const target = new SimpleWithLocalization(
6318
- new TypeIndexerReferenceTarget(meaning.indexer.value, meaning.access.kind),
6319
- meaning.indexer.localization
6320
- );
6321
- let result = new ReferenceNodeSemanticInfo([target], false);
6322
- if (options6.includeBetterReferenceTargets) {
6261
+ let result;
6262
+ if (isNonEmptyArray(meaning.suitableIndexers)) {
6263
+ result = createIndexersReference(
6264
+ meaning.suitableIndexers,
6265
+ meaning.accessKind,
6266
+ meaning.suitableIndexers.length > 1
6267
+ );
6268
+ } else if (isNonEmptyArray(meaning.candidates)) {
6269
+ result = createIndexersReference(meaning.candidates, meaning.accessKind, true);
6270
+ }
6271
+ if (result !== void 0 && options6.includeBetterReferenceTargets) {
6323
6272
  result = this.getBetterReferenceTargetsOrPreserve(result);
6324
6273
  }
6325
6274
  return result;
6326
6275
  }
6327
6276
  return void 0;
6277
+ function createIndexersReference(indexers, accessKind, isAmbiguous) {
6278
+ const targets = indexers.map((i) => new SimpleWithLocalization(new TypeIndexerReferenceTarget(i.value, accessKind), i.localization));
6279
+ return new ReferenceNodeSemanticInfo(createNonEmptyArray(targets), isAmbiguous);
6280
+ }
6328
6281
  }
6329
6282
  static ofAssignmentStatementOperator(analyzer, node, options6) {
6330
6283
  const operatorKind = analyzer.getBinaryOperatorKindIfCompoundAssignmentOperator(node.operator);
@@ -6499,7 +6452,7 @@ var NodeSemanticInfoService = class {
6499
6452
  }
6500
6453
  static ofPackageNameSegmentAccess(analyzer, packageTreeNode, node) {
6501
6454
  let parent = getParentSkippingParenthesizedExpressions(node);
6502
- while (parent.kind === 79 /* PropertyAccessExpression */) {
6455
+ while (parent.kind === 78 /* PropertyAccessExpression */) {
6503
6456
  const meaning = analyzer.resolvePropertyAccessExpression(parent).meaning;
6504
6457
  if (meaning.kind === "package-name-segment-access") {
6505
6458
  packageTreeNode = meaning.packageTreeNode;
@@ -6540,7 +6493,7 @@ var NodeSemanticInfoService = class {
6540
6493
  let parentCallExpression;
6541
6494
  if (parent.kind === 69 /* CallExpression */) {
6542
6495
  parentCallExpression = parent;
6543
- } else if (parent.kind === 90 /* GenericSpecializationExpression */) {
6496
+ } else if (parent.kind === 89 /* GenericSpecializationExpression */) {
6544
6497
  const grandParent = getParentSkippingParenthesizedExpressions(parent);
6545
6498
  if (grandParent.kind === 69 /* CallExpression */) {
6546
6499
  parentCallExpression = grandParent;
@@ -6792,7 +6745,7 @@ function getEntitySourceLocations(analyzer, entity) {
6792
6745
  case 18 /* AnonymousStructuredTypeDeclaration */:
6793
6746
  case 19 /* AnonymousVariantTypeDeclaration */:
6794
6747
  case 67 /* MethodBlockLiteral */:
6795
- case 75 /* MethodLiteral */:
6748
+ case 74 /* MethodLiteral */:
6796
6749
  range = node.rangeWithoutTrivia;
6797
6750
  break;
6798
6751
  case 22 /* PackageAliasTypeDeclaration */:
@@ -6802,8 +6755,8 @@ function getEntitySourceLocations(analyzer, entity) {
6802
6755
  case 38 /* PackageVariantTypeDeclaration */:
6803
6756
  case 58 /* NestedMethodDeclaration */:
6804
6757
  case 52 /* TypeMethodDeclaration */:
6805
- case 141 /* TypeParameterDeclaration */:
6806
- case 140 /* VariantDeclaration */:
6758
+ case 140 /* TypeParameterDeclaration */:
6759
+ case 139 /* VariantDeclaration */:
6807
6760
  case 53 /* OperatorDeclaration */:
6808
6761
  range = node.name.rangeWithoutTrivia;
6809
6762
  break;
@@ -7092,7 +7045,7 @@ var ReferencesService = class {
7092
7045
  result.push(new Reference(sourceFile2, node.autotypeKeyword.rangeWithoutTrivia, referenceKind));
7093
7046
  }
7094
7047
  }
7095
- if (node.kind === 78 /* PrefixUnaryExpression */ && restrictions.canBePrefixUnaryOperator) {
7048
+ if (node.kind === 77 /* PrefixUnaryExpression */ && restrictions.canBePrefixUnaryOperator) {
7096
7049
  const semanticInfo = NodeSemanticInfoService.ofPrefixUnaryExpressionOperator(
7097
7050
  analyzer,
7098
7051
  node,
@@ -7136,7 +7089,7 @@ var ReferencesService = class {
7136
7089
  result.push(new Reference(sourceFile2, node.caretToken.rangeWithoutTrivia, referenceKind));
7137
7090
  }
7138
7091
  }
7139
- if (node.kind === 81 /* DereferenceExpression */ && restrictions.canBeDereferenceOperator) {
7092
+ if (node.kind === 80 /* DereferenceExpression */ && restrictions.canBeDereferenceOperator) {
7140
7093
  const semanticInfo = NodeSemanticInfoService.ofDereferenceExpressionOperator(
7141
7094
  analyzer,
7142
7095
  node,
@@ -7152,7 +7105,7 @@ var ReferencesService = class {
7152
7105
  result.push(new Reference(sourceFile2, node.caretToken.rangeWithoutTrivia, referenceKind));
7153
7106
  }
7154
7107
  }
7155
- if (node.kind === 92 /* AssignmentStatement */ && restrictions.canBeAssignmentStatementOperator) {
7108
+ if (node.kind === 91 /* AssignmentStatement */ && restrictions.canBeAssignmentStatementOperator) {
7156
7109
  const semanticInfo = NodeSemanticInfoService.ofAssignmentStatementOperator(
7157
7110
  analyzer,
7158
7111
  node,
@@ -7180,7 +7133,7 @@ var ReferencesService = class {
7180
7133
  result.push(new Reference(sourceFile2, node.creationKeyword.rangeWithoutTrivia, referenceKind));
7181
7134
  }
7182
7135
  }
7183
- if (node.kind === 87 /* ObjectExpression */ && restrictions.canBeObjectExpression) {
7136
+ if (node.kind === 86 /* ObjectExpression */ && restrictions.canBeObjectExpression) {
7184
7137
  const semanticInfo = NodeSemanticInfoService.ofObjectExpression(analyzer, node, semanticInfoOptions);
7185
7138
  const referenceKind = this.ifReferenceToDefinitionThenKind(
7186
7139
  definition,
@@ -7192,7 +7145,7 @@ var ReferencesService = class {
7192
7145
  result.push(new Reference(sourceFile2, node.keyword.rangeWithoutTrivia, referenceKind));
7193
7146
  }
7194
7147
  }
7195
- if (node.kind === 88 /* BaseExpression */ && restrictions.canBeBaseExpression) {
7148
+ if (node.kind === 87 /* BaseExpression */ && restrictions.canBeBaseExpression) {
7196
7149
  const semanticInfo = NodeSemanticInfoService.ofBaseExpression(analyzer, node, semanticInfoOptions);
7197
7150
  const referenceKind = this.ifReferenceToDefinitionThenKind(
7198
7151
  definition,
@@ -7216,7 +7169,7 @@ var ReferencesService = class {
7216
7169
  result.push(new Reference(sourceFile2, node.parameterClause.rangeWithoutTrivia, referenceKind));
7217
7170
  }
7218
7171
  }
7219
- if (node.kind === 72 /* IndexedAccessExpression */ && restrictions.canBeIndexer) {
7172
+ if (node.kind === 71 /* IndexedAccessExpression */ && restrictions.canBeIndexer) {
7220
7173
  const semanticInfo = NodeSemanticInfoService.ofIndexedAccessExpressionOperator(
7221
7174
  analyzer,
7222
7175
  node,
@@ -7589,9 +7542,9 @@ var EvaluatableExpressionService = class {
7589
7542
  getEvaluatableExpressionForIdentifier(node) {
7590
7543
  const parent = node.parent;
7591
7544
  switch (parent.kind) {
7592
- case 89 /* IdentifierExpression */:
7545
+ case 88 /* IdentifierExpression */:
7593
7546
  return parent;
7594
- case 79 /* PropertyAccessExpression */:
7547
+ case 78 /* PropertyAccessExpression */:
7595
7548
  if (this.isEvaluatableReceiver(parent.expression)) {
7596
7549
  return parent;
7597
7550
  }
@@ -7612,9 +7565,9 @@ var EvaluatableExpressionService = class {
7612
7565
  }
7613
7566
  isEvaluatableReceiver(expression) {
7614
7567
  switch (expression.kind) {
7615
- case 89 /* IdentifierExpression */:
7568
+ case 88 /* IdentifierExpression */:
7616
7569
  return true;
7617
- case 79 /* PropertyAccessExpression */:
7570
+ case 78 /* PropertyAccessExpression */:
7618
7571
  return this.isEvaluatableReceiver(expression.expression);
7619
7572
  default:
7620
7573
  return false;
@@ -7640,17 +7593,17 @@ var EvaluatableExpressionService = class {
7640
7593
  return { nameIdentifier: node.name };
7641
7594
  case 59 /* LocalVariableDeclaration */:
7642
7595
  return { nameIdentifier: node.name };
7643
- case 142 /* ParameterDeclaration */:
7596
+ case 141 /* ParameterDeclaration */:
7644
7597
  return { nameIdentifier: node.name };
7645
7598
  case 52 /* TypeMethodDeclaration */:
7646
7599
  return { nameIdentifier: node.name };
7647
7600
  case 54 /* TypeVariableDeclaration */:
7648
7601
  return { nameIdentifier: node.name };
7649
- case 141 /* TypeParameterDeclaration */:
7602
+ case 140 /* TypeParameterDeclaration */:
7650
7603
  return { nameIdentifier: node.name };
7651
- case 140 /* VariantDeclaration */:
7604
+ case 139 /* VariantDeclaration */:
7652
7605
  return { nameIdentifier: node.name };
7653
- case 101 /* ErrorVariableDeclaration */:
7606
+ case 100 /* ErrorVariableDeclaration */:
7654
7607
  return { nameIdentifier: node.name };
7655
7608
  default:
7656
7609
  return void 0;
@@ -8063,7 +8016,7 @@ var SourceFileItemsService = class {
8063
8016
  );
8064
8017
  break;
8065
8018
  }
8066
- case 140 /* VariantDeclaration */: {
8019
+ case 139 /* VariantDeclaration */: {
8067
8020
  result.push(
8068
8021
  this.createItem(
8069
8022
  9 /* Variant */,
@@ -8075,7 +8028,7 @@ var SourceFileItemsService = class {
8075
8028
  );
8076
8029
  break;
8077
8030
  }
8078
- case 141 /* TypeParameterDeclaration */: {
8031
+ case 140 /* TypeParameterDeclaration */: {
8079
8032
  result.push(
8080
8033
  this.createItem(
8081
8034
  18 /* TypeParameter */,
@@ -8307,7 +8260,7 @@ var SelectionRangeService = class {
8307
8260
  if (!this.nodeShouldBeSkipped(child) && !child.rangeWithoutTrivia.equals(result.range)) {
8308
8261
  result = new SelectionRange(child.rangeWithoutTrivia, result);
8309
8262
  }
8310
- if (child.kind === 0 /* Token */ && (child.tokenKind === 6 /* TextLiteral */ || child.tokenKind === 7 /* TextTemplateHead */ || child.tokenKind === 8 /* TextTemplatePart */ || child.tokenKind === 9 /* TextTemplateTail */ || child.tokenKind === 5 /* CharLiteral */) || child.kind === 82 /* TextTemplateLiteral */) {
8263
+ if (child.kind === 0 /* Token */ && (child.tokenKind === 6 /* TextLiteral */ || child.tokenKind === 7 /* TextTemplateHead */ || child.tokenKind === 8 /* TextTemplatePart */ || child.tokenKind === 9 /* TextTemplateTail */ || child.tokenKind === 5 /* CharLiteral */) || child.kind === 81 /* TextTemplateLiteral */) {
8311
8264
  const textContentStart = child.rangeWithoutTrivia.start + 1;
8312
8265
  const textContentEnd = child.rangeWithoutTrivia.end - 1;
8313
8266
  if (offset >= textContentStart && offset < textContentEnd) {
@@ -8338,13 +8291,13 @@ var SelectionRangeService = class {
8338
8291
  }
8339
8292
  }
8340
8293
  switch (node.kind) {
8341
- case 156 /* TypeAnnotation */:
8294
+ case 155 /* TypeAnnotation */:
8342
8295
  case 34 /* StructuredTypeDeclarationBody */:
8343
8296
  case 39 /* VariantTypeDeclarationBody */:
8344
8297
  case 23 /* AliasTypeDeclarationBody */:
8345
8298
  case 29 /* MethodTypeDeclarationBody */:
8346
- case 84 /* TextTemplateSpan */:
8347
- case 83 /* TextTemplateSpanList */:
8299
+ case 83 /* TextTemplateSpan */:
8300
+ case 82 /* TextTemplateSpanList */:
8348
8301
  return true;
8349
8302
  default:
8350
8303
  return false;
@@ -8382,7 +8335,7 @@ var SemanticTokensService = class {
8382
8335
  controller.stopChildrenTraverse();
8383
8336
  return;
8384
8337
  }
8385
- if (node.kind === 89 /* IdentifierExpression */) {
8338
+ if (node.kind === 88 /* IdentifierExpression */) {
8386
8339
  const meaning = analyzer.resolveIdentifierExpression(node).meaning;
8387
8340
  if (meaning.kind === "variable-access") {
8388
8341
  const variable = meaning.variable.value.getEntity();
@@ -8439,7 +8392,7 @@ var SemanticTokensService = class {
8439
8392
  ));
8440
8393
  }
8441
8394
  }
8442
- if (node.kind === 79 /* PropertyAccessExpression */) {
8395
+ if (node.kind === 78 /* PropertyAccessExpression */) {
8443
8396
  const meaning = analyzer.resolvePropertyAccessExpression(node).meaning;
8444
8397
  if (meaning.kind === "variant-access") {
8445
8398
  result.push(
@@ -8480,7 +8433,7 @@ var SemanticTokensService = class {
8480
8433
  ));
8481
8434
  }
8482
8435
  }
8483
- if (node.kind === 140 /* VariantDeclaration */) {
8436
+ if (node.kind === 139 /* VariantDeclaration */) {
8484
8437
  result.push(
8485
8438
  new SemanticToken(
8486
8439
  node.name.rangeWithoutTrivia,
@@ -8664,7 +8617,7 @@ var TypeParameterSignatureHelpProvider = class {
8664
8617
  }
8665
8618
  let node = token.parent;
8666
8619
  while (node !== void 0) {
8667
- if (node.kind === 152 /* TypeArgumentClause */ && this._offset >= node.lessThanToken.rangeWithoutTrivia.end && (node.greaterThanToken.rangeWithoutTrivia.isEmpty || this._offset <= node.greaterThanToken.rangeWithoutTrivia.start)) {
8620
+ if (node.kind === 151 /* TypeArgumentClause */ && this._offset >= node.lessThanToken.rangeWithoutTrivia.end && (node.greaterThanToken.rangeWithoutTrivia.isEmpty || this._offset <= node.greaterThanToken.rangeWithoutTrivia.start)) {
8668
8621
  const argumentIndex = this.getArgumentIndex(node.typeArgumentList, this._offset);
8669
8622
  const argumentCount = this.countArguments(node.typeArgumentList);
8670
8623
  return new NodeWithTypeArgumentsInfo(node.parent, argumentIndex, argumentCount);
@@ -8709,7 +8662,7 @@ var TypeParameterSignatureHelpProvider = class {
8709
8662
  switch (node.kind) {
8710
8663
  case 10 /* NamedTypeSpecifier */:
8711
8664
  return this.getSignaturesForNamedTypeSpecifier(node);
8712
- case 90 /* GenericSpecializationExpression */:
8665
+ case 89 /* GenericSpecializationExpression */:
8713
8666
  return this.getSignaturesForGenericSpecializationExpression(node);
8714
8667
  default:
8715
8668
  Debug.never(node);
@@ -8727,7 +8680,7 @@ var TypeParameterSignatureHelpProvider = class {
8727
8680
  }
8728
8681
  getSignaturesForGenericSpecializationExpression(node) {
8729
8682
  const expression = unwrapParenthesizedExpressions(node.expression);
8730
- if (expression.kind === 89 /* IdentifierExpression */) {
8683
+ if (expression.kind === 88 /* IdentifierExpression */) {
8731
8684
  const meaning = this._analyzer.resolveIdentifierExpression(expression).meaning;
8732
8685
  if (meaning.kind === "method-access") {
8733
8686
  return Query.from(meaning.candidates).mapAndFilter((o) => {
@@ -8742,7 +8695,7 @@ var TypeParameterSignatureHelpProvider = class {
8742
8695
  }
8743
8696
  return void 0;
8744
8697
  }
8745
- if (expression.kind === 79 /* PropertyAccessExpression */) {
8698
+ if (expression.kind === 78 /* PropertyAccessExpression */) {
8746
8699
  const meaning = this._analyzer.resolvePropertyAccessExpression(expression).meaning;
8747
8700
  let accessedMethods;
8748
8701
  if (meaning.kind === "instance-method-access") {
@@ -9011,7 +8964,7 @@ var ValueParametersSignatureHelpProvider = class {
9011
8964
  }
9012
8965
  break;
9013
8966
  }
9014
- case 72 /* IndexedAccessExpression */: {
8967
+ case 71 /* IndexedAccessExpression */: {
9015
8968
  if (this._offset >= node.openSquareBracketToken.rangeWithoutTrivia.end && (node.closeSquareBracketToken.rangeWithoutTrivia.isEmpty || this._offset <= node.closeSquareBracketToken.rangeWithoutTrivia.start)) {
9016
8969
  const valueArguments = ValueArgumentFactory.createValueArgumentsOfIndexedAccessExpression(node);
9017
8970
  const argumentIndex = this.getArgumentIndexInList(node.argumentsList.elements, this._offset);
@@ -9019,7 +8972,7 @@ var ValueParametersSignatureHelpProvider = class {
9019
8972
  }
9020
8973
  break;
9021
8974
  }
9022
- case 145 /* Tag */: {
8975
+ case 144 /* Tag */: {
9023
8976
  if (node.openParenthesisToken !== void 0 && this._offset >= node.openParenthesisToken.rangeWithoutTrivia.end && node.callArgumentList !== void 0 && (node.closeParenthesisToken === void 0 || node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this._offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9024
8977
  const argumentIndex = this.getArgumentIndexInList(node.callArgumentList.elements, this._offset);
9025
8978
  const valueArguments = ValueArgumentFactory.createValueArgumentsOfTag(node);
@@ -9478,7 +9431,38 @@ var CompilationController = class extends ObservableObject2 {
9478
9431
  );
9479
9432
  const changeKind = checkTsInteropInputsChanged(newTsProgramLoaderInputs, this._tsProgramLoaderInputs);
9480
9433
  if (changeKind === 1 /* DependenciesOrRootUri */) {
9481
- this._tsInteropInputs = createNewTsInteropInputs(newTsProgramLoaderInputs, this.config.tsLibrariesProvider);
9434
+ let tsInteropInputs;
9435
+ let tsInteropInputsKey;
9436
+ if (this.config.tsInteropInputsCache !== void 0) {
9437
+ const cachedInputsInfo = this.config.tsInteropInputsCache.getTsInteropInputs(
9438
+ newTsProgramLoaderInputs,
9439
+ this.config.tsLibrariesProvider
9440
+ );
9441
+ if (cachedInputsInfo !== void 0) {
9442
+ tsInteropInputs = cachedInputsInfo.inputs;
9443
+ tsInteropInputsKey = cachedInputsInfo.key;
9444
+ }
9445
+ }
9446
+ if (tsInteropInputs === void 0) {
9447
+ tsInteropInputs = createNewTsInteropInputs(newTsProgramLoaderInputs, this.config.tsLibrariesProvider);
9448
+ if (this.config.tsInteropInputsCache !== void 0) {
9449
+ const cachedInputsInfo = this.config.tsInteropInputsCache.getOrAddTsInteropInputs(
9450
+ newTsProgramLoaderInputs,
9451
+ this.config.tsLibrariesProvider,
9452
+ tsInteropInputs
9453
+ );
9454
+ tsInteropInputs = cachedInputsInfo.inputs;
9455
+ tsInteropInputsKey = cachedInputsInfo.key;
9456
+ }
9457
+ }
9458
+ this._tsInteropInputs = tsInteropInputs;
9459
+ if (this.config.tsInteropInputsCache !== void 0) {
9460
+ const previousTsInteropInputsKey = this._tsInteropInputsKey;
9461
+ this._tsInteropInputsKey = tsInteropInputsKey;
9462
+ if (previousTsInteropInputsKey !== void 0 && previousTsInteropInputsKey !== tsInteropInputsKey) {
9463
+ this.config.tsInteropInputsCache.removeTsInteropInputs(previousTsInteropInputsKey);
9464
+ }
9465
+ }
9482
9466
  }
9483
9467
  this._tsProgramLoaderInputs = newTsProgramLoaderInputs;
9484
9468
  function checkTsInteropInputsChanged(newInputs, oldInputs) {
@@ -9759,6 +9743,9 @@ __decorateClass([
9759
9743
  __decorateClass([
9760
9744
  unobservable2
9761
9745
  ], CompilationController.prototype, "_tsInteropInputs", 2);
9746
+ __decorateClass([
9747
+ unobservable2
9748
+ ], CompilationController.prototype, "_tsInteropInputsKey", 2);
9762
9749
  __decorateClass([
9763
9750
  unobservable2
9764
9751
  ], CompilationController.prototype, "_tsProgramLoaderInputs", 2);
@@ -10125,6 +10112,56 @@ var ConfigurationDirectory = class {
10125
10112
  this.packageUri = packageUri;
10126
10113
  }
10127
10114
  };
10115
+ var TsInteropInputsCache = class {
10116
+ constructor() {
10117
+ this._inputsByKey = /* @__PURE__ */ new Map();
10118
+ }
10119
+ getTsInteropInputs(tsProgramLoaderInputs, librariesProvider) {
10120
+ const key = this.createKey(tsProgramLoaderInputs, librariesProvider);
10121
+ const inputsInfo = this._inputsByKey.get(key);
10122
+ if (inputsInfo === void 0) {
10123
+ return void 0;
10124
+ }
10125
+ inputsInfo.referenceCount++;
10126
+ return { inputs: inputsInfo.inputs, key };
10127
+ }
10128
+ getOrAddTsInteropInputs(tsProgramLoaderInputs, librariesProvider, inputs) {
10129
+ const key = this.createKey(tsProgramLoaderInputs, librariesProvider);
10130
+ let resultInputs;
10131
+ const resultInputsInfo = this._inputsByKey.get(key);
10132
+ if (resultInputsInfo === void 0) {
10133
+ this._inputsByKey.set(key, { inputs, referenceCount: 1 });
10134
+ resultInputs = inputs;
10135
+ } else {
10136
+ resultInputsInfo.referenceCount++;
10137
+ resultInputs = resultInputsInfo.inputs;
10138
+ }
10139
+ return { inputs: resultInputs, key };
10140
+ }
10141
+ removeTsInteropInputs(key) {
10142
+ const inputsInfo = this._inputsByKey.get(key);
10143
+ if (inputsInfo !== void 0) {
10144
+ inputsInfo.referenceCount--;
10145
+ if (inputsInfo.referenceCount <= 0) {
10146
+ this._inputsByKey.delete(key);
10147
+ }
10148
+ }
10149
+ }
10150
+ // Ключ состоит из имён файлов стандартных библиотек, npm пакетов, модулей, а также путей ко всем доступным
10151
+ // папкам node_modules.
10152
+ createKey(tsProgramLoaderInputs, librariesProvider) {
10153
+ const nodeModulesUris = new Array();
10154
+ let currentDirectoryUri = tsProgramLoaderInputs.tsProjectUri;
10155
+ while (currentDirectoryUri !== void 0) {
10156
+ const nodeModulesUri = currentDirectoryUri.append("node_modules");
10157
+ if (librariesProvider.directoryExistsSync(nodeModulesUri)) {
10158
+ nodeModulesUris.push(nodeModulesUri);
10159
+ }
10160
+ currentDirectoryUri = currentDirectoryUri.parentUri();
10161
+ }
10162
+ return tsProgramLoaderInputs.orderedStandardLibraryNames.join(",") + ";" + tsProgramLoaderInputs.orderedPackageNames.join(",") + ";" + tsProgramLoaderInputs.orderedModuleNames.join(",") + ";" + nodeModulesUris.map((u) => u.toString()).join(",");
10163
+ }
10164
+ };
10128
10165
 
10129
10166
  // source/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.ts
10130
10167
  import {
@@ -11141,6 +11178,7 @@ var _Workspace = class _Workspace extends ObservableObject6 {
11141
11178
  this._controllersWithOpenedFiles = new ObservableMap5();
11142
11179
  this._atLeastOneFileOfCompilationHasBeenOpened = false;
11143
11180
  this._standardPackageContents = new Cached();
11181
+ this._tsInteropInputsCache = new TsInteropInputsCache();
11144
11182
  this._config = config;
11145
11183
  this._files = new WorkspaceFiles(config.fileSystemTreeProvider);
11146
11184
  }
@@ -11359,7 +11397,8 @@ var _Workspace = class _Workspace extends ObservableObject6 {
11359
11397
  standardPackagesUri: this._config.standardPackagesUri,
11360
11398
  showErrorMessage: this._config.showErrorMessage,
11361
11399
  builtInStandardPackagesUri: this._config.builtInStandardPackagesUri,
11362
- additionalPackageContents: this._config.additionalPackageContents
11400
+ additionalPackageContents: this._config.additionalPackageContents,
11401
+ tsInteropInputsCache: this._tsInteropInputsCache
11363
11402
  };
11364
11403
  return new CompilationController(config);
11365
11404
  }
@@ -11417,6 +11456,9 @@ __decorateClass([
11417
11456
  __decorateClass([
11418
11457
  unobservable6
11419
11458
  ], _Workspace.prototype, "_standardPackageContents", 2);
11459
+ __decorateClass([
11460
+ unobservable6
11461
+ ], _Workspace.prototype, "_tsInteropInputsCache", 2);
11420
11462
  __decorateClass([
11421
11463
  cached
11422
11464
  ], _Workspace.prototype, "compilationControllerByUri", 1);
@@ -12544,7 +12586,7 @@ var LanguageServer = class {
12544
12586
  Logger.info("\u041D\u0430\u0447\u0430\u0442\u0430 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0441\u0435\u0440\u0432\u0438\u0441\u043E\u0432.");
12545
12587
  const initializeStartTime = performance.now();
12546
12588
  this._clientCapabilities = params.capabilities;
12547
- setUserLocale(params.initializationOptions?.localeOverride ?? params.locale ?? "en");
12589
+ setUserLocale("ru");
12548
12590
  let workspaceFolderUris;
12549
12591
  if (params.initializationOptions?.workspaceFoldersOverride !== void 0) {
12550
12592
  workspaceFolderUris = params.initializationOptions.workspaceFoldersOverride.map((f) => this.convertVscodeUriToUri(URI2.parse(f.uri)));
@@ -13101,7 +13143,7 @@ var LanguageServer = class {
13101
13143
  const sourceFileContext = yield this.getSourceFileContext(uri, token);
13102
13144
  if (sourceFileContext !== void 0) {
13103
13145
  const node = NodePath.parse(uri.fragment).getNode(sourceFileContext.sourceFile.getSyntaxNode());
13104
- if (node?.kind === 92 /* AssignmentStatement */) {
13146
+ if (node?.kind === 91 /* AssignmentStatement */) {
13105
13147
  const sourceFileEdit = this._addPropertyAssignmentService.createEditWithAssignment(
13106
13148
  sourceFileContext.sourceFile,
13107
13149
  node,
@@ -13138,7 +13180,7 @@ var LanguageServer = class {
13138
13180
  const node = NodePath.parse(uri.fragment).getNode(sourceFileContext.sourceFile.getSyntaxNode());
13139
13181
  if (node !== void 0) {
13140
13182
  let nodeForRange = node;
13141
- if (node.kind === 92 /* AssignmentStatement */) {
13183
+ if (node.kind === 91 /* AssignmentStatement */) {
13142
13184
  nodeForRange = node.right;
13143
13185
  }
13144
13186
  result = this.convertSourceFileRange(sourceFileContext.sourceFile, nodeForRange.rangeWithoutTrivia);