@artel/artc 0.6.25283 → 0.6.25285

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 (97) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +26 -14
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +828 -700
  5. package/build/{chunk-2Q4QKW7T.js → chunk-IQ4WP3GU.js} +20378 -18371
  6. package/build/{chunk-MJ2ZVHII.js → chunk-NYUW7OAM.js} +1 -1
  7. package/build/{chunk-7RAZAZE6.js → chunk-YQATIDSS.js} +2 -2
  8. package/build/types/analysis/AccessibilityCheck.d.ts +20 -0
  9. package/build/types/analysis/Analyzer.d.ts +16 -8
  10. package/build/types/analysis/BaseMemberConflictsValidator.d.ts +2 -4
  11. package/build/types/analysis/ConstructorCallResolver.d.ts +3 -4
  12. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -1
  13. package/build/types/analysis/ModifierValidator.d.ts +17 -15
  14. package/build/types/analysis/NodeTypeUtils.d.ts +3 -3
  15. package/build/types/analysis/PackageMemberLookup.d.ts +11 -4
  16. package/build/types/analysis/ReachabilityChecker.d.ts +27 -0
  17. package/build/types/analysis/ReductionSourceMemberFinder.d.ts +20 -0
  18. package/build/types/analysis/ReservedNameDictionary.d.ts +14 -0
  19. package/build/types/analysis/SourceFileAnalyzer.d.ts +3 -0
  20. package/build/types/analysis/TypeArgumentInferrer.d.ts +1 -0
  21. package/build/types/analysis/TypeMemberLookup.d.ts +36 -22
  22. package/build/types/analysis/Utils.d.ts +2 -0
  23. package/build/types/analysis/WellKnownDeclarations.d.ts +11 -7
  24. package/build/types/analysis/control-flow/GraphBuilder.d.ts +4 -1
  25. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +4 -2
  26. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +6 -5
  27. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +2 -2
  28. package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +2 -0
  29. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +9 -4
  30. package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -5
  31. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +2 -2
  32. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +14 -11
  33. package/build/types/api/Api.d.ts +1 -1
  34. package/build/types/common/LocalizationHelper.d.ts +2 -2
  35. package/build/types/common/index.d.ts +0 -1
  36. package/build/types/diagnostic/DiagnosticCode.d.ts +154 -141
  37. package/build/types/emitter/Entities.d.ts +5 -4
  38. package/build/types/emitter/EntityMap.d.ts +4 -0
  39. package/build/types/emitter/IrBuilder.d.ts +1 -0
  40. package/build/types/entities/Entity.d.ts +9 -6
  41. package/build/types/entities/EntityHiding.d.ts +1 -4
  42. package/build/types/entities/EntityLocalizationContext.d.ts +3 -2
  43. package/build/types/entities/TypeEntity.d.ts +4 -3
  44. package/build/types/entities/index.d.ts +0 -2
  45. package/build/types/entities/interfaces/AliasTypeEntity.d.ts +2 -2
  46. package/build/types/entities/interfaces/ConstructorEntity.d.ts +3 -1
  47. package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +2 -1
  48. package/build/types/entities/interfaces/DestructorEntity.d.ts +4 -1
  49. package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -1
  50. package/build/types/entities/interfaces/IndexerEntity.d.ts +2 -1
  51. package/build/types/entities/interfaces/OperatorEntity.d.ts +3 -1
  52. package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +99 -0
  53. package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -2
  54. package/build/types/entities/interfaces/VariableEntity.d.ts +2 -1
  55. package/build/types/entities/interfaces/index.d.ts +1 -0
  56. package/build/types/entities/intrinsic/IntrinsicConstructorEntity.d.ts +3 -1
  57. package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +2 -1
  58. package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +2 -1
  59. package/build/types/entities/source/SourceConstructorEntity.d.ts +6 -2
  60. package/build/types/entities/source/SourceDereferenceOperatorEntity.d.ts +3 -1
  61. package/build/types/entities/source/SourceDestructorEntity.d.ts +6 -1
  62. package/build/types/entities/source/SourceFunctionEntity.d.ts +5 -1
  63. package/build/types/entities/source/SourceIndexerEntity.d.ts +3 -1
  64. package/build/types/entities/source/SourceOperatorEntity.d.ts +5 -1
  65. package/build/types/entities/source/SourceReducedTypeEntity.d.ts +44 -0
  66. package/build/types/entities/source/SourceVariableEntity.d.ts +7 -1
  67. package/build/types/entities/source/index.d.ts +1 -0
  68. package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +9 -4
  69. package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -1
  70. package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +4 -1
  71. package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -1
  72. package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +3 -1
  73. package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +3 -1
  74. package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +59 -0
  75. package/build/types/entities/translated/TranslatedVariableEntity.d.ts +3 -1
  76. package/build/types/entities/translated/index.d.ts +1 -0
  77. package/build/types/project/SourceFile.d.ts +3 -1
  78. package/build/types/services/CompletionService.d.ts +5 -4
  79. package/build/types/services/DisplayService.d.ts +70 -3
  80. package/build/types/services/TranslationService.d.ts +1 -1
  81. package/build/types/services/source-generation/EntityToSyntax.d.ts +4 -0
  82. package/build/types/tree/KeywordKind.d.ts +57 -56
  83. package/build/types/tree/NodeKind.d.ts +142 -140
  84. package/build/types/tree/Nodes.d.ts +51 -11
  85. package/build/types/tree/SyntaxFactory.d.ts +2 -0
  86. package/build/types/tree/SyntaxToCode.d.ts +1 -0
  87. package/build/types/ts-interop/Entities.d.ts +10 -1
  88. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
  89. package/build/types/types/ReducedType.d.ts +24 -0
  90. package/build/types/types/Type.d.ts +2 -1
  91. package/build/types/types/TypeFactory.d.ts +3 -2
  92. package/build/types/types/index.d.ts +1 -0
  93. package/package.json +1 -1
  94. package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +0 -14
  95. package/build/types/entities/BaseEntityHidingMatcher.d.ts +0 -11
  96. package/build/types/entities/EntityHidingMatcherWithinTypeEntity.d.ts +0 -10
  97. package/build/types/parser/ReservedIdentifierDictionary.d.ts +0 -11
@@ -69,6 +69,7 @@ import {
69
69
  NamedTypeSpecifier,
70
70
  NamedType_alias,
71
71
  NamedType_function,
72
+ NamedType_reduced,
72
73
  NamedType_structured,
73
74
  NamedType_variant,
74
75
  NodeModulesDirectoryName,
@@ -87,6 +88,7 @@ import {
87
88
  PackageMemberGroupDeclaration,
88
89
  PackageMemberLookup,
89
90
  PackageName,
91
+ PackageReducedTypeDeclaration,
90
92
  PackageStructuredTypeDeclaration,
91
93
  PackageVariableDeclaration,
92
94
  PackageVariableGetterDeclaration,
@@ -105,6 +107,7 @@ import {
105
107
  QualifiedName,
106
108
  Query,
107
109
  Range,
110
+ ReducedTypeDeclarationBody,
108
111
  Scanner,
109
112
  SinglePackageImportDirective,
110
113
  SourceFile,
@@ -133,14 +136,6 @@ import {
133
136
  TypeAnnotation,
134
137
  TypeArgumentClause,
135
138
  TypeArgumentList,
136
- TypeDeclarationAlias_entity,
137
- TypeDeclarationFunction_entity,
138
- TypeDeclarationStructured_entity,
139
- TypeDeclarationVariant_entity,
140
- TypeDeclaration_alias,
141
- TypeDeclaration_function,
142
- TypeDeclaration_structured,
143
- TypeDeclaration_variant,
144
139
  TypeMemberDeclarationBlock,
145
140
  TypeMemberDeclarationList,
146
141
  TypeMemberGroupDeclaration,
@@ -188,7 +183,7 @@ import {
188
183
  unwrapParenthesizedExpressions,
189
184
  visitChildren,
190
185
  yieldTask
191
- } from "../chunk-2Q4QKW7T.js";
186
+ } from "../chunk-IQ4WP3GU.js";
192
187
 
193
188
  // source/services/CustomRequests.ts
194
189
  import * as ls from "vscode-languageserver";
@@ -241,7 +236,7 @@ var SyntaxFactory = class {
241
236
  }
242
237
  const packageName = this.packageName(pathSegments);
243
238
  const packageImport = new PackageImport(aliasIdentifier, equalsToken, packageName, void 0);
244
- const importKeyword = this.keyword(18 /* Import */);
239
+ const importKeyword = this.keyword(19 /* Import */);
245
240
  return new SinglePackageImportDirective(importKeyword, packageImport, void 0);
246
241
  }
247
242
  static packageName(segments) {
@@ -252,7 +247,7 @@ var SyntaxFactory = class {
252
247
  static packageAliasTypeDeclaration(tags, modifiers, name, typeParameters, body) {
253
248
  const tagList = new TagList(tags, void 0);
254
249
  const modifierList = new ModifierList(modifiers, void 0);
255
- const typeKeyword = this.keyword(16 /* Type */);
250
+ const typeKeyword = this.keyword(17 /* Type */);
256
251
  const nameIdentifier = this.identifier(name);
257
252
  const typeParameterClause = this.createTypeParameterClause(typeParameters);
258
253
  const equalsToken = this.token(64 /* Equals */);
@@ -271,6 +266,45 @@ var SyntaxFactory = class {
271
266
  const memberBlock = members !== void 0 ? this.typeMemberDeclarationBlock(members) : void 0;
272
267
  return new AliasTypeDeclarationBody(aliasedTypeSpecifier, memberBlock, void 0);
273
268
  }
269
+ static packageReducedTypeDeclaration(tags, modifiers, name, typeParameters, body) {
270
+ const tagList = new TagList(tags, void 0);
271
+ const modifierList = new ModifierList(modifiers, void 0);
272
+ const typeKeyword = this.keyword(17 /* Type */);
273
+ const nameIdentifier = this.identifier(name);
274
+ const typeParameterClause = this.createTypeParameterClause(typeParameters);
275
+ const equalsToken = this.token(64 /* Equals */);
276
+ return new PackageReducedTypeDeclaration(
277
+ tagList,
278
+ modifierList,
279
+ typeKeyword,
280
+ nameIdentifier,
281
+ typeParameterClause,
282
+ equalsToken,
283
+ body,
284
+ void 0
285
+ );
286
+ }
287
+ static reducedTypeDeclarationBody(reductionSourceSpecifier, preservedTypes, members) {
288
+ const reducedObjectKeyword = this.keyword(6 /* ReducedObject */);
289
+ let commaToken;
290
+ let preservedTypeList;
291
+ if (preservedTypes !== void 0 && preservedTypes.length > 0) {
292
+ commaToken = this.token(26 /* Comma */);
293
+ preservedTypeList = new BaseTypeList(
294
+ this.createSeparatedElements(preservedTypes, 26 /* Comma */),
295
+ void 0
296
+ );
297
+ }
298
+ const memberBlock = this.typeMemberDeclarationBlock(members);
299
+ return new ReducedTypeDeclarationBody(
300
+ reducedObjectKeyword,
301
+ reductionSourceSpecifier,
302
+ commaToken,
303
+ preservedTypeList,
304
+ memberBlock,
305
+ void 0
306
+ );
307
+ }
274
308
  static packageMemberGroupDeclaration(tags, modifiers, declarations) {
275
309
  const tagList = new TagList(tags, void 0);
276
310
  const modifierList = new ModifierList(modifiers, void 0);
@@ -287,7 +321,7 @@ var SyntaxFactory = class {
287
321
  static packageFunctionDeclaration(tags, modifiers, name, typeParameters, parameters, returnTypeSpecifier, body) {
288
322
  const tagList = new TagList(tags, void 0);
289
323
  const modifierList = new ModifierList(modifiers, void 0);
290
- const functionKeyword = this.keyword(12 /* Function */);
324
+ const functionKeyword = this.keyword(13 /* Function */);
291
325
  const nameIdentifier = this.identifier(name);
292
326
  const typeParameterClause = this.createTypeParameterClause(typeParameters);
293
327
  const parameterClause = this.parameterClause(parameters);
@@ -307,7 +341,7 @@ var SyntaxFactory = class {
307
341
  static packageFunctionTypeDeclaration(tags, modifiers, name, typeParameters, body) {
308
342
  const tagList = new TagList(tags, void 0);
309
343
  const modifierList = new ModifierList(modifiers, void 0);
310
- const typeKeyword = this.keyword(16 /* Type */);
344
+ const typeKeyword = this.keyword(17 /* Type */);
311
345
  const nameIdentifier = this.identifier(name);
312
346
  const typeParameterClause = this.createTypeParameterClause(typeParameters);
313
347
  const equalsToken = this.token(64 /* Equals */);
@@ -323,7 +357,7 @@ var SyntaxFactory = class {
323
357
  );
324
358
  }
325
359
  static functionTypeDeclarationBody(parameters, returnTypeSpecifier) {
326
- const functionKeyword = this.keyword(12 /* Function */);
360
+ const functionKeyword = this.keyword(13 /* Function */);
327
361
  const parameterClause = this.parameterClause(parameters);
328
362
  const returnTypeAnnotation = this.createTypeAnnotation(returnTypeSpecifier);
329
363
  return new FunctionTypeDeclarationBody(
@@ -337,7 +371,7 @@ var SyntaxFactory = class {
337
371
  static packageStructuredTypeDeclaration(tags, modifiers, name, typeParameters, body) {
338
372
  const tagList = new TagList(tags, void 0);
339
373
  const modifierList = new ModifierList(modifiers, void 0);
340
- const typeKeyword = this.keyword(16 /* Type */);
374
+ const typeKeyword = this.keyword(17 /* Type */);
341
375
  const nameIdentifier = this.identifier(name);
342
376
  const typeParameterClause = this.createTypeParameterClause(typeParameters);
343
377
  const equalsToken = this.token(64 /* Equals */);
@@ -385,7 +419,7 @@ var SyntaxFactory = class {
385
419
  static packageVariableGetterDeclaration(tags, modifiers, name, typeSpecifier, body) {
386
420
  const tagList = new TagList(tags, void 0);
387
421
  const modifierList = new ModifierList(modifiers, void 0);
388
- const getKeyword = this.keyword(58 /* Get */);
422
+ const getKeyword = this.keyword(59 /* Get */);
389
423
  const nameIdentifier = this.identifier(name);
390
424
  const typeAnnotation = this.typeAnnotation(typeSpecifier);
391
425
  return new PackageVariableGetterDeclaration(
@@ -401,14 +435,14 @@ var SyntaxFactory = class {
401
435
  static packageVariableSetterDeclaration(tags, modifiers, name, body) {
402
436
  const tagList = new TagList(tags, void 0);
403
437
  const modifierList = new ModifierList(modifiers, void 0);
404
- const setKeyword = this.keyword(59 /* Set */);
438
+ const setKeyword = this.keyword(60 /* Set */);
405
439
  const nameIdentifier = this.identifier(name);
406
440
  return new PackageVariableSetterDeclaration(tagList, modifierList, setKeyword, nameIdentifier, body, void 0);
407
441
  }
408
442
  static packageVariantTypeDeclaration(tags, modifiers, name, typeParameters, body) {
409
443
  const tagList = new TagList(tags, void 0);
410
444
  const modifierList = new ModifierList(modifiers, void 0);
411
- const typeKeyword = this.keyword(16 /* Type */);
445
+ const typeKeyword = this.keyword(17 /* Type */);
412
446
  const nameIdentifier = this.identifier(name);
413
447
  const typeParameterClause = this.createTypeParameterClause(typeParameters);
414
448
  const equalsToken = this.token(64 /* Equals */);
@@ -424,7 +458,7 @@ var SyntaxFactory = class {
424
458
  );
425
459
  }
426
460
  static variantTypeDeclarationBody(members) {
427
- const variantKeyword = this.keyword(6 /* Variant */);
461
+ const variantKeyword = this.keyword(7 /* Variant */);
428
462
  const memberBlock = this.typeMemberDeclarationBlock(members);
429
463
  return new VariantTypeDeclarationBody(variantKeyword, void 0, memberBlock, void 0);
430
464
  }
@@ -450,7 +484,7 @@ var SyntaxFactory = class {
450
484
  static fieldGetterDeclaration(tags, modifiers, name, typeSpecifier, body) {
451
485
  const tagList = new TagList(tags, void 0);
452
486
  const modifierList = new ModifierList(modifiers, void 0);
453
- const getKeyword = this.keyword(58 /* Get */);
487
+ const getKeyword = this.keyword(59 /* Get */);
454
488
  const nameIdentifier = this.identifier(name);
455
489
  const typeAnnotation = this.typeAnnotation(typeSpecifier);
456
490
  return new FieldGetterDeclaration(
@@ -466,14 +500,14 @@ var SyntaxFactory = class {
466
500
  static fieldSetterDeclaration(tags, modifiers, name, body) {
467
501
  const tagList = new TagList(tags, void 0);
468
502
  const modifierList = new ModifierList(modifiers, void 0);
469
- const setKeyword = this.keyword(59 /* Set */);
503
+ const setKeyword = this.keyword(60 /* Set */);
470
504
  const nameIdentifier = this.identifier(name);
471
505
  return new FieldSetterDeclaration(tagList, modifierList, setKeyword, nameIdentifier, body, void 0);
472
506
  }
473
507
  static methodDeclaration(tags, modifiers, name, typeParameters, parameters, returnTypeSpecifier, body) {
474
508
  const tagList = new TagList(tags, void 0);
475
509
  const modifierList = new ModifierList(modifiers, void 0);
476
- const functionKeyword = this.keyword(12 /* Function */);
510
+ const functionKeyword = this.keyword(13 /* Function */);
477
511
  const nameIdentifier = this.identifier(name);
478
512
  const typeParameterClause = this.createTypeParameterClause(typeParameters);
479
513
  const parameterClause = this.parameterClause(parameters);
@@ -493,21 +527,21 @@ var SyntaxFactory = class {
493
527
  static constructorDeclaration(tags, modifiers, parameters, body) {
494
528
  const tagList = new TagList(tags, void 0);
495
529
  const modifierList = new ModifierList(modifiers, void 0);
496
- const creationKeyword = this.keyword(31 /* Creation */);
530
+ const creationKeyword = this.keyword(32 /* Creation */);
497
531
  const parameterClause = this.parameterClause(parameters);
498
532
  return new ConstructorDeclaration(tagList, modifierList, creationKeyword, parameterClause, body, void 0);
499
533
  }
500
534
  static destructorDeclaration(tags, modifiers, parameters, body) {
501
535
  const tagList = new TagList(tags, void 0);
502
536
  const modifierList = new ModifierList(modifiers, void 0);
503
- const destructionKeyword = this.keyword(47 /* Destruction */);
537
+ const destructionKeyword = this.keyword(48 /* Destruction */);
504
538
  const parameterClause = this.parameterClause(parameters);
505
539
  return new DestructorDeclaration(tagList, modifierList, destructionKeyword, parameterClause, body, void 0);
506
540
  }
507
541
  static indexedElementGetterDeclaration(tags, modifiers, parameters, typeSpecifier, body) {
508
542
  const tagList = new TagList(tags, void 0);
509
543
  const modifierList = new ModifierList(modifiers, void 0);
510
- const getKeyword = this.keyword(58 /* Get */);
544
+ const getKeyword = this.keyword(59 /* Get */);
511
545
  const parameterClause = this.indexParameterClause(parameters);
512
546
  const typeAnnotation = this.typeAnnotation(typeSpecifier);
513
547
  return new IndexedElementGetterDeclaration(
@@ -523,7 +557,7 @@ var SyntaxFactory = class {
523
557
  static indexedElementSetterDeclaration(tags, modifiers, parameters, body) {
524
558
  const tagList = new TagList(tags, void 0);
525
559
  const modifierList = new ModifierList(modifiers, void 0);
526
- const getKeyword = this.keyword(59 /* Set */);
560
+ const getKeyword = this.keyword(60 /* Set */);
527
561
  const parameterClause = this.indexParameterClause(parameters);
528
562
  return new IndexedElementSetterDeclaration(tagList, modifierList, getKeyword, parameterClause, body, void 0);
529
563
  }
@@ -706,7 +740,7 @@ var SyntaxFactory = class {
706
740
  return new FunctionBlock(openBraceToken, statementList, closeBraceToken, void 0);
707
741
  }
708
742
  static nullLiteral() {
709
- return new KeywordExpression(this.keyword(57 /* Null */), void 0);
743
+ return new KeywordExpression(this.keyword(58 /* Null */), void 0);
710
744
  }
711
745
  static integerLiteral(value) {
712
746
  return new TokenExpression(this.token(2 /* IntegerLiteral */, value.toString()), void 0);
@@ -714,7 +748,7 @@ var SyntaxFactory = class {
714
748
  static translationsDeclaration(translations) {
715
749
  const tagList = new TagList([], void 0);
716
750
  const modifierList = new ModifierList([], void 0);
717
- const translationsKeyword = this.keyword(55 /* Translations */);
751
+ const translationsKeyword = this.keyword(56 /* Translations */);
718
752
  const openBraceToken = this.token(46 /* OpenBrace */);
719
753
  const translationList = new TopLevelTranslationList(translations, void 0);
720
754
  const closeBraceToken = this.token(22 /* CloseBrace */);
@@ -740,7 +774,7 @@ var SyntaxFactory = class {
740
774
  );
741
775
  }
742
776
  static packageFunctionTranslation(sourceName, sourceTypeParameters, sourceParameters, translatedName, translatedTypeParameters, translatedParameters) {
743
- const functionKeyword = this.keyword(12 /* Function */);
777
+ const functionKeyword = this.keyword(13 /* Function */);
744
778
  const sourceNameIdentifier = this.identifier(sourceName);
745
779
  const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
746
780
  const sourceParameterClause = this.translationParameterClause(sourceParameters);
@@ -761,7 +795,7 @@ var SyntaxFactory = class {
761
795
  );
762
796
  }
763
797
  static typeTranslation(sourceName, sourceTypeParameters, translatedName, translatedTypeParameters, members) {
764
- const typeKeyword = this.keyword(16 /* Type */);
798
+ const typeKeyword = this.keyword(17 /* Type */);
765
799
  const sourceNameIdentifier = this.identifier(sourceName);
766
800
  const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
767
801
  const minusGreaterThanToken = this.token(45 /* MinusGreaterThan */);
@@ -789,7 +823,7 @@ var SyntaxFactory = class {
789
823
  );
790
824
  }
791
825
  static functionTypeTranslation(sourceName, sourceTypeParameters, sourceParameters, translatedName, translatedTypeParameters, translatedParameters) {
792
- const typeKeyword = this.keyword(16 /* Type */);
826
+ const typeKeyword = this.keyword(17 /* Type */);
793
827
  const sourceNameIdentifier = this.identifier(sourceName);
794
828
  const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
795
829
  const sourceParameterClause = this.translationParameterClause(sourceParameters);
@@ -821,7 +855,7 @@ var SyntaxFactory = class {
821
855
  );
822
856
  }
823
857
  static methodTranslation(sourceName, sourceTypeParameters, sourceParameters, translatedName, translatedTypeParameters, translatedParameters) {
824
- const functionKeyword = this.keyword(12 /* Function */);
858
+ const functionKeyword = this.keyword(13 /* Function */);
825
859
  const sourceNameIdentifier = this.identifier(sourceName);
826
860
  const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
827
861
  const sourceParameterClause = this.translationParameterClause(sourceParameters);
@@ -842,7 +876,7 @@ var SyntaxFactory = class {
842
876
  );
843
877
  }
844
878
  static constructorTranslation(sourceParameters, translatedParameters) {
845
- const creationKeyword = this.keyword(31 /* Creation */);
879
+ const creationKeyword = this.keyword(32 /* Creation */);
846
880
  const sourceParameterClause = this.translationParameterClause(sourceParameters);
847
881
  const minusGreaterThanToken = this.token(45 /* MinusGreaterThan */);
848
882
  const translatedParameterClause = this.translationParameterClause(translatedParameters);
@@ -1097,6 +1131,32 @@ var SyntaxToCode = class _SyntaxToCode {
1097
1131
  this.writeTypeMemberDeclarationBlock(node.body.memberBlock);
1098
1132
  }
1099
1133
  }
1134
+ writePackageReducedTypeDeclaration(node) {
1135
+ this.writeDeclarationTags(node.tagList);
1136
+ this.writeDeclarationModifiers(node.modifierList);
1137
+ this.writeKeyword(node.typeKeyword);
1138
+ this.writeWhitespace();
1139
+ this.writeToken(node.name);
1140
+ if (node.typeParameterClause !== void 0) {
1141
+ this.writeTypeParameterClause(node.typeParameterClause);
1142
+ }
1143
+ this.writeWhitespace();
1144
+ this.writeToken(node.equalsToken);
1145
+ this.writeWhitespace();
1146
+ this.writeKeyword(node.body.reducedObjectKeyword);
1147
+ this.writeWhitespace();
1148
+ this.writeTypeSpecifier(node.body.reductionSourceSpecifier, false);
1149
+ if (node.body.commaToken !== void 0) {
1150
+ this.writeToken(node.body.commaToken);
1151
+ if (node.body.preservedTypeList !== void 0 && node.body.preservedTypeList.elements.length > 0) {
1152
+ this.writeWhitespace();
1153
+ this.writeBaseTypeList(node.body.preservedTypeList);
1154
+ }
1155
+ }
1156
+ if (node.body.memberBlock !== void 0) {
1157
+ this.writeTypeMemberDeclarationBlock(node.body.memberBlock);
1158
+ }
1159
+ }
1100
1160
  writePackageVariantTypeDeclaration(node) {
1101
1161
  this.writeDeclarationTags(node.tagList);
1102
1162
  this.writeDeclarationModifiers(node.modifierList);
@@ -1517,10 +1577,10 @@ var SyntaxToCode = class _SyntaxToCode {
1517
1577
  return true;
1518
1578
  case 15 /* AnonymousTypeSpecifier */: {
1519
1579
  switch (node.typeDeclaration.body.kind) {
1520
- case 27 /* FunctionTypeDeclarationBody */:
1580
+ case 29 /* FunctionTypeDeclarationBody */:
1521
1581
  return true;
1522
- case 32 /* StructuredTypeDeclarationBody */:
1523
- case 37 /* VariantTypeDeclarationBody */:
1582
+ case 34 /* StructuredTypeDeclarationBody */:
1583
+ case 39 /* VariantTypeDeclarationBody */:
1524
1584
  return false;
1525
1585
  default:
1526
1586
  Debug.never(node.typeDeclaration.body);
@@ -1543,10 +1603,10 @@ var SyntaxToCode = class _SyntaxToCode {
1543
1603
  return true;
1544
1604
  case 15 /* AnonymousTypeSpecifier */: {
1545
1605
  switch (node.typeDeclaration.body.kind) {
1546
- case 27 /* FunctionTypeDeclarationBody */:
1606
+ case 29 /* FunctionTypeDeclarationBody */:
1547
1607
  return true;
1548
- case 32 /* StructuredTypeDeclarationBody */:
1549
- case 37 /* VariantTypeDeclarationBody */:
1608
+ case 34 /* StructuredTypeDeclarationBody */:
1609
+ case 39 /* VariantTypeDeclarationBody */:
1550
1610
  return false;
1551
1611
  default:
1552
1612
  Debug.never(node.typeDeclaration.body);
@@ -1595,7 +1655,7 @@ var SyntaxToCode = class _SyntaxToCode {
1595
1655
  this.writeNodeDefault(node);
1596
1656
  }
1597
1657
  writeDeclarationBody(node, addLeadingNewLineOrWhitespace = true) {
1598
- if (node.expressionOrStatementList.kind !== 93 /* StatementList */ || node.expressionOrStatementList.elements.length === 0) {
1658
+ if (node.expressionOrStatementList.kind !== 95 /* StatementList */ || node.expressionOrStatementList.elements.length === 0) {
1599
1659
  this.writeWhitespace();
1600
1660
  this.writeFunctionBlock(node, false);
1601
1661
  } else {
@@ -1817,7 +1877,7 @@ var SyntaxToCode = class _SyntaxToCode {
1817
1877
  writeKeyword(keyword) {
1818
1878
  if (keyword.isMissing) {
1819
1879
  let preferredFlags;
1820
- if (keyword.parent.kind === 154 /* Modifier */) {
1880
+ if (keyword.parent.kind === 156 /* Modifier */) {
1821
1881
  preferredFlags = this.getModifierPreferredFlags(keyword.parent);
1822
1882
  } else {
1823
1883
  preferredFlags = 12290 /* SingularNeuNoun */;
@@ -1840,37 +1900,38 @@ var SyntaxToCode = class _SyntaxToCode {
1840
1900
  getModifierPreferredFlags(modifier) {
1841
1901
  const modifierTarget = modifier.parent.parent;
1842
1902
  switch (modifierTarget.kind) {
1843
- case 25 /* PackageFunctionDeclaration */:
1844
- case 35 /* PackageVariableSetterDeclaration */:
1845
- case 54 /* FieldSetterDeclaration */:
1846
- case 46 /* IndexedElementSetterDeclaration */:
1847
- case 49 /* DereferencedVariableSetterDeclaration */:
1848
- case 50 /* MethodDeclaration */:
1849
- case 51 /* OperatorDeclaration */:
1850
- case 24 /* PackageEntryPointDeclaration */:
1903
+ case 27 /* PackageFunctionDeclaration */:
1904
+ case 37 /* PackageVariableSetterDeclaration */:
1905
+ case 56 /* FieldSetterDeclaration */:
1906
+ case 48 /* IndexedElementSetterDeclaration */:
1907
+ case 51 /* DereferencedVariableSetterDeclaration */:
1908
+ case 52 /* MethodDeclaration */:
1909
+ case 53 /* OperatorDeclaration */:
1910
+ case 26 /* PackageEntryPointDeclaration */:
1851
1911
  return 10242 /* SingularFemNoun */;
1852
1912
  case 20 /* PackageAliasTypeDeclaration */:
1853
- case 31 /* PackageStructuredTypeDeclaration */:
1854
- case 36 /* PackageVariantTypeDeclaration */:
1855
- case 26 /* PackageFunctionTypeDeclaration */:
1913
+ case 22 /* PackageReducedTypeDeclaration */:
1914
+ case 33 /* PackageStructuredTypeDeclaration */:
1915
+ case 38 /* PackageVariantTypeDeclaration */:
1916
+ case 28 /* PackageFunctionTypeDeclaration */:
1856
1917
  return 9218 /* SingularMasNoun */;
1857
- case 33 /* PackageVariableDeclaration */:
1858
- case 34 /* PackageVariableGetterDeclaration */:
1859
- case 38 /* TypeExtensionDeclaration */:
1860
- case 23 /* PackageConstructorDeclaration */:
1861
- case 43 /* ConstructorDeclaration */:
1862
- case 44 /* DestructorDeclaration */:
1863
- case 45 /* IndexedElementGetterDeclaration */:
1864
- case 48 /* DereferencedVariableGetterDeclaration */:
1865
- case 52 /* FieldDeclaration */:
1866
- case 53 /* FieldGetterDeclaration */:
1867
- case 147 /* VariantValueDeclaration */:
1868
- case 41 /* MissingPackageMemberDeclaration */:
1869
- case 55 /* MissingTypeMemberDeclaration */:
1918
+ case 35 /* PackageVariableDeclaration */:
1919
+ case 36 /* PackageVariableGetterDeclaration */:
1920
+ case 40 /* TypeExtensionDeclaration */:
1921
+ case 25 /* PackageConstructorDeclaration */:
1922
+ case 45 /* ConstructorDeclaration */:
1923
+ case 46 /* DestructorDeclaration */:
1924
+ case 47 /* IndexedElementGetterDeclaration */:
1925
+ case 50 /* DereferencedVariableGetterDeclaration */:
1926
+ case 54 /* FieldDeclaration */:
1927
+ case 55 /* FieldGetterDeclaration */:
1928
+ case 149 /* VariantValueDeclaration */:
1929
+ case 43 /* MissingPackageMemberDeclaration */:
1930
+ case 57 /* MissingTypeMemberDeclaration */:
1870
1931
  return 12290 /* SingularNeuNoun */;
1871
- case 42 /* TypeMemberGroupDeclaration */:
1872
- case 22 /* PackageMemberGroupDeclaration */:
1873
- case 123 /* TranslationsDeclaration */:
1932
+ case 44 /* TypeMemberGroupDeclaration */:
1933
+ case 24 /* PackageMemberGroupDeclaration */:
1934
+ case 125 /* TranslationsDeclaration */:
1874
1935
  return 16386 /* PluralNoun */;
1875
1936
  default:
1876
1937
  Debug.never(modifierTarget);
@@ -1949,153 +2010,155 @@ var SyntaxToCode = class _SyntaxToCode {
1949
2010
  [14 /* NullableTypeSpecifier */]: this.prototype.writeNullableTypeSpecifier,
1950
2011
  [15 /* AnonymousTypeSpecifier */]: this.prototype.writeAnonymousTypeSpecifier,
1951
2012
  [20 /* PackageAliasTypeDeclaration */]: this.prototype.writePackageAliasTypeDeclaration,
1952
- [22 /* PackageMemberGroupDeclaration */]: this.prototype.writePackageMemberGroupDeclaration,
1953
- [23 /* PackageConstructorDeclaration */]: this.prototype.writePackageConstructorDeclaration,
1954
- [24 /* PackageEntryPointDeclaration */]: this.prototype.writePackageEntryPointDeclaration,
1955
- [25 /* PackageFunctionDeclaration */]: this.prototype.writePackageFunctionDeclaration,
1956
- [26 /* PackageFunctionTypeDeclaration */]: this.prototype.writePackageFunctionTypeDeclaration,
1957
- [27 /* FunctionTypeDeclarationBody */]: this.prototype.writeFunctionTypeDeclarationBody,
1958
- [28 /* BaseTypeList */]: this.prototype.writeBaseTypeList,
1959
- [30 /* TypeMemberDeclarationBlock */]: this.prototype.writeTypeMemberDeclarationBlock,
1960
- [31 /* PackageStructuredTypeDeclaration */]: this.prototype.writePackageStructuredTypeDeclaration,
1961
- [32 /* StructuredTypeDeclarationBody */]: this.prototype.writeStructuredTypeDeclarationBody,
1962
- [33 /* PackageVariableDeclaration */]: this.prototype.writePackageVariableDeclaration,
1963
- [34 /* PackageVariableGetterDeclaration */]: this.prototype.writePackageVariableGetterDeclaration,
1964
- [35 /* PackageVariableSetterDeclaration */]: this.prototype.writePackageVariableSetterDeclaration,
1965
- [36 /* PackageVariantTypeDeclaration */]: this.prototype.writePackageVariantTypeDeclaration,
1966
- [37 /* VariantTypeDeclarationBody */]: this.prototype.writeVariantTypeDeclarationBody,
1967
- [42 /* TypeMemberGroupDeclaration */]: this.prototype.writeTypeMemberGroupDeclaration,
1968
- [43 /* ConstructorDeclaration */]: this.prototype.writeConstructorDeclaration,
1969
- [44 /* DestructorDeclaration */]: this.prototype.writeDestructorDeclaration,
1970
- [45 /* IndexedElementGetterDeclaration */]: this.prototype.writeIndexedElementGetterDeclaration,
1971
- [46 /* IndexedElementSetterDeclaration */]: this.prototype.writeIndexedElementSetterDeclaration,
1972
- [48 /* DereferencedVariableGetterDeclaration */]: this.prototype.writeDereferencedVariableGetterDeclaration,
1973
- [49 /* DereferencedVariableSetterDeclaration */]: this.prototype.writeDereferencedVariableSetterDeclaration,
1974
- [50 /* MethodDeclaration */]: this.prototype.writeMethodDeclaration,
1975
- [51 /* OperatorDeclaration */]: this.prototype.writeOperatorDeclaration,
1976
- [52 /* FieldDeclaration */]: this.prototype.writeFieldDeclaration,
1977
- [53 /* FieldGetterDeclaration */]: this.prototype.writeFieldGetterDeclaration,
1978
- [54 /* FieldSetterDeclaration */]: this.prototype.writeFieldSetterDeclaration,
1979
- [94 /* StatementBlock */]: this.prototype.writeStatementBlock,
1980
- [95 /* FunctionBlock */]: this.prototype.writeFunctionBlock,
1981
- [135 /* QualifiedName */]: this.prototype.writeQualifiedName,
1982
- [147 /* VariantValueDeclaration */]: this.prototype.writeVariantValueDeclaration,
1983
- [148 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
1984
- [149 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
1985
- [150 /* Argument */]: this.prototype.writeArgument,
1986
- [152 /* Tag */]: this.prototype.writeTag,
1987
- [154 /* Modifier */]: this.prototype.writeModifier,
1988
- [155 /* ParameterClause */]: this.prototype.writeParameterClause,
1989
- [156 /* ParameterList */]: this.prototype.writeParameterList,
1990
- [157 /* TypeArgumentClause */]: this.prototype.writeTypeArgumentClause,
1991
- [159 /* TypeParameterClause */]: this.prototype.writeTypeParameterClause,
2013
+ [22 /* PackageReducedTypeDeclaration */]: this.prototype.writePackageReducedTypeDeclaration,
2014
+ [24 /* PackageMemberGroupDeclaration */]: this.prototype.writePackageMemberGroupDeclaration,
2015
+ [25 /* PackageConstructorDeclaration */]: this.prototype.writePackageConstructorDeclaration,
2016
+ [26 /* PackageEntryPointDeclaration */]: this.prototype.writePackageEntryPointDeclaration,
2017
+ [27 /* PackageFunctionDeclaration */]: this.prototype.writePackageFunctionDeclaration,
2018
+ [28 /* PackageFunctionTypeDeclaration */]: this.prototype.writePackageFunctionTypeDeclaration,
2019
+ [29 /* FunctionTypeDeclarationBody */]: this.prototype.writeFunctionTypeDeclarationBody,
2020
+ [30 /* BaseTypeList */]: this.prototype.writeBaseTypeList,
2021
+ [32 /* TypeMemberDeclarationBlock */]: this.prototype.writeTypeMemberDeclarationBlock,
2022
+ [33 /* PackageStructuredTypeDeclaration */]: this.prototype.writePackageStructuredTypeDeclaration,
2023
+ [34 /* StructuredTypeDeclarationBody */]: this.prototype.writeStructuredTypeDeclarationBody,
2024
+ [35 /* PackageVariableDeclaration */]: this.prototype.writePackageVariableDeclaration,
2025
+ [36 /* PackageVariableGetterDeclaration */]: this.prototype.writePackageVariableGetterDeclaration,
2026
+ [37 /* PackageVariableSetterDeclaration */]: this.prototype.writePackageVariableSetterDeclaration,
2027
+ [38 /* PackageVariantTypeDeclaration */]: this.prototype.writePackageVariantTypeDeclaration,
2028
+ [39 /* VariantTypeDeclarationBody */]: this.prototype.writeVariantTypeDeclarationBody,
2029
+ [44 /* TypeMemberGroupDeclaration */]: this.prototype.writeTypeMemberGroupDeclaration,
2030
+ [45 /* ConstructorDeclaration */]: this.prototype.writeConstructorDeclaration,
2031
+ [46 /* DestructorDeclaration */]: this.prototype.writeDestructorDeclaration,
2032
+ [47 /* IndexedElementGetterDeclaration */]: this.prototype.writeIndexedElementGetterDeclaration,
2033
+ [48 /* IndexedElementSetterDeclaration */]: this.prototype.writeIndexedElementSetterDeclaration,
2034
+ [50 /* DereferencedVariableGetterDeclaration */]: this.prototype.writeDereferencedVariableGetterDeclaration,
2035
+ [51 /* DereferencedVariableSetterDeclaration */]: this.prototype.writeDereferencedVariableSetterDeclaration,
2036
+ [52 /* MethodDeclaration */]: this.prototype.writeMethodDeclaration,
2037
+ [53 /* OperatorDeclaration */]: this.prototype.writeOperatorDeclaration,
2038
+ [54 /* FieldDeclaration */]: this.prototype.writeFieldDeclaration,
2039
+ [55 /* FieldGetterDeclaration */]: this.prototype.writeFieldGetterDeclaration,
2040
+ [56 /* FieldSetterDeclaration */]: this.prototype.writeFieldSetterDeclaration,
2041
+ [96 /* StatementBlock */]: this.prototype.writeStatementBlock,
2042
+ [97 /* FunctionBlock */]: this.prototype.writeFunctionBlock,
2043
+ [137 /* QualifiedName */]: this.prototype.writeQualifiedName,
2044
+ [149 /* VariantValueDeclaration */]: this.prototype.writeVariantValueDeclaration,
2045
+ [150 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
2046
+ [151 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
2047
+ [152 /* Argument */]: this.prototype.writeArgument,
2048
+ [154 /* Tag */]: this.prototype.writeTag,
2049
+ [156 /* Modifier */]: this.prototype.writeModifier,
2050
+ [157 /* ParameterClause */]: this.prototype.writeParameterClause,
2051
+ [158 /* ParameterList */]: this.prototype.writeParameterList,
2052
+ [159 /* TypeArgumentClause */]: this.prototype.writeTypeArgumentClause,
2053
+ [161 /* TypeParameterClause */]: this.prototype.writeTypeParameterClause,
1992
2054
  [17 /* AnonymousFunctionTypeDeclaration */]: this.prototype.writeAnonymousFunctionTypeDeclaration,
1993
2055
  [18 /* AnonymousStructuredTypeDeclaration */]: this.prototype.writeAnonymousStructuredTypeDeclaration,
1994
2056
  [19 /* AnonymousVariantTypeDeclaration */]: this.prototype.writeAnonymousVariantTypeDeclaration,
1995
2057
  [6 /* PackageGroupImportDirective */]: this.prototype.writeNodeDefault,
1996
2058
  [7 /* PackageImportList */]: this.prototype.writeNodeDefault,
1997
2059
  [16 /* MissingTypeSpecifier */]: this.prototype.writeNodeDefault,
1998
- [124 /* TopLevelTranslationList */]: this.prototype.writeNodeDefault,
1999
- [123 /* TranslationsDeclaration */]: this.prototype.writeTranslationsDeclaration,
2060
+ [126 /* TopLevelTranslationList */]: this.prototype.writeNodeDefault,
2061
+ [125 /* TranslationsDeclaration */]: this.prototype.writeTranslationsDeclaration,
2000
2062
  [21 /* AliasTypeDeclarationBody */]: this.prototype.writeNodeDefault,
2001
- [29 /* TypeMemberDeclarationList */]: this.prototype.writeNodeDefault,
2002
- [38 /* TypeExtensionDeclaration */]: this.prototype.writeNodeDefault,
2003
- [39 /* ExtendedTypeClauseCommaList */]: this.prototype.writeNodeDefault,
2004
- [40 /* ExtendedTypeClause */]: this.prototype.writeNodeDefault,
2005
- [41 /* MissingPackageMemberDeclaration */]: this.prototype.writeNodeDefault,
2006
- [47 /* IndexParameterClause */]: this.prototype.writeNodeDefault,
2007
- [55 /* MissingTypeMemberDeclaration */]: this.prototype.writeNodeDefault,
2008
- [56 /* NestedFunctionDeclaration */]: this.prototype.writeNodeDefault,
2009
- [57 /* LocalVariableDeclaration */]: this.prototype.writeNodeDefault,
2010
- [58 /* ForStatementVariableDeclaration */]: this.prototype.writeNodeDefault,
2011
- [59 /* ArrayLiteral */]: this.prototype.writeNodeDefault,
2012
- [60 /* ArrayLiteralElementList */]: this.prototype.writeNodeDefault,
2013
- [61 /* AssertionExpression */]: this.prototype.writeNodeDefault,
2014
- [62 /* AssumptionExpression */]: this.prototype.writeNodeDefault,
2015
- [63 /* AsExpression */]: this.prototype.writeNodeDefault,
2016
- [64 /* BinaryExpression */]: this.prototype.writeNodeDefault,
2017
- [66 /* FunctionBlockLiteral */]: this.prototype.writeNodeDefault,
2018
- [67 /* ArgumentList */]: this.prototype.writeNodeDefault,
2019
- [68 /* CallExpression */]: this.prototype.writeNodeDefault,
2020
- [69 /* AutotypeCallExpression */]: this.prototype.writeNodeDefault,
2021
- [70 /* IndexedAccessExpression */]: this.prototype.writeNodeDefault,
2022
- [71 /* MissingExpression */]: this.prototype.writeNodeDefault,
2023
- [72 /* IsExpression */]: this.prototype.writeNodeDefault,
2024
- [65 /* FunctionLiteral */]: this.prototype.writeNodeDefault,
2025
- [73 /* ParenthesizedExpression */]: this.prototype.writeNodeDefault,
2026
- [74 /* ConditionalExpression */]: this.prototype.writeNodeDefault,
2027
- [75 /* PrefixUnaryExpression */]: this.prototype.writeNodeDefault,
2028
- [76 /* MemberAccessExpression */]: this.prototype.writeNodeDefault,
2029
- [77 /* ReferenceExpression */]: this.prototype.writeNodeDefault,
2030
- [78 /* DereferenceExpression */]: this.prototype.writeNodeDefault,
2031
- [84 /* TextLiteral */]: this.prototype.writeNodeDefault,
2032
- [85 /* LocalizableTextLiteral */]: this.prototype.writeNodeDefault,
2033
- [79 /* TextTemplateLiteral */]: this.prototype.writeNodeDefault,
2034
- [80 /* LocalizableTextTemplateLiteral */]: this.prototype.writeNodeDefault,
2035
- [81 /* TextTemplateSpanList */]: this.prototype.writeNodeDefault,
2036
- [82 /* TextTemplateSpan */]: this.prototype.writeNodeDefault,
2037
- [83 /* TokenExpression */]: this.prototype.writeNodeDefault,
2038
- [86 /* KeywordExpression */]: this.prototype.writeNodeDefault,
2039
- [87 /* ObjectExpression */]: this.prototype.writeNodeDefault,
2040
- [88 /* BaseExpression */]: this.prototype.writeNodeDefault,
2041
- [89 /* IdentifierExpression */]: this.prototype.writeNodeDefault,
2042
- [90 /* GenericSpecializationExpression */]: this.prototype.writeNodeDefault,
2043
- [91 /* DefaultMatchExpression */]: this.prototype.writeNodeDefault,
2044
- [92 /* AssignmentStatement */]: this.prototype.writeNodeDefault,
2045
- [93 /* StatementList */]: this.prototype.writeNodeDefault,
2046
- [96 /* BreakLoopStatement */]: this.prototype.writeNodeDefault,
2047
- [97 /* ContinueLoopStatement */]: this.prototype.writeNodeDefault,
2048
- [98 /* DisposeStatement */]: this.prototype.writeNodeDefault,
2049
- [99 /* RunStatement */]: this.prototype.writeNodeDefault,
2050
- [100 /* TryStatement */]: this.prototype.writeNodeDefault,
2051
- [101 /* CatchClause */]: this.prototype.writeNodeDefault,
2052
- [102 /* ErrorVariableDeclaration */]: this.prototype.writeNodeDefault,
2053
- [103 /* FinallyClause */]: this.prototype.writeNodeDefault,
2054
- [104 /* ErrorStatement */]: this.prototype.writeNodeDefault,
2055
- [105 /* ImportantStatement */]: this.prototype.writeNodeDefault,
2056
- [106 /* ExpressionStatement */]: this.prototype.writeNodeDefault,
2057
- [107 /* ForStatement */]: this.prototype.writeNodeDefault,
2058
- [108 /* IfStatement */]: this.prototype.writeNodeDefault,
2059
- [109 /* ElseIfClauseList */]: this.prototype.writeNodeDefault,
2060
- [110 /* ElseIfClause */]: this.prototype.writeNodeDefault,
2061
- [111 /* ElseClause */]: this.prototype.writeNodeDefault,
2062
- [112 /* MissingStatement */]: this.prototype.writeNodeDefault,
2063
- [113 /* NestedFunctionDeclarationStatement */]: this.prototype.writeNodeDefault,
2064
- [114 /* LocalVariableDeclarationStatement */]: this.prototype.writeNodeDefault,
2065
- [115 /* LoopStatement */]: this.prototype.writeNodeDefault,
2066
- [116 /* ReturnStatement */]: this.prototype.writeNodeDefault,
2067
- [117 /* CaseClauseList */]: this.prototype.writeNodeDefault,
2068
- [118 /* SwitchStatement */]: this.prototype.writeNodeDefault,
2069
- [119 /* MatchExpressionList */]: this.prototype.writeNodeDefault,
2070
- [120 /* CaseClause */]: this.prototype.writeNodeDefault,
2071
- [121 /* WhileStatement */]: this.prototype.writeNodeDefault,
2072
- [122 /* YieldStatement */]: this.prototype.writeNodeDefault,
2073
- [125 /* TranslationParameterList */]: this.prototype.writeNodeDefault,
2074
- [126 /* TranslationParameterClause */]: this.prototype.writeTranslationParameterClause,
2075
- [127 /* ConstructorTranslation */]: this.prototype.writeConstructorTranslation,
2076
- [128 /* IndexParameterTranslationClause */]: this.prototype.writeIndexParameterTranslationClause,
2077
- [129 /* IndexerTranslation */]: this.prototype.writeIndexerTranslation,
2078
- [130 /* TranslationTypeParameterList */]: this.prototype.writeNodeDefault,
2079
- [131 /* TranslationTypeParameterClause */]: this.prototype.writeTranslationTypeParameterClause,
2080
- [132 /* PackageFunctionTranslationDeclaration */]: this.prototype.writePackageFunctionTranslation,
2081
- [133 /* MethodTranslation */]: this.prototype.writeMethodTranslation,
2082
- [134 /* FunctionTypeTranslationDeclaration */]: this.prototype.writeFunctionTypeTranslation,
2083
- [136 /* PackageVariableTranslationDeclaration */]: this.prototype.writePackageVariableTranslation,
2084
- [137 /* FieldOrVariantTranslation */]: this.prototype.writeFieldOrVariantTranslation,
2085
- [138 /* TypeMemberTranslationList */]: this.prototype.writeNodeDefault,
2086
- [139 /* TypeTranslationDeclaration */]: this.prototype.writeTypeTranslation,
2087
- [140 /* TextTranslationDeclaration */]: this.prototype.writeNodeDefault,
2088
- [141 /* TextTranslationFunctionDeclaration */]: this.prototype.writeNodeDefault,
2089
- [151 /* TagList */]: this.prototype.writeNodeDefault,
2090
- [153 /* ModifierList */]: this.prototype.writeNodeDefault,
2091
- [158 /* TypeArgumentList */]: this.prototype.writeNodeDefault,
2092
- [160 /* TypeParameterList */]: this.prototype.writeNodeDefault,
2093
- [161 /* TypeAnnotation */]: this.prototype.writeNodeDefault,
2094
- [142 /* TranslationTextLiteral */]: this.prototype.writeNodeDefault,
2095
- [143 /* TranslationTextTemplate */]: this.prototype.writeNodeDefault,
2096
- [144 /* TranslationTextTemplateSpanList */]: this.prototype.writeNodeDefault,
2097
- [145 /* TranslationTextTemplateSpan */]: this.prototype.writeNodeDefault,
2098
- [146 /* TranslationTextTemplateParameter */]: this.prototype.writeNodeDefault
2063
+ [23 /* ReducedTypeDeclarationBody */]: this.prototype.writeNodeDefault,
2064
+ [31 /* TypeMemberDeclarationList */]: this.prototype.writeNodeDefault,
2065
+ [40 /* TypeExtensionDeclaration */]: this.prototype.writeNodeDefault,
2066
+ [41 /* ExtendedTypeClauseCommaList */]: this.prototype.writeNodeDefault,
2067
+ [42 /* ExtendedTypeClause */]: this.prototype.writeNodeDefault,
2068
+ [43 /* MissingPackageMemberDeclaration */]: this.prototype.writeNodeDefault,
2069
+ [49 /* IndexParameterClause */]: this.prototype.writeNodeDefault,
2070
+ [57 /* MissingTypeMemberDeclaration */]: this.prototype.writeNodeDefault,
2071
+ [58 /* NestedFunctionDeclaration */]: this.prototype.writeNodeDefault,
2072
+ [59 /* LocalVariableDeclaration */]: this.prototype.writeNodeDefault,
2073
+ [60 /* ForStatementVariableDeclaration */]: this.prototype.writeNodeDefault,
2074
+ [61 /* ArrayLiteral */]: this.prototype.writeNodeDefault,
2075
+ [62 /* ArrayLiteralElementList */]: this.prototype.writeNodeDefault,
2076
+ [63 /* AssertionExpression */]: this.prototype.writeNodeDefault,
2077
+ [64 /* AssumptionExpression */]: this.prototype.writeNodeDefault,
2078
+ [65 /* AsExpression */]: this.prototype.writeNodeDefault,
2079
+ [66 /* BinaryExpression */]: this.prototype.writeNodeDefault,
2080
+ [68 /* FunctionBlockLiteral */]: this.prototype.writeNodeDefault,
2081
+ [69 /* ArgumentList */]: this.prototype.writeNodeDefault,
2082
+ [70 /* CallExpression */]: this.prototype.writeNodeDefault,
2083
+ [71 /* AutotypeCallExpression */]: this.prototype.writeNodeDefault,
2084
+ [72 /* IndexedAccessExpression */]: this.prototype.writeNodeDefault,
2085
+ [73 /* MissingExpression */]: this.prototype.writeNodeDefault,
2086
+ [74 /* IsExpression */]: this.prototype.writeNodeDefault,
2087
+ [67 /* FunctionLiteral */]: this.prototype.writeNodeDefault,
2088
+ [75 /* ParenthesizedExpression */]: this.prototype.writeNodeDefault,
2089
+ [76 /* ConditionalExpression */]: this.prototype.writeNodeDefault,
2090
+ [77 /* PrefixUnaryExpression */]: this.prototype.writeNodeDefault,
2091
+ [78 /* MemberAccessExpression */]: this.prototype.writeNodeDefault,
2092
+ [79 /* ReferenceExpression */]: this.prototype.writeNodeDefault,
2093
+ [80 /* DereferenceExpression */]: this.prototype.writeNodeDefault,
2094
+ [86 /* TextLiteral */]: this.prototype.writeNodeDefault,
2095
+ [87 /* LocalizableTextLiteral */]: this.prototype.writeNodeDefault,
2096
+ [81 /* TextTemplateLiteral */]: this.prototype.writeNodeDefault,
2097
+ [82 /* LocalizableTextTemplateLiteral */]: this.prototype.writeNodeDefault,
2098
+ [83 /* TextTemplateSpanList */]: this.prototype.writeNodeDefault,
2099
+ [84 /* TextTemplateSpan */]: this.prototype.writeNodeDefault,
2100
+ [85 /* TokenExpression */]: this.prototype.writeNodeDefault,
2101
+ [88 /* KeywordExpression */]: this.prototype.writeNodeDefault,
2102
+ [89 /* ObjectExpression */]: this.prototype.writeNodeDefault,
2103
+ [90 /* BaseExpression */]: this.prototype.writeNodeDefault,
2104
+ [91 /* IdentifierExpression */]: this.prototype.writeNodeDefault,
2105
+ [92 /* GenericSpecializationExpression */]: this.prototype.writeNodeDefault,
2106
+ [93 /* DefaultMatchExpression */]: this.prototype.writeNodeDefault,
2107
+ [94 /* AssignmentStatement */]: this.prototype.writeNodeDefault,
2108
+ [95 /* StatementList */]: this.prototype.writeNodeDefault,
2109
+ [98 /* BreakLoopStatement */]: this.prototype.writeNodeDefault,
2110
+ [99 /* ContinueLoopStatement */]: this.prototype.writeNodeDefault,
2111
+ [100 /* DisposeStatement */]: this.prototype.writeNodeDefault,
2112
+ [101 /* RunStatement */]: this.prototype.writeNodeDefault,
2113
+ [102 /* TryStatement */]: this.prototype.writeNodeDefault,
2114
+ [103 /* CatchClause */]: this.prototype.writeNodeDefault,
2115
+ [104 /* ErrorVariableDeclaration */]: this.prototype.writeNodeDefault,
2116
+ [105 /* FinallyClause */]: this.prototype.writeNodeDefault,
2117
+ [106 /* ErrorStatement */]: this.prototype.writeNodeDefault,
2118
+ [107 /* ImportantStatement */]: this.prototype.writeNodeDefault,
2119
+ [108 /* ExpressionStatement */]: this.prototype.writeNodeDefault,
2120
+ [109 /* ForStatement */]: this.prototype.writeNodeDefault,
2121
+ [110 /* IfStatement */]: this.prototype.writeNodeDefault,
2122
+ [111 /* ElseIfClauseList */]: this.prototype.writeNodeDefault,
2123
+ [112 /* ElseIfClause */]: this.prototype.writeNodeDefault,
2124
+ [113 /* ElseClause */]: this.prototype.writeNodeDefault,
2125
+ [114 /* MissingStatement */]: this.prototype.writeNodeDefault,
2126
+ [115 /* NestedFunctionDeclarationStatement */]: this.prototype.writeNodeDefault,
2127
+ [116 /* LocalVariableDeclarationStatement */]: this.prototype.writeNodeDefault,
2128
+ [117 /* LoopStatement */]: this.prototype.writeNodeDefault,
2129
+ [118 /* ReturnStatement */]: this.prototype.writeNodeDefault,
2130
+ [119 /* CaseClauseList */]: this.prototype.writeNodeDefault,
2131
+ [120 /* SwitchStatement */]: this.prototype.writeNodeDefault,
2132
+ [121 /* MatchExpressionList */]: this.prototype.writeNodeDefault,
2133
+ [122 /* CaseClause */]: this.prototype.writeNodeDefault,
2134
+ [123 /* WhileStatement */]: this.prototype.writeNodeDefault,
2135
+ [124 /* YieldStatement */]: this.prototype.writeNodeDefault,
2136
+ [127 /* TranslationParameterList */]: this.prototype.writeNodeDefault,
2137
+ [128 /* TranslationParameterClause */]: this.prototype.writeTranslationParameterClause,
2138
+ [129 /* ConstructorTranslation */]: this.prototype.writeConstructorTranslation,
2139
+ [130 /* IndexParameterTranslationClause */]: this.prototype.writeIndexParameterTranslationClause,
2140
+ [131 /* IndexerTranslation */]: this.prototype.writeIndexerTranslation,
2141
+ [132 /* TranslationTypeParameterList */]: this.prototype.writeNodeDefault,
2142
+ [133 /* TranslationTypeParameterClause */]: this.prototype.writeTranslationTypeParameterClause,
2143
+ [134 /* PackageFunctionTranslationDeclaration */]: this.prototype.writePackageFunctionTranslation,
2144
+ [135 /* MethodTranslation */]: this.prototype.writeMethodTranslation,
2145
+ [136 /* FunctionTypeTranslationDeclaration */]: this.prototype.writeFunctionTypeTranslation,
2146
+ [138 /* PackageVariableTranslationDeclaration */]: this.prototype.writePackageVariableTranslation,
2147
+ [139 /* FieldOrVariantTranslation */]: this.prototype.writeFieldOrVariantTranslation,
2148
+ [140 /* TypeMemberTranslationList */]: this.prototype.writeNodeDefault,
2149
+ [141 /* TypeTranslationDeclaration */]: this.prototype.writeTypeTranslation,
2150
+ [142 /* TextTranslationDeclaration */]: this.prototype.writeNodeDefault,
2151
+ [143 /* TextTranslationFunctionDeclaration */]: this.prototype.writeNodeDefault,
2152
+ [153 /* TagList */]: this.prototype.writeNodeDefault,
2153
+ [155 /* ModifierList */]: this.prototype.writeNodeDefault,
2154
+ [160 /* TypeArgumentList */]: this.prototype.writeNodeDefault,
2155
+ [162 /* TypeParameterList */]: this.prototype.writeNodeDefault,
2156
+ [163 /* TypeAnnotation */]: this.prototype.writeNodeDefault,
2157
+ [144 /* TranslationTextLiteral */]: this.prototype.writeNodeDefault,
2158
+ [145 /* TranslationTextTemplate */]: this.prototype.writeNodeDefault,
2159
+ [146 /* TranslationTextTemplateSpanList */]: this.prototype.writeNodeDefault,
2160
+ [147 /* TranslationTextTemplateSpan */]: this.prototype.writeNodeDefault,
2161
+ [148 /* TranslationTextTemplateParameter */]: this.prototype.writeNodeDefault
2099
2162
  };
2100
2163
  return writeFunctions;
2101
2164
  }
@@ -2107,13 +2170,13 @@ var SyntaxToCode = class _SyntaxToCode {
2107
2170
  var backSlashRegExp = /\\/g;
2108
2171
  var singleQuoteRegExp = /'/g;
2109
2172
  var modifierSortOrder = {
2110
- [37 /* Hidden */]: 0,
2111
- [41 /* Static */]: 1,
2112
- [17 /* Basic */]: 2,
2113
- [38 /* Abstract */]: 3,
2114
- [39 /* Override */]: 4,
2115
- [40 /* Async */]: 5,
2116
- [36 /* Const */]: 6
2173
+ [38 /* Hidden */]: 0,
2174
+ [42 /* Static */]: 1,
2175
+ [18 /* Basic */]: 2,
2176
+ [39 /* Abstract */]: 3,
2177
+ [40 /* Override */]: 4,
2178
+ [41 /* Async */]: 5,
2179
+ [37 /* Const */]: 6
2117
2180
  };
2118
2181
 
2119
2182
  // source/services/TreeUtils.ts
@@ -2304,28 +2367,28 @@ var TranslationsGenerationService = class {
2304
2367
  return void 0;
2305
2368
  }
2306
2369
  let result;
2307
- if (tokenOrKeyword.isToken(9 /* Identifier */) && tokenOrKeyword.parent.kind === 139 /* TypeTranslationDeclaration */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
2370
+ if (tokenOrKeyword.isToken(9 /* Identifier */) && tokenOrKeyword.parent.kind === 141 /* TypeTranslationDeclaration */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
2308
2371
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
2309
2372
  if (translationPackage !== void 0) {
2310
2373
  const generator = new TranslationsGenerator(
2311
2374
  analyzer,
2312
2375
  sourceFile,
2313
2376
  translationPackage,
2314
- sourceFile.package.locale,
2315
- sourceFile.package.dialect
2377
+ sourceFile.locale,
2378
+ sourceFile.dialect
2316
2379
  );
2317
2380
  result = generator.generateMissingTypeMemberTranslations(tokenOrKeyword.parent);
2318
2381
  }
2319
2382
  }
2320
- if (result === void 0 && tokenOrKeyword.isKeyword(55 /* Translations */) && tokenOrKeyword.parent.kind === 123 /* TranslationsDeclaration */) {
2383
+ if (result === void 0 && tokenOrKeyword.isKeyword(56 /* Translations */) && tokenOrKeyword.parent.kind === 125 /* TranslationsDeclaration */) {
2321
2384
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
2322
2385
  if (translationPackage !== void 0) {
2323
2386
  const generator = new TranslationsGenerator(
2324
2387
  analyzer,
2325
2388
  sourceFile,
2326
2389
  translationPackage,
2327
- sourceFile.package.locale,
2328
- sourceFile.package.dialect
2390
+ sourceFile.locale,
2391
+ sourceFile.dialect
2329
2392
  );
2330
2393
  if (onlyTypeMembers) {
2331
2394
  result = generator.generateMissingTranslationsForPartiallyTranslatedTypes(tokenOrKeyword.parent);
@@ -2344,7 +2407,7 @@ var TranslationsGenerationService = class {
2344
2407
  if (tokenOrKeyword === void 0) {
2345
2408
  return false;
2346
2409
  }
2347
- if (!(tokenOrKeyword.isKeyword(55 /* Translations */) && tokenOrKeyword.parent.kind === 123 /* TranslationsDeclaration */)) {
2410
+ if (!(tokenOrKeyword.isKeyword(56 /* Translations */) && tokenOrKeyword.parent.kind === 125 /* TranslationsDeclaration */)) {
2348
2411
  return false;
2349
2412
  }
2350
2413
  const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
@@ -2355,10 +2418,10 @@ var TranslationsGenerationService = class {
2355
2418
  analyzer,
2356
2419
  sourceFile,
2357
2420
  translationPackage,
2358
- sourceFile.package.locale,
2359
- sourceFile.package.dialect
2421
+ sourceFile.locale,
2422
+ sourceFile.dialect
2360
2423
  );
2361
- return Query.from(tokenOrKeyword.parent.translationList.translationDeclarations).filter((t) => t.kind === 139 /* TypeTranslationDeclaration */).mapAndFilter((t) => translationPackage.getPackageMemberTranslationTargets(t)?.values).flatMap((t) => t).any((t) => isPackageTypeEntity(t) && generator.collectNotTranslatedTypeMembers(t).length > 0);
2424
+ return Query.from(tokenOrKeyword.parent.translationList.translationDeclarations).filter((t) => t.kind === 141 /* TypeTranslationDeclaration */).mapAndFilter((t) => translationPackage.getPackageMemberTranslationTargets(t)?.values).flatMap((t) => t).any((t) => isPackageTypeEntity(t) && generator.collectNotTranslatedTypeMembers(t).length > 0);
2362
2425
  }
2363
2426
  };
2364
2427
  var TranslationsGenerator = class _TranslationsGenerator {
@@ -2386,7 +2449,7 @@ var TranslationsGenerator = class _TranslationsGenerator {
2386
2449
  };
2387
2450
  const memberTranslationsCode = Query.from(memberEntities).mapAndFilter((m) => this.createPackageMemberTranslationNode(m)).uniqueWithComparator(compareNodes).map((n) => {
2388
2451
  const code = new SyntaxToCode(n, syntaxToCodeOptions).convert();
2389
- if (n.kind === 139 /* TypeTranslationDeclaration */) {
2452
+ if (n.kind === 141 /* TypeTranslationDeclaration */) {
2390
2453
  const startOffset = Math.max(code.indexOf(newLine), 0);
2391
2454
  return this.addNewLineBeforeArrowsInTranslation(
2392
2455
  code,
@@ -2418,7 +2481,7 @@ var TranslationsGenerator = class _TranslationsGenerator {
2418
2481
  generateMissingTranslationsForPartiallyTranslatedTypes(translationsDeclaration) {
2419
2482
  const result = new Array();
2420
2483
  for (const translation of translationsDeclaration.translationList.translationDeclarations) {
2421
- if (translation.kind === 139 /* TypeTranslationDeclaration */) {
2484
+ if (translation.kind === 141 /* TypeTranslationDeclaration */) {
2422
2485
  const edits = this.generateMissingTypeMemberTranslations(translation);
2423
2486
  if (edits !== void 0) {
2424
2487
  result.push(...edits);
@@ -2486,13 +2549,13 @@ var TranslationsGenerator = class _TranslationsGenerator {
2486
2549
  }
2487
2550
  detectIndentationStepForTypeMemberTranslations(node) {
2488
2551
  let indentationStepSize;
2489
- if (node.kind === 139 /* TypeTranslationDeclaration */) {
2552
+ if (node.kind === 141 /* TypeTranslationDeclaration */) {
2490
2553
  indentationStepSize = tryDetectIndentationStepSizeUsingTypeTranslation(node, this.sourceFile);
2491
2554
  }
2492
2555
  if (indentationStepSize === void 0) {
2493
- const translationsDeclarations = node.kind === 123 /* TranslationsDeclaration */ ? node : node.parent.parent;
2556
+ const translationsDeclarations = node.kind === 125 /* TranslationsDeclaration */ ? node : node.parent.parent;
2494
2557
  for (const member of translationsDeclarations.translationList.translationDeclarations) {
2495
- if (member.kind === 139 /* TypeTranslationDeclaration */) {
2558
+ if (member.kind === 141 /* TypeTranslationDeclaration */) {
2496
2559
  indentationStepSize = tryDetectIndentationStepSizeUsingTypeTranslation(member, this.sourceFile);
2497
2560
  if (indentationStepSize !== void 0) {
2498
2561
  break;
@@ -2674,7 +2737,7 @@ var CodeActionsService = class {
2674
2737
  }
2675
2738
  const result = new Array();
2676
2739
  const diagnosticCodeSet = new Set(diagnosticCodes);
2677
- if (diagnosticCodeSet.has(2087 /* TheFollowingDeclarationsAreNotTranslated0 */) || diagnosticCodeSet.has(2088 /* TheFollowingDeclarationsAreNotTranslated0And1More */)) {
2740
+ if (diagnosticCodeSet.has(2090 /* TheFollowingDeclarationsAreNotTranslated0 */) || diagnosticCodeSet.has(2091 /* TheFollowingDeclarationsAreNotTranslated0And1More */)) {
2678
2741
  const data = { onlyTypeMembers: false };
2679
2742
  result.push(CodeAction.unresolved(
2680
2743
  "\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.",
@@ -2773,13 +2836,13 @@ var ArgumentFactory = class _ArgumentFactory {
2773
2836
  var SignatureForNode = class _SignatureForNode {
2774
2837
  static getSignaturesForNode(analyzer, node) {
2775
2838
  switch (node.kind) {
2776
- case 68 /* CallExpression */:
2839
+ case 70 /* CallExpression */:
2777
2840
  return _SignatureForNode.getSignaturesForCallExpression(analyzer, node);
2778
- case 69 /* AutotypeCallExpression */:
2841
+ case 71 /* AutotypeCallExpression */:
2779
2842
  return _SignatureForNode.getSignaturesForAutotypeCallExpression(analyzer, node);
2780
- case 70 /* IndexedAccessExpression */:
2843
+ case 72 /* IndexedAccessExpression */:
2781
2844
  return _SignatureForNode.getSignaturesForIndexedAccessExpression(analyzer, node);
2782
- case 152 /* Tag */:
2845
+ case 154 /* Tag */:
2783
2846
  return _SignatureForNode.getSignaturesForTag(analyzer, node);
2784
2847
  default:
2785
2848
  Debug.never(node);
@@ -2984,7 +3047,7 @@ var SimplifiedOverloadResolver = class _SimplifiedOverloadResolver {
2984
3047
  result = false;
2985
3048
  break;
2986
3049
  }
2987
- if (argument.expression === void 0 || argument.expression.kind === 71 /* MissingExpression */) {
3050
+ if (argument.expression === void 0 || argument.expression.kind === 73 /* MissingExpression */) {
2988
3051
  continue;
2989
3052
  }
2990
3053
  const targetParameterType = targetParameter.getType();
@@ -3117,8 +3180,8 @@ var CompletionService = class {
3117
3180
  this.sourceFile = sourceFile;
3118
3181
  this.analyzer = analyzer;
3119
3182
  this.completionItemInfoContext_.clear();
3120
- this.locale = sourceFile.package.locale;
3121
- this.dialect = sourceFile.package.dialect;
3183
+ this.locale = sourceFile.locale;
3184
+ this.dialect = sourceFile.dialect;
3122
3185
  const positionDescription = this.createPositionDescription(sourceFile.getSyntaxNode(), offset);
3123
3186
  const semanticContext = this.createSemanticContextAtPosition(positionDescription);
3124
3187
  const syntaxContext = SyntaxContextFactory.fromPositionDescription(sourceFile, positionDescription);
@@ -3193,11 +3256,11 @@ var CompletionService = class {
3193
3256
  if (syntaxContext.isInComment || syntaxContext.isInText) {
3194
3257
  return { kind: "none" };
3195
3258
  }
3196
- if (syntaxContext.isInQuotedIdentifier !== void 0 && (syntaxContext.isInQuotedIdentifier.parent.kind === 51 /* OperatorDeclaration */ || syntaxContext.isInQuotedIdentifier.parent.kind === 50 /* MethodDeclaration */)) {
3259
+ if (syntaxContext.isInQuotedIdentifier !== void 0 && (syntaxContext.isInQuotedIdentifier.parent.kind === 53 /* OperatorDeclaration */ || syntaxContext.isInQuotedIdentifier.parent.kind === 52 /* MethodDeclaration */)) {
3197
3260
  return new OperatorNameCompletionContext(syntaxContext.isInQuotedIdentifier);
3198
3261
  }
3199
3262
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3200
- if (tokenOrKeyword.isKeyword(18 /* Import */) && tokenOrKeyword.parent.kind === 5 /* SinglePackageImportDirective */) {
3263
+ if (tokenOrKeyword.isKeyword(19 /* Import */) && tokenOrKeyword.parent.kind === 5 /* SinglePackageImportDirective */) {
3201
3264
  return new PackageImportCompletionContext([], void 0);
3202
3265
  }
3203
3266
  if (tokenOrKeyword.isToken(64 /* Equals */) && tokenOrKeyword.parent.kind === 8 /* PackageImport */) {
@@ -3211,7 +3274,7 @@ var CompletionService = class {
3211
3274
  if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || this.tokenOrKeywordIsPackageImportListChild(tokenOrKeyword)) {
3212
3275
  return new PackageImportCompletionContext([], void 0);
3213
3276
  }
3214
- if (tokenOrKeyword.isToken(28 /* Dot */) && tokenOrKeyword.parent.kind === 76 /* MemberAccessExpression */) {
3277
+ if (tokenOrKeyword.isToken(28 /* Dot */) && tokenOrKeyword.parent.kind === 78 /* MemberAccessExpression */) {
3215
3278
  const memberAccess = tokenOrKeyword.parent;
3216
3279
  {
3217
3280
  const packageTreeNode = this.analyzer.getDenotedPackageNameTreeNode(memberAccess.expression);
@@ -3220,8 +3283,8 @@ var CompletionService = class {
3220
3283
  if (packageTreeNode.package !== void 0) {
3221
3284
  lookup = new PackageMemberLookup(packageTreeNode.package);
3222
3285
  }
3223
- const hidingMatcher2 = semanticContext.getHidingMatcher();
3224
- return new PackageNameSegmentCompletionContext(packageTreeNode, lookup, hidingMatcher2);
3286
+ const lookupContext2 = semanticContext.getPackageMemberLookupContext();
3287
+ return new PackageNameSegmentCompletionContext(packageTreeNode, lookup, lookupContext2);
3225
3288
  }
3226
3289
  }
3227
3290
  {
@@ -3230,18 +3293,22 @@ var CompletionService = class {
3230
3293
  const package_ = packageAlias.getPackage();
3231
3294
  if (package_ !== void 0) {
3232
3295
  const lookup = new PackageMemberLookup(package_);
3233
- const hidingMatcher2 = semanticContext.getHidingMatcher();
3234
- return new PackageAliasMemberCompletionContext(lookup, hidingMatcher2);
3296
+ const lookupContext2 = semanticContext.getPackageMemberLookupContext();
3297
+ return new PackageAliasMemberCompletionContext(lookup, lookupContext2);
3235
3298
  }
3236
3299
  return { kind: "none" };
3237
3300
  }
3238
3301
  }
3239
3302
  const type = this.analyzer.type.ofExpression(memberAccess.expression);
3240
3303
  const isStaticAccess = this.analyzer.isExpressionDenotingType(memberAccess.expression);
3241
- const hidingMatcher = semanticContext.getHidingMatcher();
3242
- return new TypeMemberCompletionContext(type, isStaticAccess, hidingMatcher, semanticContext);
3304
+ let lookupOptions = isStaticAccess ? 2 /* OnlyStaticMembers */ : 1 /* OnlyInstanceMembers */;
3305
+ if (this.analyzer.isPossiblyCastedBaseExpression(memberAccess.expression)) {
3306
+ lookupOptions |= 8 /* CheckAccessibilityIgnoringReceiverType */;
3307
+ }
3308
+ const lookupContext = semanticContext.getTypeMemberLookupContext();
3309
+ return new TypeMemberCompletionContext(type, lookupContext, lookupOptions);
3243
3310
  }
3244
- if (tokenOrKeyword.isToken(28 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
3311
+ if (tokenOrKeyword.isToken(28 /* Dot */) && tokenOrKeyword.parent.kind === 137 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
3245
3312
  const namedTypeSpecifier = tokenOrKeyword.parent.parent;
3246
3313
  const resolutionResult = this.analyzer.resolveNamedTypeSpecifier(namedTypeSpecifier);
3247
3314
  const segmentIndex = Math.floor(
@@ -3249,7 +3316,7 @@ var CompletionService = class {
3249
3316
  );
3250
3317
  if (segmentIndex < resolutionResult.resolvedQualifiers.length) {
3251
3318
  let completionInIsOrAsExpressionInfo;
3252
- if (namedTypeSpecifier.parent.kind === 72 /* IsExpression */ || namedTypeSpecifier.parent.kind === 63 /* AsExpression */) {
3319
+ if (namedTypeSpecifier.parent.kind === 74 /* IsExpression */ || namedTypeSpecifier.parent.kind === 65 /* AsExpression */) {
3253
3320
  completionInIsOrAsExpressionInfo = {
3254
3321
  expressionType: this.analyzer.type.ofExpression(namedTypeSpecifier.parent.expression)
3255
3322
  };
@@ -3260,11 +3327,11 @@ var CompletionService = class {
3260
3327
  if (resolvedQualifier.packageTreeNode.package !== void 0) {
3261
3328
  lookup = new PackageMemberLookup(resolvedQualifier.packageTreeNode.package);
3262
3329
  }
3263
- const hidingMatcher = semanticContext.getHidingMatcher();
3330
+ const lookupContext = semanticContext.getPackageMemberLookupContext();
3264
3331
  const typeSearchLocation = new PackageNameSegmentTypeSearchLocation(
3265
3332
  resolvedQualifier.packageTreeNode,
3266
3333
  lookup,
3267
- hidingMatcher
3334
+ lookupContext
3268
3335
  );
3269
3336
  return new TypeCompletionContext(typeSearchLocation, completionInIsOrAsExpressionInfo);
3270
3337
  }
@@ -3272,15 +3339,15 @@ var CompletionService = class {
3272
3339
  const package_ = resolvedQualifier.packageAlias.getPackage();
3273
3340
  if (package_ !== void 0) {
3274
3341
  const lookup = new PackageMemberLookup(package_);
3275
- const hidingMatcher = semanticContext.getHidingMatcher();
3276
- const typeSearchLocation = new PackageAliasTypeSearchLocation(lookup, hidingMatcher);
3342
+ const lookupContext = semanticContext.getPackageMemberLookupContext();
3343
+ const typeSearchLocation = new PackageAliasTypeSearchLocation(lookup, lookupContext);
3277
3344
  return new TypeCompletionContext(typeSearchLocation, completionInIsOrAsExpressionInfo);
3278
3345
  }
3279
3346
  }
3280
3347
  }
3281
3348
  return { kind: "none" };
3282
3349
  }
3283
- if (tokenOrKeyword.isToken(28 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 152 /* Tag */) {
3350
+ if (tokenOrKeyword.isToken(28 /* Dot */) && tokenOrKeyword.parent.kind === 137 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 154 /* Tag */) {
3284
3351
  const tag = tokenOrKeyword.parent.parent;
3285
3352
  const resolutionResult = this.analyzer.resolveTag(tag);
3286
3353
  const segmentIndex = Math.floor(
@@ -3293,11 +3360,11 @@ var CompletionService = class {
3293
3360
  if (resolvedQualifier.packageTreeNode.package !== void 0) {
3294
3361
  lookup = new PackageMemberLookup(resolvedQualifier.packageTreeNode.package);
3295
3362
  }
3296
- const hidingMatcher = semanticContext.getHidingMatcher();
3363
+ const lookupContext = semanticContext.getPackageMemberLookupContext();
3297
3364
  const typeSearchLocation = new PackageNameSegmentTypeSearchLocation(
3298
3365
  resolvedQualifier.packageTreeNode,
3299
3366
  lookup,
3300
- hidingMatcher
3367
+ lookupContext
3301
3368
  );
3302
3369
  return new TagCompletionContext(typeSearchLocation);
3303
3370
  }
@@ -3305,8 +3372,8 @@ var CompletionService = class {
3305
3372
  const package_ = resolvedQualifier.packageAlias.getPackage();
3306
3373
  if (package_ !== void 0) {
3307
3374
  const lookup = new PackageMemberLookup(package_);
3308
- const hidingMatcher = semanticContext.getHidingMatcher();
3309
- const typeSearchLocation = new PackageAliasTypeSearchLocation(lookup, hidingMatcher);
3375
+ const lookupContext = semanticContext.getPackageMemberLookupContext();
3376
+ const typeSearchLocation = new PackageAliasTagSearchLocation(lookup, lookupContext);
3310
3377
  return new TagCompletionContext(typeSearchLocation);
3311
3378
  }
3312
3379
  }
@@ -3315,7 +3382,7 @@ var CompletionService = class {
3315
3382
  }
3316
3383
  if (syntaxContext.isUnqualifiedTypeContext !== void 0) {
3317
3384
  let completionInIsOrAsExpressionInfo;
3318
- if (tokenOrKeyword.parent.kind === 72 /* IsExpression */ || tokenOrKeyword.parent.kind === 63 /* AsExpression */) {
3385
+ if (tokenOrKeyword.parent.kind === 74 /* IsExpression */ || tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
3319
3386
  completionInIsOrAsExpressionInfo = {
3320
3387
  expressionType: this.analyzer.type.ofExpression(tokenOrKeyword.parent.expression)
3321
3388
  };
@@ -3366,22 +3433,22 @@ var CompletionService = class {
3366
3433
  translationKind = 0 /* Any */;
3367
3434
  hasPrecedingKeyword = false;
3368
3435
  }
3369
- if (tokenOrKeyword.isKeyword(16 /* Type */) && (tokenOrKeyword.parent.kind === 139 /* TypeTranslationDeclaration */ || tokenOrKeyword.parent.kind === 134 /* FunctionTypeTranslationDeclaration */)) {
3436
+ if (tokenOrKeyword.isKeyword(17 /* Type */) && (tokenOrKeyword.parent.kind === 141 /* TypeTranslationDeclaration */ || tokenOrKeyword.parent.kind === 136 /* FunctionTypeTranslationDeclaration */)) {
3370
3437
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3371
3438
  translationKind = 2 /* Type */;
3372
3439
  hasPrecedingKeyword = true;
3373
3440
  }
3374
- if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 132 /* PackageFunctionTranslationDeclaration */) {
3441
+ if (tokenOrKeyword.isKeyword(13 /* Function */) && tokenOrKeyword.parent.kind === 134 /* PackageFunctionTranslationDeclaration */) {
3375
3442
  translationsDeclaration = tokenOrKeyword.parent.parent.parent;
3376
3443
  translationKind = 1 /* Method */;
3377
3444
  hasPrecedingKeyword = true;
3378
3445
  }
3379
3446
  if (translationsDeclaration !== void 0) {
3380
3447
  const translatedPackageMemberLookup = new PackageMemberLookup(translationPackage.getTargetPackage());
3381
- const hidingMatcher = semanticContext.getHidingMatcher();
3448
+ const lookupContext = semanticContext.getPackageMemberLookupContext();
3382
3449
  return new TopLevelTranslationListCompletionContext(
3383
3450
  translatedPackageMemberLookup,
3384
- hidingMatcher,
3451
+ lookupContext,
3385
3452
  translationKind,
3386
3453
  hasPrecedingKeyword
3387
3454
  );
@@ -3405,12 +3472,12 @@ var CompletionService = class {
3405
3472
  translationKind = 0 /* Any */;
3406
3473
  hasPrecedingKeyword = false;
3407
3474
  }
3408
- if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 133 /* MethodTranslation */) {
3475
+ if (tokenOrKeyword.isKeyword(13 /* Function */) && tokenOrKeyword.parent.kind === 135 /* MethodTranslation */) {
3409
3476
  typeTranslation = tokenOrKeyword.parent.parent.parent;
3410
3477
  translationKind = 1 /* Method */;
3411
3478
  hasPrecedingKeyword = true;
3412
3479
  }
3413
- if (tokenOrKeyword.isKeyword(31 /* Creation */) && tokenOrKeyword.parent.kind === 127 /* ConstructorTranslation */) {
3480
+ if (tokenOrKeyword.isKeyword(32 /* Creation */) && tokenOrKeyword.parent.kind === 129 /* ConstructorTranslation */) {
3414
3481
  typeTranslation = tokenOrKeyword.parent.parent.parent;
3415
3482
  translationKind = 3 /* Constructor */;
3416
3483
  hasPrecedingKeyword = true;
@@ -3424,8 +3491,7 @@ var CompletionService = class {
3424
3491
  type = translationTargets[0];
3425
3492
  }
3426
3493
  }
3427
- const hidingMatcher = semanticContext.getHidingMatcher();
3428
- return new TypeMemberTranslationListCompletionContext(type, hidingMatcher, translationKind, hasPrecedingKeyword);
3494
+ return new TypeMemberTranslationListCompletionContext(type, translationKind, hasPrecedingKeyword);
3429
3495
  }
3430
3496
  return void 0;
3431
3497
  }
@@ -3434,19 +3500,19 @@ var CompletionService = class {
3434
3500
  let signatures;
3435
3501
  let args;
3436
3502
  switch (role.argumentList.parent.kind) {
3437
- case 68 /* CallExpression */:
3503
+ case 70 /* CallExpression */:
3438
3504
  signatures = SignatureForNode.getSignaturesForCallExpression(this.analyzer, role.argumentList.parent);
3439
3505
  args = ArgumentFactory.createArgumentsOfCallExpression(role.argumentList.parent);
3440
3506
  break;
3441
- case 69 /* AutotypeCallExpression */:
3507
+ case 71 /* AutotypeCallExpression */:
3442
3508
  signatures = SignatureForNode.getSignaturesForAutotypeCallExpression(this.analyzer, role.argumentList.parent);
3443
3509
  args = ArgumentFactory.createArgumentsOfAutotypeCallExpression(role.argumentList.parent);
3444
3510
  break;
3445
- case 152 /* Tag */:
3511
+ case 154 /* Tag */:
3446
3512
  signatures = SignatureForNode.getSignaturesForTag(this.analyzer, role.argumentList.parent);
3447
3513
  args = ArgumentFactory.createArgumentsOfTag(role.argumentList.parent);
3448
3514
  break;
3449
- case 70 /* IndexedAccessExpression */:
3515
+ case 72 /* IndexedAccessExpression */:
3450
3516
  signatures = SignatureForNode.getSignaturesForIndexedAccessExpression(
3451
3517
  this.analyzer,
3452
3518
  role.argumentList.parent
@@ -3582,22 +3648,22 @@ var CompletionService = class {
3582
3648
  }
3583
3649
  const kinds = /* @__PURE__ */ new Set();
3584
3650
  if (syntaxContext.isPackageMemberDeclarationListContext) {
3585
- kinds.add(18 /* Import */).add(7 /* Run */).add(31 /* Creation */).add(12 /* Function */).add(17 /* Basic */).add(16 /* Type */).add(58 /* Get */).add(59 /* Set */).add(55 /* Translations */);
3651
+ kinds.add(19 /* Import */).add(8 /* Run */).add(32 /* Creation */).add(13 /* Function */).add(18 /* Basic */).add(17 /* Type */).add(59 /* Get */).add(60 /* Set */).add(56 /* Translations */);
3586
3652
  }
3587
3653
  if (syntaxContext.isPackageMemberDeclarationListContext || syntaxContext.isTypeMemberDeclarationListContext) {
3588
- kinds.add(37 /* Hidden */).add(41 /* Static */).add(17 /* Basic */).add(38 /* Abstract */).add(39 /* Override */).add(40 /* Async */).add(36 /* Const */);
3654
+ kinds.add(38 /* Hidden */).add(42 /* Static */).add(18 /* Basic */).add(39 /* Abstract */).add(40 /* Override */).add(41 /* Async */).add(37 /* Const */);
3589
3655
  }
3590
3656
  if (syntaxContext.isTypeMemberDeclarationListContext) {
3591
- kinds.add(31 /* Creation */).add(12 /* Function */).add(47 /* Destruction */).add(58 /* Get */).add(59 /* Set */);
3657
+ kinds.add(32 /* Creation */).add(13 /* Function */).add(48 /* Destruction */).add(59 /* Get */).add(60 /* Set */);
3592
3658
  }
3593
3659
  if (syntaxContext.isStatementContext) {
3594
- kinds.add(7 /* Run */).add(35 /* For */).add(25 /* While */).add(26 /* Loop */).add(15 /* Return */).add(20 /* Error */).add(19 /* Important */).add(28 /* Yield */).add(33 /* BreakLoop */).add(34 /* ContinueLoop */).add(13 /* If */).add(44 /* Switch */).add(1 /* Let */).add(36 /* Const */).add(46 /* Dispose */).add(8 /* Try */).add(12 /* Function */).add(40 /* Async */);
3660
+ kinds.add(8 /* Run */).add(36 /* For */).add(26 /* While */).add(27 /* Loop */).add(16 /* Return */).add(21 /* Error */).add(20 /* Important */).add(29 /* Yield */).add(34 /* BreakLoop */).add(35 /* ContinueLoop */).add(14 /* If */).add(45 /* Switch */).add(1 /* Let */).add(37 /* Const */).add(47 /* Dispose */).add(9 /* Try */).add(13 /* Function */).add(41 /* Async */);
3595
3661
  }
3596
3662
  if (this.isFromKeywordContext(positionDescription)) {
3597
- kinds.add(9 /* From */);
3663
+ kinds.add(10 /* From */);
3598
3664
  }
3599
3665
  if (syntaxContext.isExpressionContext !== void 0) {
3600
- kinds.add(43 /* Not */).add(52 /* Yes */).add(53 /* No */).add(57 /* Null */).add(40 /* Async */).add(12 /* Function */).add(54 /* Reference */).add(2 /* Autotype */).add(30 /* Cond */);
3666
+ kinds.add(44 /* Not */).add(53 /* Yes */).add(54 /* No */).add(58 /* Null */).add(41 /* Async */).add(13 /* Function */).add(55 /* Reference */).add(2 /* Autotype */).add(31 /* Cond */);
3601
3667
  if (positionDescription.kind === "after-token-or-keyword") {
3602
3668
  const container = semanticContext.getContainingTypeOrTypeExtension();
3603
3669
  if (container !== void 0) {
@@ -3605,41 +3671,41 @@ var CompletionService = class {
3605
3671
  if (container.kind === "type") {
3606
3672
  const typeEntity = container.value;
3607
3673
  if (typeEntity?.typeEntityKind === 1 /* Structured */ && typeEntity.getBaseObjectType() !== void 0 || typeEntity?.typeEntityKind === 3 /* Variant */ || typeEntity?.typeEntityKind === 4 /* Alias */) {
3608
- kinds.add(56 /* Base */);
3674
+ kinds.add(57 /* Base */);
3609
3675
  }
3610
3676
  }
3611
3677
  }
3612
3678
  }
3613
3679
  }
3614
3680
  if (this.isTypeKindCompletionContext(positionDescription)) {
3615
- kinds.add(4 /* Object */).add(5 /* PlainObject */).add(3 /* Aspect */).add(6 /* Variant */).add(12 /* Function */).add(40 /* Async */);
3681
+ kinds.add(4 /* Object */).add(5 /* PlainObject */).add(3 /* Aspect */).add(6 /* ReducedObject */).add(7 /* Variant */).add(13 /* Function */).add(41 /* Async */);
3616
3682
  }
3617
3683
  if (this.isCaseKeywordContext(positionDescription, syntaxContext)) {
3618
- kinds.add(45 /* Case */);
3684
+ kinds.add(46 /* Case */);
3619
3685
  }
3620
3686
  if (this.isCatchKeywordContext(positionDescription)) {
3621
- kinds.add(32 /* Catch */);
3687
+ kinds.add(33 /* Catch */);
3622
3688
  }
3623
3689
  if (this.isFinallyKeywordContext(positionDescription)) {
3624
- kinds.add(21 /* Finally */);
3690
+ kinds.add(22 /* Finally */);
3625
3691
  }
3626
3692
  if (this.isElseOrElseIfKeywordContext(positionDescription)) {
3627
- kinds.add(10 /* Else */).add(11 /* ElseIf */);
3693
+ kinds.add(11 /* Else */).add(12 /* ElseIf */);
3628
3694
  }
3629
3695
  if (syntaxContext.precedingExpression !== void 0) {
3630
- kinds.add(42 /* As */).add(14 /* Is */).add(22 /* And */).add(23 /* Or */).add(24 /* Xor */).add(29 /* When */);
3696
+ kinds.add(43 /* As */).add(15 /* Is */).add(23 /* And */).add(24 /* Or */).add(25 /* Xor */).add(30 /* When */);
3631
3697
  }
3632
3698
  if (this.isModifierLevelContext(positionDescription)) {
3633
- kinds.add(51 /* InType */).add(48 /* InHierarchy */).add(49 /* InFile */).add(50 /* InPackage */);
3699
+ kinds.add(52 /* InType */).add(49 /* InHierarchy */).add(50 /* InFile */).add(51 /* InPackage */);
3634
3700
  }
3635
3701
  if (this.isRepeatWhileKeywordContext(positionDescription)) {
3636
- kinds.add(27 /* RepeatWhile */);
3702
+ kinds.add(28 /* RepeatWhile */);
3637
3703
  }
3638
3704
  if (syntaxContext.isUnqualifiedTypeContext?.allowsAnonymousTypes === true) {
3639
- kinds.add(5 /* PlainObject */).add(4 /* Object */).add(6 /* Variant */).add(3 /* Aspect */).add(12 /* Function */).add(40 /* Async */);
3705
+ kinds.add(5 /* PlainObject */).add(4 /* Object */).add(7 /* Variant */).add(3 /* Aspect */).add(13 /* Function */).add(41 /* Async */);
3640
3706
  }
3641
- if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(40 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 56 /* NestedFunctionDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 65 /* FunctionLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 27 /* FunctionTypeDeclarationBody */)) {
3642
- kinds.add(12 /* Function */);
3707
+ if (positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isKeyword(41 /* Async */) && (positionDescription.tokenOrKeyword.parent.kind === 58 /* NestedFunctionDeclaration */ || positionDescription.tokenOrKeyword.parent.kind === 67 /* FunctionLiteral */ || positionDescription.tokenOrKeyword.parent.kind === 29 /* FunctionTypeDeclarationBody */)) {
3708
+ kinds.add(13 /* Function */);
3643
3709
  }
3644
3710
  return Query.from(kinds.values()).map((k) => LocalizationHelper.localizeKeyword(k, this.locale, this.dialect).map((v) => new KeywordCompletionItemInfo(this.completionItemInfoContext, k, v.value))).flatMap((i) => i).toArray();
3645
3711
  }
@@ -3648,35 +3714,35 @@ var CompletionService = class {
3648
3714
  return false;
3649
3715
  }
3650
3716
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3651
- return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 115 /* LoopStatement */;
3717
+ return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 96 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 117 /* LoopStatement */;
3652
3718
  }
3653
3719
  isModifierLevelContext(positionDescription) {
3654
3720
  if (positionDescription.kind !== "after-token-or-keyword") {
3655
3721
  return false;
3656
3722
  }
3657
3723
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3658
- return tokenOrKeyword.isToken(47 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 154 /* Modifier */;
3724
+ return tokenOrKeyword.isToken(47 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 156 /* Modifier */;
3659
3725
  }
3660
3726
  isElseOrElseIfKeywordContext(positionDescription) {
3661
3727
  if (positionDescription.kind !== "after-token-or-keyword") {
3662
3728
  return false;
3663
3729
  }
3664
3730
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3665
- return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 108 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.block || tokenOrKeyword.parent.parent.kind === 110 /* ElseIfClause */);
3731
+ return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 96 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 110 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.block || tokenOrKeyword.parent.parent.kind === 112 /* ElseIfClause */);
3666
3732
  }
3667
3733
  isCatchKeywordContext(positionDescription) {
3668
3734
  if (positionDescription.kind !== "after-token-or-keyword") {
3669
3735
  return false;
3670
3736
  }
3671
3737
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3672
- return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 100 /* TryStatement */;
3738
+ return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 96 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 102 /* TryStatement */;
3673
3739
  }
3674
3740
  isFinallyKeywordContext(positionDescription) {
3675
3741
  if (positionDescription.kind !== "after-token-or-keyword") {
3676
3742
  return false;
3677
3743
  }
3678
3744
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3679
- return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 100 /* TryStatement */ || tokenOrKeyword.parent.parent.kind === 101 /* CatchClause */);
3745
+ return tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 96 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 102 /* TryStatement */ || tokenOrKeyword.parent.parent.kind === 103 /* CatchClause */);
3680
3746
  }
3681
3747
  isTypeKindCompletionContext(positionDescription) {
3682
3748
  return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(64 /* Equals */) && NodeTypeUtils.isPackageTypeDeclaration(positionDescription.tokenOrKeyword.parent);
@@ -3686,17 +3752,17 @@ var CompletionService = class {
3686
3752
  return false;
3687
3753
  }
3688
3754
  const token = positionDescription.tokenOrKeyword.value;
3689
- return token.parent.kind === 58 /* ForStatementVariableDeclaration */ && (token.parent === token.parent.parent.elementVariableDeclaration || token.parent === token.parent.parent.indexVariableDeclaration);
3755
+ return token.parent.kind === 60 /* ForStatementVariableDeclaration */ && (token.parent === token.parent.parent.elementVariableDeclaration || token.parent === token.parent.parent.indexVariableDeclaration);
3690
3756
  }
3691
3757
  isCaseKeywordContext(positionDescription, syntaxContext) {
3692
3758
  if (positionDescription.kind !== "after-token-or-keyword") {
3693
3759
  return false;
3694
3760
  }
3695
3761
  const tokenOrKeyword = positionDescription.tokenOrKeyword;
3696
- if (tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 120 /* CaseClause */) {
3762
+ if (tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 96 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 122 /* CaseClause */) {
3697
3763
  return true;
3698
3764
  }
3699
- if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 118 /* SwitchStatement */) {
3765
+ if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 120 /* SwitchStatement */) {
3700
3766
  return true;
3701
3767
  }
3702
3768
  return false;
@@ -3780,7 +3846,7 @@ var CompletionService = class {
3780
3846
  return result;
3781
3847
  }
3782
3848
  getTypeCompletionItemInfosFromPackage(searchLocation) {
3783
- return searchLocation.packageMemberLookup.getNamedMembers(searchLocation.hidingMatcher).map((m) => {
3849
+ return searchLocation.packageMemberLookup.getNamedMembers(searchLocation.lookupContext).map((m) => {
3784
3850
  if (m.kind === 2 /* Type */) {
3785
3851
  return new NamedTypeCompletionItemInfo(this.completionItemInfoContext, m);
3786
3852
  }
@@ -3792,7 +3858,7 @@ var CompletionService = class {
3792
3858
  if (searchLocation.packageMemberLookup !== void 0) {
3793
3859
  const lookup = searchLocation.packageMemberLookup;
3794
3860
  query = query.chain(
3795
- lookup.getNamedMembers(searchLocation.hidingMatcher).map((m) => {
3861
+ lookup.getNamedMembers(searchLocation.lookupContext).map((m) => {
3796
3862
  if (m.kind === 2 /* Type */) {
3797
3863
  return new NamedTypeCompletionItemInfo(this.completionItemInfoContext, m);
3798
3864
  }
@@ -3833,7 +3899,7 @@ var CompletionService = class {
3833
3899
  return result;
3834
3900
  }
3835
3901
  getTagCompletionItemInfosFromPackage(searchLocation) {
3836
- return searchLocation.packageMemberLookup.getNamedMembers(searchLocation.hidingMatcher).map((m) => {
3902
+ return searchLocation.packageMemberLookup.getNamedMembers(searchLocation.lookupContext).map((m) => {
3837
3903
  if (m.kind === 2 /* Type */) {
3838
3904
  return new NamedTypeCompletionItemInfo(this.completionItemInfoContext, m);
3839
3905
  } else if (m.kind === 1 /* Function */) {
@@ -3847,7 +3913,7 @@ var CompletionService = class {
3847
3913
  if (searchLocation.packageMemberLookup !== void 0) {
3848
3914
  const lookup = searchLocation.packageMemberLookup;
3849
3915
  query = query.chain(
3850
- lookup.getNamedMembers(searchLocation.hidingMatcher).map((m) => {
3916
+ lookup.getNamedMembers(searchLocation.lookupContext).map((m) => {
3851
3917
  if (m.kind === 2 /* Type */) {
3852
3918
  return new NamedTypeCompletionItemInfo(this.completionItemInfoContext, m);
3853
3919
  } else if (m.kind === 1 /* Function */) {
@@ -3878,14 +3944,14 @@ var CompletionService = class {
3878
3944
  }).filter((i) => i !== void 0);
3879
3945
  }
3880
3946
  getPackageAliasMemberCompletionItemInfos(ctx) {
3881
- return ctx.packageMemberLookup.getNamedMembers(ctx.hidingMatcher).map((m) => this.packageMemberToCompletionItemInfo(m));
3947
+ return ctx.packageMemberLookup.getNamedMembers(ctx.lookupContext).map((m) => this.packageMemberToCompletionItemInfo(m));
3882
3948
  }
3883
3949
  getPackageNameSegmentCompletionItemInfos(ctx) {
3884
3950
  let query = Query.from(ctx.packageTreeNode.getChildren()).map((c) => new PackageNameSegmentCompletionItemInfo(this.completionItemInfoContext, c.name));
3885
3951
  if (ctx.packageMemberLookup !== void 0) {
3886
3952
  const lookup = ctx.packageMemberLookup;
3887
3953
  query = query.chain(
3888
- lookup.getNamedMembers(ctx.hidingMatcher).map((m) => this.packageMemberToCompletionItemInfo(m))
3954
+ lookup.getNamedMembers(ctx.lookupContext).map((m) => this.packageMemberToCompletionItemInfo(m))
3889
3955
  );
3890
3956
  }
3891
3957
  return query.toArray();
@@ -3907,9 +3973,8 @@ var CompletionService = class {
3907
3973
  }
3908
3974
  getTypeMemberCompletionItemInfos(ctx) {
3909
3975
  const type = this.analyzer.excludeNullFromType(ctx.type);
3910
- const memberLookup = TypeMemberLookup.ofType(this.analyzer, type, this.locale);
3911
- const options7 = ctx.isStaticAccess ? 2 /* OnlyStaticMembers */ : 1 /* OnlyInstanceMembers */;
3912
- return memberLookup.getNamedMembers(options7, ctx.hidingMatcher, ctx.typeExtensionLookup).map((m) => {
3976
+ const memberLookup = TypeMemberLookup.ofType(this.analyzer, type);
3977
+ return memberLookup.getNamedMembers(ctx.lookupContext, ctx.lookupOptions).map((m) => {
3913
3978
  switch (m.kind) {
3914
3979
  case "method":
3915
3980
  return new MethodCompletionItemInfo(this.completionItemInfoContext, m);
@@ -3918,7 +3983,7 @@ var CompletionService = class {
3918
3983
  default:
3919
3984
  Debug.never(m);
3920
3985
  }
3921
- }).concat(memberLookup.getOperators(options7, ctx.hidingMatcher, ctx.typeExtensionLookup).map((o) => new OperatorCompletionItemInfo(this.completionItemInfoContext, o)));
3986
+ }).concat(memberLookup.getOperators(ctx.lookupContext, ctx.lookupOptions).map((o) => new OperatorCompletionItemInfo(this.completionItemInfoContext, o)));
3922
3987
  }
3923
3988
  getPackageImportCompletionItemInfos(ctx) {
3924
3989
  const result = this.analyzer.packageImports.getPackagesAvailableForImport(this.sourceFile.package).map((p) => p.getName()).filter((n) => {
@@ -3936,7 +4001,7 @@ var CompletionService = class {
3936
4001
  getTopLevelAliasListCompletionItemInfos(ctx) {
3937
4002
  let result;
3938
4003
  if (ctx.translationKind === 1 /* Method */) {
3939
- result = Query.from(ctx.packageMemberLookup.getNamedMembers(ctx.hidingMatcher)).mapAndFilter((d) => {
4004
+ result = Query.from(ctx.packageMemberLookup.getNamedMembers(ctx.lookupContext)).mapAndFilter((d) => {
3940
4005
  if (d.kind === 1 /* Function */) {
3941
4006
  return new TranslationsSourceFunctionCompletionItemInfo(
3942
4007
  this.completionItemInfoContext,
@@ -3947,7 +4012,7 @@ var CompletionService = class {
3947
4012
  return void 0;
3948
4013
  });
3949
4014
  } else if (ctx.translationKind === 2 /* Type */) {
3950
- result = Query.from(ctx.packageMemberLookup.getNamedMembers(ctx.hidingMatcher)).mapAndFilter((d) => {
4015
+ result = Query.from(ctx.packageMemberLookup.getNamedMembers(ctx.lookupContext)).mapAndFilter((d) => {
3951
4016
  if (d.kind === 2 /* Type */) {
3952
4017
  return new TranslationsSourcePackageTypeCompletionItemInfo(
3953
4018
  this.completionItemInfoContext,
@@ -3958,7 +4023,7 @@ var CompletionService = class {
3958
4023
  return void 0;
3959
4024
  });
3960
4025
  } else if (ctx.translationKind === 0 /* Any */) {
3961
- result = Query.from(ctx.packageMemberLookup.getNamedMembers(ctx.hidingMatcher)).map((d) => {
4026
+ result = Query.from(ctx.packageMemberLookup.getNamedMembers(ctx.lookupContext)).map((d) => {
3962
4027
  switch (d.kind) {
3963
4028
  case 0 /* Variable */:
3964
4029
  return new TranslationsSourceVariableCompletionItemInfo(this.completionItemInfoContext, d);
@@ -3983,8 +4048,8 @@ var CompletionService = class {
3983
4048
  }
3984
4049
  if (!ctx.hasPrecedingKeyword) {
3985
4050
  const keywords = [
3986
- 16 /* Type */,
3987
- 12 /* Function */
4051
+ 17 /* Type */,
4052
+ 13 /* Function */
3988
4053
  ];
3989
4054
  result = result.chain(
3990
4055
  Query.from(keywords).map((k) => LocalizationHelper.localizeKeyword(k, this.locale, this.dialect).map((v) => new KeywordCompletionItemInfo(this.completionItemInfoContext, k, v.value))).flatMap((i) => i)
@@ -4041,8 +4106,8 @@ var CompletionService = class {
4041
4106
  }
4042
4107
  if (!ctx.hasPrecedingKeyword) {
4043
4108
  const keywords = [
4044
- 12 /* Function */,
4045
- 31 /* Creation */
4109
+ 13 /* Function */,
4110
+ 32 /* Creation */
4046
4111
  ];
4047
4112
  result = result.chain(
4048
4113
  Query.from(keywords).map((k) => LocalizationHelper.localizeKeyword(k, this.locale, this.dialect).map((v) => new KeywordCompletionItemInfo(this.completionItemInfoContext, k, v.value))).flatMap((i) => i)
@@ -4199,10 +4264,10 @@ function getRightmostChildExcludingValidEmptyNodes(node) {
4199
4264
  }
4200
4265
  function isInvalidNode(node) {
4201
4266
  switch (node.kind) {
4202
- case 71 /* MissingExpression */:
4203
- case 41 /* MissingPackageMemberDeclaration */:
4204
- case 112 /* MissingStatement */:
4205
- case 55 /* MissingTypeMemberDeclaration */:
4267
+ case 73 /* MissingExpression */:
4268
+ case 43 /* MissingPackageMemberDeclaration */:
4269
+ case 114 /* MissingStatement */:
4270
+ case 57 /* MissingTypeMemberDeclaration */:
4206
4271
  case 16 /* MissingTypeSpecifier */:
4207
4272
  return true;
4208
4273
  case 0 /* Token */:
@@ -4221,26 +4286,25 @@ var PackageImportCompletionContext = class {
4221
4286
  }
4222
4287
  };
4223
4288
  var TypeMemberCompletionContext = class {
4224
- constructor(type, isStaticAccess, hidingMatcher, typeExtensionLookup) {
4289
+ constructor(type, lookupContext, lookupOptions) {
4225
4290
  this.type = type;
4226
- this.isStaticAccess = isStaticAccess;
4227
- this.hidingMatcher = hidingMatcher;
4228
- this.typeExtensionLookup = typeExtensionLookup;
4291
+ this.lookupContext = lookupContext;
4292
+ this.lookupOptions = lookupOptions;
4229
4293
  this.kind = "type-member";
4230
4294
  }
4231
4295
  };
4232
4296
  var PackageNameSegmentCompletionContext = class {
4233
- constructor(packageTreeNode, packageMemberLookup, hidingMatcher) {
4297
+ constructor(packageTreeNode, packageMemberLookup, lookupContext) {
4234
4298
  this.packageTreeNode = packageTreeNode;
4235
4299
  this.packageMemberLookup = packageMemberLookup;
4236
- this.hidingMatcher = hidingMatcher;
4300
+ this.lookupContext = lookupContext;
4237
4301
  this.kind = "package-name-segment";
4238
4302
  }
4239
4303
  };
4240
4304
  var PackageAliasMemberCompletionContext = class {
4241
- constructor(packageMemberLookup, hidingMatcher) {
4305
+ constructor(packageMemberLookup, lookupContext) {
4242
4306
  this.packageMemberLookup = packageMemberLookup;
4243
- this.hidingMatcher = hidingMatcher;
4307
+ this.lookupContext = lookupContext;
4244
4308
  this.kind = "package-alias-member";
4245
4309
  }
4246
4310
  };
@@ -4270,20 +4334,27 @@ var ScopeTypeSearchLocation = class {
4270
4334
  }
4271
4335
  };
4272
4336
  var PackageAliasTypeSearchLocation = class {
4273
- constructor(packageMemberLookup, hidingMatcher) {
4337
+ constructor(packageMemberLookup, lookupContext) {
4274
4338
  this.packageMemberLookup = packageMemberLookup;
4275
- this.hidingMatcher = hidingMatcher;
4339
+ this.lookupContext = lookupContext;
4276
4340
  this.kind = "package-alias";
4277
4341
  }
4278
4342
  };
4279
4343
  var PackageNameSegmentTypeSearchLocation = class {
4280
- constructor(packageTreeNode, packageMemberLookup, hidingMatcher) {
4344
+ constructor(packageTreeNode, packageMemberLookup, lookupContext) {
4281
4345
  this.packageTreeNode = packageTreeNode;
4282
4346
  this.packageMemberLookup = packageMemberLookup;
4283
- this.hidingMatcher = hidingMatcher;
4347
+ this.lookupContext = lookupContext;
4284
4348
  this.kind = "package-name-segment";
4285
4349
  }
4286
4350
  };
4351
+ var PackageAliasTagSearchLocation = class {
4352
+ constructor(packageMemberLookup, lookupContext) {
4353
+ this.packageMemberLookup = packageMemberLookup;
4354
+ this.lookupContext = lookupContext;
4355
+ this.kind = "package-alias";
4356
+ }
4357
+ };
4287
4358
  var ExpressionCompletionContext = class {
4288
4359
  constructor(semanticContext, targetSignaturesParameters, targetTypes) {
4289
4360
  this.semanticContext = semanticContext;
@@ -4293,18 +4364,17 @@ var ExpressionCompletionContext = class {
4293
4364
  }
4294
4365
  };
4295
4366
  var TopLevelTranslationListCompletionContext = class {
4296
- constructor(packageMemberLookup, hidingMatcher, translationKind, hasPrecedingKeyword) {
4367
+ constructor(packageMemberLookup, lookupContext, translationKind, hasPrecedingKeyword) {
4297
4368
  this.packageMemberLookup = packageMemberLookup;
4298
- this.hidingMatcher = hidingMatcher;
4369
+ this.lookupContext = lookupContext;
4299
4370
  this.translationKind = translationKind;
4300
4371
  this.hasPrecedingKeyword = hasPrecedingKeyword;
4301
4372
  this.kind = "top-level-translation-list";
4302
4373
  }
4303
4374
  };
4304
4375
  var TypeMemberTranslationListCompletionContext = class {
4305
- constructor(typeEntity, hidingMatcher, translationKind, hasPrecedingKeyword) {
4376
+ constructor(typeEntity, translationKind, hasPrecedingKeyword) {
4306
4377
  this.typeEntity = typeEntity;
4307
- this.hidingMatcher = hidingMatcher;
4308
4378
  this.translationKind = translationKind;
4309
4379
  this.hasPrecedingKeyword = hasPrecedingKeyword;
4310
4380
  this.kind = "type-member-translation-list";
@@ -4564,6 +4634,8 @@ var NamedTypeCompletionItemInfo = class {
4564
4634
  }
4565
4635
  case 4 /* Alias */:
4566
4636
  return 19 /* AliasType */;
4637
+ case 5 /* Reduced */:
4638
+ return 20 /* ReducedType */;
4567
4639
  default:
4568
4640
  Debug.never(this.entity);
4569
4641
  }
@@ -4592,7 +4664,7 @@ var KeywordCompletionItemInfo = class {
4592
4664
  return this.value;
4593
4665
  }
4594
4666
  getCompletionItemKind() {
4595
- return 21 /* Keyword */;
4667
+ return 22 /* Keyword */;
4596
4668
  }
4597
4669
  getDetails() {
4598
4670
  return void 0;
@@ -4646,7 +4718,7 @@ var TargetSignatureParameterCompletionItemInfo = class {
4646
4718
  return `${this.ctx.getInsertTextForName(this.parameter.getName())} =`;
4647
4719
  }
4648
4720
  getCompletionItemKind() {
4649
- return 22 /* TargetSignatureParameter */;
4721
+ return 23 /* TargetSignatureParameter */;
4650
4722
  }
4651
4723
  getDetails() {
4652
4724
  return this.ctx.displayService.displayParameterDeclaration(
@@ -4725,7 +4797,7 @@ var TranslationsSourceFunctionCompletionItemInfo = class {
4725
4797
  return this.ctx.displayService.displayFunctionDeclaration(new FunctionDeclaration_entity(this.func));
4726
4798
  }
4727
4799
  getInsertText() {
4728
- const keywordWithWhitespace = this.includeFunctionKeyword ? `${this.ctx.displayService.displayKeyword(12 /* Function */)} ` : "";
4800
+ const keywordWithWhitespace = this.includeFunctionKeyword ? `${this.ctx.displayService.displayKeyword(13 /* Function */)} ` : "";
4729
4801
  const typeParameters = this.func.getTypeParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
4730
4802
  const typeParametersWithAngles = typeParameters.length > 0 ? `<${typeParameters}>` : "";
4731
4803
  const parameters = this.func.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
@@ -4769,14 +4841,17 @@ var TranslationsSourcePackageTypeCompletionItemInfo = class {
4769
4841
  }
4770
4842
  case 4 /* Alias */:
4771
4843
  return 19 /* AliasType */;
4844
+ case 5 /* Reduced */:
4845
+ return 20 /* ReducedType */;
4846
+ default:
4847
+ Debug.never(this.typeEntity);
4772
4848
  }
4773
4849
  }
4774
4850
  getDetails() {
4775
- const typeDeclaration = this.getDisplayServiceTypeDeclaration();
4776
- return this.ctx.displayService.displayTypeDeclaration(typeDeclaration);
4851
+ return this.ctx.displayService.displayEntity(this.typeEntity);
4777
4852
  }
4778
4853
  getInsertText() {
4779
- const keywordWithWhitespace = this.includeTypeKeyword ? `${this.ctx.displayService.displayKeyword(16 /* Type */)} ` : "";
4854
+ const keywordWithWhitespace = this.includeTypeKeyword ? `${this.ctx.displayService.displayKeyword(17 /* Type */)} ` : "";
4780
4855
  const typeParameters = this.typeEntity.getTypeParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
4781
4856
  const typeParametersWithAngles = typeParameters.length > 0 ? `<${typeParameters}>` : "";
4782
4857
  let result = `${keywordWithWhitespace}${this.ctx.getInsertTextForName(this.typeEntity.getName())}${typeParametersWithAngles}`;
@@ -4789,28 +4864,6 @@ var TranslationsSourcePackageTypeCompletionItemInfo = class {
4789
4864
  getSortText() {
4790
4865
  return void 0;
4791
4866
  }
4792
- getDisplayServiceTypeDeclaration() {
4793
- switch (this.typeEntity.typeEntityKind) {
4794
- case 3 /* Variant */:
4795
- return new TypeDeclaration_variant(
4796
- new TypeDeclarationVariant_entity(this.typeEntity)
4797
- );
4798
- case 0 /* Function */:
4799
- return new TypeDeclaration_function(
4800
- new TypeDeclarationFunction_entity(this.typeEntity)
4801
- );
4802
- case 1 /* Structured */:
4803
- return new TypeDeclaration_structured(
4804
- new TypeDeclarationStructured_entity(this.typeEntity)
4805
- );
4806
- case 4 /* Alias */:
4807
- return new TypeDeclaration_alias(
4808
- new TypeDeclarationAlias_entity(this.typeEntity)
4809
- );
4810
- default:
4811
- Debug.never(this.typeEntity);
4812
- }
4813
- }
4814
4867
  getEditRange() {
4815
4868
  return void 0;
4816
4869
  }
@@ -4857,7 +4910,7 @@ var TranslationsSourceConstructorCompletionItemInfo = class {
4857
4910
  return this.label_.getOrInsertWith(() => {
4858
4911
  const constructorDeclaration = new ConstructorDeclaration_entity(this.constructor_);
4859
4912
  const displayParts = this.ctx.displayService.getConstructorDeclarationDisplayParts(constructorDeclaration);
4860
- const creationKeyword = this.ctx.displayService.displayKeyword(31 /* Creation */);
4913
+ const creationKeyword = this.ctx.displayService.displayKeyword(32 /* Creation */);
4861
4914
  return creationKeyword + displayParts.parametersStart + displayParts.parameters.map((p) => p.toString()).join(displayParts.parameterSeparator) + displayParts.parametersEnd;
4862
4915
  });
4863
4916
  }
@@ -4871,7 +4924,7 @@ var TranslationsSourceConstructorCompletionItemInfo = class {
4871
4924
  return this.label;
4872
4925
  }
4873
4926
  getInsertText() {
4874
- const creationKeyword = this.includeOnCreateKeyword ? this.ctx.displayService.displayKeyword(31 /* Creation */) : "";
4927
+ const creationKeyword = this.includeOnCreateKeyword ? this.ctx.displayService.displayKeyword(32 /* Creation */) : "";
4875
4928
  const parameters = this.constructor_.getParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
4876
4929
  return `${creationKeyword}(${parameters})`;
4877
4930
  }
@@ -4893,7 +4946,7 @@ var OperatorNameCompletionItemInfo = class {
4893
4946
  return this.value;
4894
4947
  }
4895
4948
  getCompletionItemKind() {
4896
- return 23 /* OperatorName */;
4949
+ return 24 /* OperatorName */;
4897
4950
  }
4898
4951
  getDetails() {
4899
4952
  return void 0;
@@ -4997,7 +5050,7 @@ var SyntaxContextFactory = class {
4997
5050
  if (positionDescription.kind === "after-token-or-keyword") {
4998
5051
  isUnqualifiedTypeContext = this.isUnqualifiedTypeContext(positionDescription.tokenOrKeyword);
4999
5052
  }
5000
- const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(36 /* HashSign */) && positionDescription.tokenOrKeyword.parent.kind === 152 /* Tag */;
5053
+ const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(36 /* HashSign */) && positionDescription.tokenOrKeyword.parent.kind === 154 /* Tag */;
5001
5054
  let isTopLevelTranslationListContext;
5002
5055
  if (positionDescription.kind === "after-token-or-keyword") {
5003
5056
  isTopLevelTranslationListContext = this.isTopLevelTranslationListContext(positionDescription.tokenOrKeyword);
@@ -5023,52 +5076,52 @@ var SyntaxContextFactory = class {
5023
5076
  }
5024
5077
  static isExpressionOrStatementContext(tokenOrKeyword) {
5025
5078
  if (tokenOrKeyword.isToken(64 /* Equals */)) {
5026
- if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
5079
+ if (tokenOrKeyword.parent.kind === 94 /* AssignmentStatement */) {
5027
5080
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
5028
5081
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5029
5082
  }
5030
- if (tokenOrKeyword.parent.kind === 57 /* LocalVariableDeclaration */) {
5083
+ if (tokenOrKeyword.parent.kind === 59 /* LocalVariableDeclaration */) {
5031
5084
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.initializer);
5032
5085
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5033
5086
  }
5034
- if (tokenOrKeyword.parent.kind === 33 /* PackageVariableDeclaration */) {
5087
+ if (tokenOrKeyword.parent.kind === 35 /* PackageVariableDeclaration */) {
5035
5088
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.initializer);
5036
5089
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5037
5090
  }
5038
- if (tokenOrKeyword.parent.kind === 52 /* FieldDeclaration */) {
5091
+ if (tokenOrKeyword.parent.kind === 54 /* FieldDeclaration */) {
5039
5092
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.initializer);
5040
5093
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5041
5094
  }
5042
- if (tokenOrKeyword.parent.kind === 149 /* ParameterDeclaration */) {
5095
+ if (tokenOrKeyword.parent.kind === 151 /* ParameterDeclaration */) {
5043
5096
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.defaultValue);
5044
5097
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5045
5098
  }
5046
- if (tokenOrKeyword.parent.kind === 150 /* Argument */) {
5099
+ if (tokenOrKeyword.parent.kind === 152 /* Argument */) {
5047
5100
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
5048
5101
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5049
5102
  }
5050
- if (tokenOrKeyword.parent.kind === 147 /* VariantValueDeclaration */) {
5103
+ if (tokenOrKeyword.parent.kind === 149 /* VariantValueDeclaration */) {
5051
5104
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
5052
5105
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5053
5106
  }
5054
5107
  }
5055
- if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
5108
+ if (tokenOrKeyword.parent.kind === 94 /* AssignmentStatement */) {
5056
5109
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
5057
5110
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5058
5111
  }
5059
- if (tokenOrKeyword.parent.kind === 75 /* PrefixUnaryExpression */) {
5112
+ if (tokenOrKeyword.parent.kind === 77 /* PrefixUnaryExpression */) {
5060
5113
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.operand);
5061
5114
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5062
5115
  }
5063
- if (tokenOrKeyword.parent.kind === 64 /* BinaryExpression */) {
5116
+ if (tokenOrKeyword.parent.kind === 66 /* BinaryExpression */) {
5064
5117
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
5065
5118
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5066
5119
  }
5067
- if (tokenOrKeyword.isToken(6 /* TextTemplateHead */) && (tokenOrKeyword.parent.kind === 79 /* TextTemplateLiteral */ || tokenOrKeyword.parent.kind === 80 /* LocalizableTextTemplateLiteral */)) {
5120
+ if (tokenOrKeyword.isToken(6 /* TextTemplateHead */) && (tokenOrKeyword.parent.kind === 81 /* TextTemplateLiteral */ || tokenOrKeyword.parent.kind === 82 /* LocalizableTextTemplateLiteral */)) {
5068
5121
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.spanList.spans.at(0)?.expression);
5069
5122
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5070
5123
  }
5071
- if (tokenOrKeyword.isToken(7 /* TextTemplatePart */) && tokenOrKeyword.parent.kind === 82 /* TextTemplateSpan */) {
5124
+ if (tokenOrKeyword.isToken(7 /* TextTemplatePart */) && tokenOrKeyword.parent.kind === 84 /* TextTemplateSpan */) {
5072
5125
  let expressionForTargetType;
5073
5126
  const spanList = tokenOrKeyword.parent.parent;
5074
5127
  const spanIndex = spanList.spans.indexOf(tokenOrKeyword.parent);
@@ -5080,12 +5133,12 @@ var SyntaxContextFactory = class {
5080
5133
  isStatementContext: false
5081
5134
  };
5082
5135
  }
5083
- if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */) {
5136
+ if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 96 /* StatementBlock */) {
5084
5137
  return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
5085
5138
  }
5086
- if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 95 /* FunctionBlock */) {
5139
+ if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 97 /* FunctionBlock */) {
5087
5140
  const block = tokenOrKeyword.parent;
5088
- if (block.expressionOrStatementList.kind !== 93 /* StatementList */ || block.expressionOrStatementList.statements.count() === 0) {
5141
+ if (block.expressionOrStatementList.kind !== 95 /* StatementList */ || block.expressionOrStatementList.statements.count() === 0) {
5089
5142
  return {
5090
5143
  isExpressionContext: { expressionRole: new ExpressionRole_functionBlockExpression(block) },
5091
5144
  isStatementContext: true
@@ -5097,48 +5150,48 @@ var SyntaxContextFactory = class {
5097
5150
  };
5098
5151
  }
5099
5152
  }
5100
- if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 93 /* StatementList */) {
5153
+ if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 95 /* StatementList */) {
5101
5154
  return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
5102
5155
  }
5103
5156
  if (tokenOrKeyword.isToken(47 /* OpenParenthesis */)) {
5104
- if (tokenOrKeyword.parent.kind === 73 /* ParenthesizedExpression */) {
5157
+ if (tokenOrKeyword.parent.kind === 75 /* ParenthesizedExpression */) {
5105
5158
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5106
5159
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5107
5160
  }
5108
- if (tokenOrKeyword.parent.kind === 77 /* ReferenceExpression */) {
5161
+ if (tokenOrKeyword.parent.kind === 79 /* ReferenceExpression */) {
5109
5162
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5110
5163
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5111
5164
  }
5112
- if (tokenOrKeyword.parent.kind === 68 /* CallExpression */) {
5165
+ if (tokenOrKeyword.parent.kind === 70 /* CallExpression */) {
5113
5166
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5114
5167
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5115
5168
  }
5116
- if (tokenOrKeyword.parent.kind === 69 /* AutotypeCallExpression */) {
5169
+ if (tokenOrKeyword.parent.kind === 71 /* AutotypeCallExpression */) {
5117
5170
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5118
5171
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5119
5172
  }
5120
- if (tokenOrKeyword.parent.kind === 152 /* Tag */) {
5173
+ if (tokenOrKeyword.parent.kind === 154 /* Tag */) {
5121
5174
  const argumentList = tokenOrKeyword.parent.argumentList;
5122
5175
  if (argumentList !== void 0) {
5123
5176
  const expressionRole = new ExpressionRole_argument(argumentList, 0);
5124
5177
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5125
5178
  }
5126
5179
  }
5127
- if (tokenOrKeyword.parent.kind === 74 /* ConditionalExpression */) {
5180
+ if (tokenOrKeyword.parent.kind === 76 /* ConditionalExpression */) {
5128
5181
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5129
5182
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5130
5183
  }
5131
5184
  }
5132
- if (tokenOrKeyword.isToken(48 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 70 /* IndexedAccessExpression */) {
5185
+ if (tokenOrKeyword.isToken(48 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 72 /* IndexedAccessExpression */) {
5133
5186
  const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
5134
5187
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5135
5188
  }
5136
- if (tokenOrKeyword.isToken(48 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 59 /* ArrayLiteral */) {
5189
+ if (tokenOrKeyword.isToken(48 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 61 /* ArrayLiteral */) {
5137
5190
  const expressionRole = new ExpressionRole_arrayElement(tokenOrKeyword.parent);
5138
5191
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5139
5192
  }
5140
5193
  if (tokenOrKeyword.isToken(26 /* Comma */)) {
5141
- if (tokenOrKeyword.parent.kind === 67 /* ArgumentList */) {
5194
+ if (tokenOrKeyword.parent.kind === 69 /* ArgumentList */) {
5142
5195
  const argumentList = tokenOrKeyword.parent;
5143
5196
  let index = 0;
5144
5197
  for (const element of argumentList.elements) {
@@ -5152,71 +5205,71 @@ var SyntaxContextFactory = class {
5152
5205
  const expressionRole = new ExpressionRole_argument(argumentList, index);
5153
5206
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5154
5207
  }
5155
- if (tokenOrKeyword.parent.kind === 119 /* MatchExpressionList */) {
5208
+ if (tokenOrKeyword.parent.kind === 121 /* MatchExpressionList */) {
5156
5209
  const expressionRole = new ExpressionRole_matchListElement(tokenOrKeyword.parent.parent.parent.parent);
5157
5210
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5158
5211
  }
5159
- if (tokenOrKeyword.parent.kind === 60 /* ArrayLiteralElementList */) {
5212
+ if (tokenOrKeyword.parent.kind === 62 /* ArrayLiteralElementList */) {
5160
5213
  const expressionRole = new ExpressionRole_arrayElement(tokenOrKeyword.parent.parent);
5161
5214
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5162
5215
  }
5163
- if (tokenOrKeyword.parent.kind === 74 /* ConditionalExpression */) {
5164
- if (tokenOrKeyword.value === tokenOrKeyword.parent.firstComma) {
5216
+ if (tokenOrKeyword.parent.kind === 76 /* ConditionalExpression */) {
5217
+ if (tokenOrKeyword.value === tokenOrKeyword.parent.firstCommaToken) {
5165
5218
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.firstExpression);
5166
5219
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5167
5220
  }
5168
- if (tokenOrKeyword.value === tokenOrKeyword.parent.secondComma) {
5221
+ if (tokenOrKeyword.value === tokenOrKeyword.parent.secondCommaToken) {
5169
5222
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.secondExpression);
5170
5223
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5171
5224
  }
5172
5225
  return { isExpressionContext: void 0, isStatementContext: false };
5173
5226
  }
5174
5227
  }
5175
- if (tokenOrKeyword.isKeyword(45 /* Case */) && tokenOrKeyword.parent.kind === 120 /* CaseClause */) {
5228
+ if (tokenOrKeyword.isKeyword(46 /* Case */) && tokenOrKeyword.parent.kind === 122 /* CaseClause */) {
5176
5229
  const expressionRole = new ExpressionRole_matchListElement(tokenOrKeyword.parent.parent.parent);
5177
5230
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5178
5231
  }
5179
- if (tokenOrKeyword.isKeyword(15 /* Return */) && tokenOrKeyword.parent.kind === 116 /* ReturnStatement */) {
5232
+ if (tokenOrKeyword.isKeyword(16 /* Return */) && tokenOrKeyword.parent.kind === 118 /* ReturnStatement */) {
5180
5233
  const expressionRole = new ExpressionRole_returnedValue(tokenOrKeyword.parent);
5181
5234
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5182
5235
  }
5183
- if (tokenOrKeyword.isKeyword(20 /* Error */) && tokenOrKeyword.parent.kind === 104 /* ErrorStatement */) {
5236
+ if (tokenOrKeyword.isKeyword(21 /* Error */) && tokenOrKeyword.parent.kind === 106 /* ErrorStatement */) {
5184
5237
  const expressionRole = new ExpressionRole_errorValue(tokenOrKeyword.parent);
5185
5238
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5186
5239
  }
5187
- if (tokenOrKeyword.isKeyword(19 /* Important */) && tokenOrKeyword.parent.kind === 105 /* ImportantStatement */) {
5240
+ if (tokenOrKeyword.isKeyword(20 /* Important */) && tokenOrKeyword.parent.kind === 107 /* ImportantStatement */) {
5188
5241
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5189
5242
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5190
5243
  }
5191
- if (tokenOrKeyword.isKeyword(44 /* Switch */) && tokenOrKeyword.parent.kind === 118 /* SwitchStatement */) {
5244
+ if (tokenOrKeyword.isKeyword(45 /* Switch */) && tokenOrKeyword.parent.kind === 120 /* SwitchStatement */) {
5192
5245
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5193
5246
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5194
5247
  }
5195
- if (tokenOrKeyword.isKeyword(13 /* If */) && tokenOrKeyword.parent.kind === 108 /* IfStatement */) {
5248
+ if (tokenOrKeyword.isKeyword(14 /* If */) && tokenOrKeyword.parent.kind === 110 /* IfStatement */) {
5196
5249
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5197
5250
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5198
5251
  }
5199
- if (tokenOrKeyword.isKeyword(11 /* ElseIf */) && tokenOrKeyword.parent.kind === 110 /* ElseIfClause */) {
5252
+ if (tokenOrKeyword.isKeyword(12 /* ElseIf */) && tokenOrKeyword.parent.kind === 112 /* ElseIfClause */) {
5200
5253
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5201
5254
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5202
5255
  }
5203
- if (tokenOrKeyword.isKeyword(9 /* From */) && tokenOrKeyword.parent.kind === 107 /* ForStatement */) {
5256
+ if (tokenOrKeyword.isKeyword(10 /* From */) && tokenOrKeyword.parent.kind === 109 /* ForStatement */) {
5204
5257
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.enumeratedExpression);
5205
5258
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5206
5259
  }
5207
- if (tokenOrKeyword.isKeyword(25 /* While */) && tokenOrKeyword.parent.kind === 121 /* WhileStatement */) {
5260
+ if (tokenOrKeyword.isKeyword(26 /* While */) && tokenOrKeyword.parent.kind === 123 /* WhileStatement */) {
5208
5261
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5209
5262
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5210
5263
  }
5211
- if (tokenOrKeyword.isKeyword(27 /* RepeatWhile */) && tokenOrKeyword.parent.kind === 115 /* LoopStatement */) {
5264
+ if (tokenOrKeyword.isKeyword(28 /* RepeatWhile */) && tokenOrKeyword.parent.kind === 117 /* LoopStatement */) {
5212
5265
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5213
5266
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5214
5267
  }
5215
- if (tokenOrKeyword.isKeyword(28 /* Yield */) && tokenOrKeyword.parent.kind === 122 /* YieldStatement */) {
5268
+ if (tokenOrKeyword.isKeyword(29 /* Yield */) && tokenOrKeyword.parent.kind === 124 /* YieldStatement */) {
5216
5269
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
5217
5270
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5218
5271
  }
5219
- if (tokenOrKeyword.isKeyword(30 /* Cond */) && tokenOrKeyword.parent.kind === 74 /* ConditionalExpression */) {
5272
+ if (tokenOrKeyword.isKeyword(31 /* Cond */) && tokenOrKeyword.parent.kind === 76 /* ConditionalExpression */) {
5220
5273
  const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.condition);
5221
5274
  return { isExpressionContext: { expressionRole }, isStatementContext: false };
5222
5275
  }
@@ -5235,65 +5288,65 @@ var SyntaxContextFactory = class {
5235
5288
  if (tokenOrKeyword.isToken(58 /* Semicolon */) && (tokenOrKeyword.parent.kind === 2 /* PackageMemberDeclarationList */ || tokenOrKeyword.parent.kind === 4 /* PackageImportDirectiveList */)) {
5236
5289
  return true;
5237
5290
  }
5238
- if (tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 30 /* TypeMemberDeclarationBlock */ && (tokenOrKeyword.parent.parent.kind === 38 /* TypeExtensionDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 31 /* PackageStructuredTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 36 /* PackageVariantTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 20 /* PackageAliasTypeDeclaration */)) {
5291
+ if (tokenOrKeyword.isToken(22 /* 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 === 20 /* PackageAliasTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 22 /* PackageReducedTypeDeclaration */)) {
5239
5292
  return true;
5240
5293
  }
5241
- if (tokenOrKeyword.isToken(22 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 123 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 22 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 95 /* FunctionBlock */ && (tokenOrKeyword.parent.parent.kind === 23 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 24 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 25 /* PackageFunctionDeclaration */))) {
5294
+ if (tokenOrKeyword.isToken(22 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 125 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 97 /* FunctionBlock */ && (tokenOrKeyword.parent.parent.kind === 25 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 26 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 27 /* PackageFunctionDeclaration */))) {
5242
5295
  return true;
5243
5296
  }
5244
- if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 22 /* PackageMemberGroupDeclaration */) {
5297
+ if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 24 /* PackageMemberGroupDeclaration */) {
5245
5298
  return true;
5246
5299
  }
5247
- if (SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 5 /* SinglePackageImportDirective */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 25 /* PackageFunctionDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 26 /* PackageFunctionTypeDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 20 /* PackageAliasTypeDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 33 /* PackageVariableDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5300
+ if (SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 5 /* SinglePackageImportDirective */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 27 /* PackageFunctionDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 28 /* PackageFunctionTypeDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 20 /* PackageAliasTypeDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 35 /* PackageVariableDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5248
5301
  tokenOrKeyword,
5249
- 34 /* PackageVariableGetterDeclaration */
5250
- ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 35 /* PackageVariableSetterDeclaration */)) {
5302
+ 36 /* PackageVariableGetterDeclaration */
5303
+ ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 37 /* PackageVariableSetterDeclaration */)) {
5251
5304
  return true;
5252
5305
  }
5253
- if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 154 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5306
+ if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 156 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5254
5307
  return true;
5255
5308
  }
5256
- if (tokenOrKeyword.isToken(23 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 154 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5309
+ if (tokenOrKeyword.isToken(23 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 156 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5257
5310
  return true;
5258
5311
  }
5259
- const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 152 /* Tag */);
5312
+ const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 154 /* Tag */);
5260
5313
  if (tag !== void 0 && NodeTypeUtils.isPackageMemberDeclaration(tag.parent.parent)) {
5261
5314
  return true;
5262
5315
  }
5263
5316
  return false;
5264
5317
  }
5265
5318
  static isTypeMemberDeclarationListContext(tokenOrKeyword) {
5266
- if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 29 /* TypeMemberDeclarationList */) {
5319
+ if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 31 /* TypeMemberDeclarationList */) {
5267
5320
  return true;
5268
5321
  }
5269
- if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 30 /* TypeMemberDeclarationBlock */) {
5322
+ if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 32 /* TypeMemberDeclarationBlock */) {
5270
5323
  return true;
5271
5324
  }
5272
- if (tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 30 /* TypeMemberDeclarationBlock */ && tokenOrKeyword.parent.parent.kind === 42 /* TypeMemberGroupDeclaration */) {
5325
+ if (tokenOrKeyword.isToken(22 /* CloseBrace */) && tokenOrKeyword.parent.kind === 32 /* TypeMemberDeclarationBlock */ && tokenOrKeyword.parent.parent.kind === 44 /* TypeMemberGroupDeclaration */) {
5273
5326
  return true;
5274
5327
  }
5275
- if (SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* FieldDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* FieldGetterDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 54 /* FieldSetterDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5328
+ if (SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 54 /* FieldDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 55 /* FieldGetterDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 56 /* FieldSetterDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5276
5329
  tokenOrKeyword,
5277
- 45 /* IndexedElementGetterDeclaration */
5330
+ 47 /* IndexedElementGetterDeclaration */
5278
5331
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5279
5332
  tokenOrKeyword,
5280
- 46 /* IndexedElementSetterDeclaration */
5333
+ 48 /* IndexedElementSetterDeclaration */
5281
5334
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5282
5335
  tokenOrKeyword,
5283
- 48 /* DereferencedVariableGetterDeclaration */
5336
+ 50 /* DereferencedVariableGetterDeclaration */
5284
5337
  ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
5285
5338
  tokenOrKeyword,
5286
- 49 /* DereferencedVariableSetterDeclaration */
5287
- ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 50 /* MethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 51 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 43 /* ConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 44 /* DestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 147 /* VariantValueDeclaration */)) {
5339
+ 51 /* DereferencedVariableSetterDeclaration */
5340
+ ) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* MethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 45 /* ConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 46 /* DestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 149 /* VariantValueDeclaration */)) {
5288
5341
  return true;
5289
5342
  }
5290
- if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 154 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5343
+ if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 156 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5291
5344
  return true;
5292
5345
  }
5293
- if (tokenOrKeyword.isToken(23 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 154 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5346
+ if (tokenOrKeyword.isToken(23 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 156 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
5294
5347
  return true;
5295
5348
  }
5296
- const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 152 /* Tag */);
5349
+ const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 154 /* Tag */);
5297
5350
  if (tag !== void 0 && NodeTypeUtils.isTypeMemberDeclaration(tag.parent.parent)) {
5298
5351
  return true;
5299
5352
  }
@@ -5331,34 +5384,37 @@ var SyntaxContextFactory = class {
5331
5384
  return result;
5332
5385
  }
5333
5386
  static isUnqualifiedTypeContext(tokenOrKeyword) {
5334
- if (tokenOrKeyword.isToken(25 /* Colon */) && tokenOrKeyword.parent.kind === 161 /* TypeAnnotation */) {
5387
+ if (tokenOrKeyword.isToken(25 /* Colon */) && tokenOrKeyword.parent.kind === 163 /* TypeAnnotation */) {
5335
5388
  return { allowsAnonymousTypes: true };
5336
5389
  }
5337
- if ((tokenOrKeyword.isKeyword(4 /* Object */) || tokenOrKeyword.isKeyword(5 /* PlainObject */) || tokenOrKeyword.isKeyword(3 /* Aspect */)) && tokenOrKeyword.parent.kind === 32 /* StructuredTypeDeclarationBody */) {
5390
+ if ((tokenOrKeyword.isKeyword(4 /* Object */) || tokenOrKeyword.isKeyword(5 /* PlainObject */) || tokenOrKeyword.isKeyword(3 /* Aspect */)) && tokenOrKeyword.parent.kind === 34 /* StructuredTypeDeclarationBody */) {
5338
5391
  return { allowsAnonymousTypes: false };
5339
5392
  }
5340
- if (tokenOrKeyword.isKeyword(16 /* Type */) && (NodeTypeUtils.isPackageTypeDeclaration(tokenOrKeyword.parent) || tokenOrKeyword.parent.kind === 38 /* TypeExtensionDeclaration */)) {
5393
+ if (tokenOrKeyword.isKeyword(6 /* ReducedObject */) && tokenOrKeyword.parent.kind === 23 /* ReducedTypeDeclarationBody */) {
5341
5394
  return { allowsAnonymousTypes: false };
5342
5395
  }
5343
- if (tokenOrKeyword.isToken(37 /* LessThan */) && tokenOrKeyword.parent.kind === 157 /* TypeArgumentClause */) {
5396
+ if (tokenOrKeyword.isKeyword(17 /* Type */) && (NodeTypeUtils.isPackageTypeDeclaration(tokenOrKeyword.parent) || tokenOrKeyword.parent.kind === 40 /* TypeExtensionDeclaration */)) {
5397
+ return { allowsAnonymousTypes: false };
5398
+ }
5399
+ if (tokenOrKeyword.isToken(37 /* LessThan */) && tokenOrKeyword.parent.kind === 159 /* TypeArgumentClause */) {
5344
5400
  return { allowsAnonymousTypes: true };
5345
5401
  }
5346
- if (tokenOrKeyword.isToken(26 /* Comma */) && (tokenOrKeyword.parent.kind === 28 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 158 /* TypeArgumentList */)) {
5347
- return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 158 /* TypeArgumentList */ };
5402
+ if (tokenOrKeyword.isToken(26 /* Comma */) && (tokenOrKeyword.parent.kind === 30 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 160 /* TypeArgumentList */ || tokenOrKeyword.parent.kind === 23 /* ReducedTypeDeclarationBody */)) {
5403
+ return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 160 /* TypeArgumentList */ };
5348
5404
  }
5349
- if (tokenOrKeyword.isToken(36 /* HashSign */) && tokenOrKeyword.parent.kind === 152 /* Tag */) {
5405
+ if (tokenOrKeyword.isToken(36 /* HashSign */) && tokenOrKeyword.parent.kind === 154 /* Tag */) {
5350
5406
  return { allowsAnonymousTypes: false };
5351
5407
  }
5352
- if ((tokenOrKeyword.isToken(25 /* Colon */) || tokenOrKeyword.isToken(64 /* Equals */)) && tokenOrKeyword.parent.kind === 148 /* TypeParameterDeclaration */) {
5408
+ if ((tokenOrKeyword.isToken(25 /* Colon */) || tokenOrKeyword.isToken(64 /* Equals */)) && tokenOrKeyword.parent.kind === 150 /* TypeParameterDeclaration */) {
5353
5409
  return { allowsAnonymousTypes: false };
5354
5410
  }
5355
5411
  if (tokenOrKeyword.isToken(64 /* Equals */) && tokenOrKeyword.parent.kind === 20 /* PackageAliasTypeDeclaration */) {
5356
5412
  return { allowsAnonymousTypes: false };
5357
5413
  }
5358
- if (tokenOrKeyword.isKeyword(14 /* Is */) && tokenOrKeyword.parent.kind === 72 /* IsExpression */) {
5414
+ if (tokenOrKeyword.isKeyword(15 /* Is */) && tokenOrKeyword.parent.kind === 74 /* IsExpression */) {
5359
5415
  return { allowsAnonymousTypes: true };
5360
5416
  }
5361
- if (tokenOrKeyword.isKeyword(42 /* As */) && tokenOrKeyword.parent.kind === 63 /* AsExpression */) {
5417
+ if (tokenOrKeyword.isKeyword(43 /* As */) && tokenOrKeyword.parent.kind === 65 /* AsExpression */) {
5362
5418
  return { allowsAnonymousTypes: true };
5363
5419
  }
5364
5420
  if (tokenOrKeyword.isToken(17 /* Bar */) && tokenOrKeyword.parent.kind === 11 /* UnionTypeSpecifier */) {
@@ -5373,36 +5429,36 @@ var SyntaxContextFactory = class {
5373
5429
  return void 0;
5374
5430
  }
5375
5431
  static isTopLevelTranslationListContext(tokenOrKeyword) {
5376
- if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 124 /* TopLevelTranslationList */) {
5432
+ if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 126 /* TopLevelTranslationList */) {
5377
5433
  return { translationsDeclaration: tokenOrKeyword.parent.parent };
5378
5434
  }
5379
- if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 123 /* TranslationsDeclaration */) {
5435
+ if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 125 /* TranslationsDeclaration */) {
5380
5436
  return { translationsDeclaration: tokenOrKeyword.parent };
5381
5437
  }
5382
5438
  const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5383
5439
  tokenOrKeyword,
5384
- 139 /* TypeTranslationDeclaration */
5440
+ 141 /* TypeTranslationDeclaration */
5385
5441
  );
5386
5442
  if (type !== void 0) {
5387
5443
  return { translationsDeclaration: type.parent.parent };
5388
5444
  }
5389
5445
  const functionType = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5390
5446
  tokenOrKeyword,
5391
- 134 /* FunctionTypeTranslationDeclaration */
5447
+ 136 /* FunctionTypeTranslationDeclaration */
5392
5448
  );
5393
5449
  if (functionType !== void 0) {
5394
5450
  return { translationsDeclaration: functionType.parent.parent };
5395
5451
  }
5396
5452
  const variable = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5397
5453
  tokenOrKeyword,
5398
- 136 /* PackageVariableTranslationDeclaration */
5454
+ 138 /* PackageVariableTranslationDeclaration */
5399
5455
  );
5400
5456
  if (variable !== void 0) {
5401
5457
  return { translationsDeclaration: variable.parent.parent };
5402
5458
  }
5403
5459
  const func = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5404
5460
  tokenOrKeyword,
5405
- 132 /* PackageFunctionTranslationDeclaration */
5461
+ 134 /* PackageFunctionTranslationDeclaration */
5406
5462
  );
5407
5463
  if (func !== void 0) {
5408
5464
  return { translationsDeclaration: func.parent.parent };
@@ -5410,33 +5466,33 @@ var SyntaxContextFactory = class {
5410
5466
  return void 0;
5411
5467
  }
5412
5468
  static isTypeMemberTranslationListContext(tokenOrKeyword) {
5413
- if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 138 /* TypeMemberTranslationList */) {
5469
+ if (tokenOrKeyword.isToken(58 /* Semicolon */) && tokenOrKeyword.parent.kind === 140 /* TypeMemberTranslationList */) {
5414
5470
  return { typeTranslation: tokenOrKeyword.parent.parent };
5415
5471
  }
5416
- if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 139 /* TypeTranslationDeclaration */) {
5472
+ if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 141 /* TypeTranslationDeclaration */) {
5417
5473
  return { typeTranslation: tokenOrKeyword.parent };
5418
5474
  }
5419
- const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 129 /* IndexerTranslation */);
5475
+ const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 131 /* IndexerTranslation */);
5420
5476
  if (indexer !== void 0) {
5421
5477
  return { typeTranslation: indexer.parent.parent };
5422
5478
  }
5423
5479
  const constructor = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5424
5480
  tokenOrKeyword,
5425
- 127 /* ConstructorTranslation */
5481
+ 129 /* ConstructorTranslation */
5426
5482
  );
5427
5483
  if (constructor !== void 0) {
5428
5484
  return { typeTranslation: constructor.parent.parent };
5429
5485
  }
5430
5486
  const variableOrVariant = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5431
5487
  tokenOrKeyword,
5432
- 137 /* FieldOrVariantTranslation */
5488
+ 139 /* FieldOrVariantTranslation */
5433
5489
  );
5434
5490
  if (variableOrVariant !== void 0) {
5435
5491
  return { typeTranslation: variableOrVariant.parent.parent };
5436
5492
  }
5437
5493
  const method = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
5438
5494
  tokenOrKeyword,
5439
- 133 /* MethodTranslation */
5495
+ 135 /* MethodTranslation */
5440
5496
  );
5441
5497
  if (method !== void 0) {
5442
5498
  return { typeTranslation: method.parent.parent };
@@ -5549,41 +5605,41 @@ var NodeSemanticInfoService = class {
5549
5605
  static ofTokenOrKeyword(analyzer, tokenOrKeyword, options7) {
5550
5606
  if (isIdentifier(tokenOrKeyword.value)) {
5551
5607
  return this.ofNonKeywordIdentifier(analyzer, tokenOrKeyword.value, options7);
5552
- } else if (tokenOrKeyword.isKeyword(2 /* Autotype */) && tokenOrKeyword.parent.kind === 69 /* AutotypeCallExpression */) {
5608
+ } else if (tokenOrKeyword.isKeyword(2 /* Autotype */) && tokenOrKeyword.parent.kind === 71 /* AutotypeCallExpression */) {
5553
5609
  return this.ofAutotypeCallExpression(analyzer, tokenOrKeyword.parent, options7);
5554
- } else if (tokenOrKeyword.parent.kind === 75 /* PrefixUnaryExpression */) {
5610
+ } else if (tokenOrKeyword.parent.kind === 77 /* PrefixUnaryExpression */) {
5555
5611
  return this.ofPrefixUnaryExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
5556
- } else if (tokenOrKeyword.parent.kind === 64 /* BinaryExpression */) {
5612
+ } else if (tokenOrKeyword.parent.kind === 66 /* BinaryExpression */) {
5557
5613
  return this.ofBinaryExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
5558
- } else if (tokenOrKeyword.isToken(21 /* Caret */) && (tokenOrKeyword.parent.kind === 48 /* DereferencedVariableGetterDeclaration */ || tokenOrKeyword.parent.kind === 49 /* DereferencedVariableSetterDeclaration */)) {
5614
+ } else if (tokenOrKeyword.isToken(21 /* Caret */) && (tokenOrKeyword.parent.kind === 50 /* DereferencedVariableGetterDeclaration */ || tokenOrKeyword.parent.kind === 51 /* DereferencedVariableSetterDeclaration */)) {
5559
5615
  return this.ofDereferenceOperatorDeclaration(analyzer, tokenOrKeyword.parent);
5560
- } else if (tokenOrKeyword.isToken(21 /* Caret */) && tokenOrKeyword.parent.kind === 78 /* DereferenceExpression */) {
5616
+ } else if (tokenOrKeyword.isToken(21 /* Caret */) && tokenOrKeyword.parent.kind === 80 /* DereferenceExpression */) {
5561
5617
  return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
5562
- } else if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
5618
+ } else if (tokenOrKeyword.parent.kind === 94 /* AssignmentStatement */) {
5563
5619
  return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options7);
5564
- } else if (tokenOrKeyword.isKeyword(31 /* Creation */) && tokenOrKeyword.parent.kind === 43 /* ConstructorDeclaration */) {
5620
+ } else if (tokenOrKeyword.isKeyword(32 /* Creation */) && tokenOrKeyword.parent.kind === 45 /* ConstructorDeclaration */) {
5565
5621
  return this.ofConstructorDeclaration(analyzer, tokenOrKeyword.parent);
5566
- } else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 91 /* DefaultMatchExpression */) {
5622
+ } else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 93 /* DefaultMatchExpression */) {
5567
5623
  return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
5568
- } else if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 65 /* FunctionLiteral */) {
5624
+ } else if (tokenOrKeyword.isKeyword(13 /* Function */) && tokenOrKeyword.parent.kind === 67 /* FunctionLiteral */) {
5569
5625
  return this.ofRegularOrBlockFunctionLiteral(analyzer, tokenOrKeyword.parent);
5570
- } else if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 95 /* FunctionBlock */ && tokenOrKeyword.parent.parent.kind === 66 /* FunctionBlockLiteral */) {
5626
+ } else if (tokenOrKeyword.isToken(46 /* OpenBrace */) && tokenOrKeyword.parent.kind === 97 /* FunctionBlock */ && tokenOrKeyword.parent.parent.kind === 68 /* FunctionBlockLiteral */) {
5571
5627
  return this.ofRegularOrBlockFunctionLiteral(analyzer, tokenOrKeyword.parent.parent);
5572
- } else if (tokenOrKeyword.isKeyword(4 /* Object */) && tokenOrKeyword.parent.kind === 87 /* ObjectExpression */) {
5628
+ } else if (tokenOrKeyword.isKeyword(4 /* Object */) && tokenOrKeyword.parent.kind === 89 /* ObjectExpression */) {
5573
5629
  return this.ofObjectExpression(analyzer, tokenOrKeyword.parent, options7);
5574
- } else if (tokenOrKeyword.isKeyword(56 /* Base */) && tokenOrKeyword.parent.kind === 88 /* BaseExpression */) {
5630
+ } else if (tokenOrKeyword.isKeyword(57 /* Base */) && tokenOrKeyword.parent.kind === 90 /* BaseExpression */) {
5575
5631
  return this.ofBaseExpression(analyzer, tokenOrKeyword.parent, options7);
5576
- } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 47 /* IndexParameterClause */) {
5632
+ } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 49 /* IndexParameterClause */) {
5577
5633
  return this.ofIndexedElementAccessorDeclaration(analyzer, tokenOrKeyword.parent.parent);
5578
- } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 70 /* IndexedAccessExpression */) {
5634
+ } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 72 /* IndexedAccessExpression */) {
5579
5635
  return this.ofIndexedAccessExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
5580
- } else if (tokenOrKeyword.isKeyword(31 /* Creation */) && tokenOrKeyword.parent.kind === 127 /* ConstructorTranslation */) {
5636
+ } else if (tokenOrKeyword.isKeyword(32 /* Creation */) && tokenOrKeyword.parent.kind === 129 /* ConstructorTranslation */) {
5581
5637
  return this.ofConstructorTranslationSourceConstructor(analyzer, tokenOrKeyword.parent, options7);
5582
- } else if ((tokenOrKeyword.isToken(47 /* OpenParenthesis */) || tokenOrKeyword.isToken(23 /* CloseParenthesis */)) && tokenOrKeyword.parent.kind === 126 /* TranslationParameterClause */ && tokenOrKeyword.parent.parent.kind === 127 /* ConstructorTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
5638
+ } else if ((tokenOrKeyword.isToken(47 /* OpenParenthesis */) || tokenOrKeyword.isToken(23 /* CloseParenthesis */)) && tokenOrKeyword.parent.kind === 128 /* TranslationParameterClause */ && tokenOrKeyword.parent.parent.kind === 129 /* ConstructorTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
5583
5639
  return this.ofConstructorTranslationTranslatedConstructor(analyzer, tokenOrKeyword.parent.parent, options7);
5584
- } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 128 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 129 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.sourceParameterClause === tokenOrKeyword.parent) {
5640
+ } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 130 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 131 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.sourceParameterClause === tokenOrKeyword.parent) {
5585
5641
  return this.ofIndexerTranslationSourceIndexer(analyzer, tokenOrKeyword.parent.parent, options7);
5586
- } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 128 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 129 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
5642
+ } else if ((tokenOrKeyword.isToken(48 /* OpenSquareBracket */) || tokenOrKeyword.isToken(24 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 130 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 131 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
5587
5643
  return this.ofIndexerTranslationTranslatedIndexer(analyzer, tokenOrKeyword.parent.parent, options7);
5588
5644
  }
5589
5645
  return void 0;
@@ -5600,11 +5656,11 @@ var NodeSemanticInfoService = class {
5600
5656
  let result;
5601
5657
  const parent = node.parent;
5602
5658
  switch (parent.kind) {
5603
- case 130 /* TranslationTypeParameterList */:
5659
+ case 132 /* TranslationTypeParameterList */:
5604
5660
  return this.ofTranslationTypeParameterListParameter(analyzer, node, parent, options7);
5605
- case 125 /* TranslationParameterList */:
5661
+ case 127 /* TranslationParameterList */:
5606
5662
  return this.ofTranslationParameterListParameter(analyzer, node, parent, options7);
5607
- case 150 /* Argument */: {
5663
+ case 152 /* Argument */: {
5608
5664
  const respectiveParameter = analyzer.getRespectiveParameter(parent);
5609
5665
  if (respectiveParameter !== void 0) {
5610
5666
  const target = new MatchResultParameterReferenceTarget(respectiveParameter, 0 /* Get */);
@@ -5615,46 +5671,49 @@ var NodeSemanticInfoService = class {
5615
5671
  }
5616
5672
  break;
5617
5673
  }
5618
- case 58 /* ForStatementVariableDeclaration */:
5674
+ case 60 /* ForStatementVariableDeclaration */:
5619
5675
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofForStatementVariableDeclaration(parent));
5620
5676
  break;
5621
- case 102 /* ErrorVariableDeclaration */:
5677
+ case 104 /* ErrorVariableDeclaration */:
5622
5678
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofErrorVariableDeclaration(parent));
5623
5679
  break;
5624
5680
  case 20 /* PackageAliasTypeDeclaration */:
5625
5681
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageAliasTypeDeclaration(parent));
5626
5682
  break;
5627
- case 25 /* PackageFunctionDeclaration */:
5683
+ case 22 /* PackageReducedTypeDeclaration */:
5684
+ result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageReducedTypeDeclaration(parent));
5685
+ break;
5686
+ case 27 /* PackageFunctionDeclaration */:
5628
5687
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageFunctionDeclaration(parent));
5629
5688
  break;
5630
- case 26 /* PackageFunctionTypeDeclaration */:
5689
+ case 28 /* PackageFunctionTypeDeclaration */:
5631
5690
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageFunctionTypeDeclaration(parent));
5632
5691
  break;
5633
- case 31 /* PackageStructuredTypeDeclaration */:
5692
+ case 33 /* PackageStructuredTypeDeclaration */:
5634
5693
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageStructuredTypeDeclaration(parent));
5635
5694
  break;
5636
- case 33 /* PackageVariableDeclaration */:
5695
+ case 35 /* PackageVariableDeclaration */:
5637
5696
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageVariableDeclaration(parent));
5638
5697
  break;
5639
- case 36 /* PackageVariantTypeDeclaration */:
5698
+ case 38 /* PackageVariantTypeDeclaration */:
5640
5699
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofPackageVariantTypeDeclaration(parent));
5641
5700
  break;
5642
- case 89 /* IdentifierExpression */:
5701
+ case 91 /* IdentifierExpression */:
5643
5702
  result = this.ofIdentifierExpression(analyzer, parent, options7);
5644
5703
  break;
5645
- case 56 /* NestedFunctionDeclaration */:
5704
+ case 58 /* NestedFunctionDeclaration */:
5646
5705
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofNestedFunctionDeclaration(parent));
5647
5706
  break;
5648
- case 57 /* LocalVariableDeclaration */:
5707
+ case 59 /* LocalVariableDeclaration */:
5649
5708
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofLocalVariableDeclaration(parent));
5650
5709
  break;
5651
- case 135 /* QualifiedName */:
5710
+ case 137 /* QualifiedName */:
5652
5711
  result = this.ofQualifiedNameQualifier(analyzer, parent, node, options7);
5653
5712
  break;
5654
- case 136 /* PackageVariableTranslationDeclaration */:
5655
- case 132 /* PackageFunctionTranslationDeclaration */:
5656
- case 139 /* TypeTranslationDeclaration */:
5657
- case 134 /* FunctionTypeTranslationDeclaration */: {
5713
+ case 138 /* PackageVariableTranslationDeclaration */:
5714
+ case 134 /* PackageFunctionTranslationDeclaration */:
5715
+ case 141 /* TypeTranslationDeclaration */:
5716
+ case 136 /* FunctionTypeTranslationDeclaration */: {
5658
5717
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5659
5718
  const translationTargets = translationPackage?.getPackageMemberTranslationTargets(parent);
5660
5719
  if (translationPackage !== void 0 && translationTargets !== void 0 && translationTargets.values.length > 0) {
@@ -5677,8 +5736,8 @@ var NodeSemanticInfoService = class {
5677
5736
  }
5678
5737
  break;
5679
5738
  }
5680
- case 137 /* FieldOrVariantTranslation */:
5681
- case 133 /* MethodTranslation */: {
5739
+ case 139 /* FieldOrVariantTranslation */:
5740
+ case 135 /* MethodTranslation */: {
5682
5741
  const translationPackage = this.getContainingTranslationPackage(analyzer, node);
5683
5742
  const translationTargets = translationPackage?.getTypeMemberTranslationTargets(parent);
5684
5743
  if (translationPackage !== void 0 && translationTargets !== void 0 && translationTargets.values.length > 0) {
@@ -5701,7 +5760,7 @@ var NodeSemanticInfoService = class {
5701
5760
  }
5702
5761
  break;
5703
5762
  }
5704
- case 149 /* ParameterDeclaration */:
5763
+ case 151 /* ParameterDeclaration */:
5705
5764
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofParameterDeclaration(parent));
5706
5765
  break;
5707
5766
  case 8 /* PackageImport */:
@@ -5710,33 +5769,33 @@ var NodeSemanticInfoService = class {
5710
5769
  case 9 /* PackageName */:
5711
5770
  result = void 0;
5712
5771
  break;
5713
- case 76 /* MemberAccessExpression */:
5772
+ case 78 /* MemberAccessExpression */:
5714
5773
  result = this.ofMember(analyzer, parent, options7);
5715
5774
  break;
5716
- case 50 /* MethodDeclaration */:
5775
+ case 52 /* MethodDeclaration */:
5717
5776
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofMethodDeclaration(parent));
5718
5777
  break;
5719
- case 51 /* OperatorDeclaration */:
5778
+ case 53 /* OperatorDeclaration */:
5720
5779
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofOperatorDeclaration(parent));
5721
5780
  break;
5722
- case 52 /* FieldDeclaration */:
5781
+ case 54 /* FieldDeclaration */:
5723
5782
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofFieldDeclaration(parent));
5724
5783
  break;
5725
- case 148 /* TypeParameterDeclaration */:
5784
+ case 150 /* TypeParameterDeclaration */:
5726
5785
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTypeParameterDeclaration(parent));
5727
5786
  break;
5728
- case 147 /* VariantValueDeclaration */:
5787
+ case 149 /* VariantValueDeclaration */:
5729
5788
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofVariantValueDeclaration(parent));
5730
5789
  break;
5731
- case 34 /* PackageVariableGetterDeclaration */:
5732
- case 35 /* PackageVariableSetterDeclaration */:
5790
+ case 36 /* PackageVariableGetterDeclaration */:
5791
+ case 37 /* PackageVariableSetterDeclaration */:
5733
5792
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofComputedPackageVariableDeclaration(parent));
5734
5793
  break;
5735
- case 53 /* FieldGetterDeclaration */:
5736
- case 54 /* FieldSetterDeclaration */:
5794
+ case 55 /* FieldGetterDeclaration */:
5795
+ case 56 /* FieldSetterDeclaration */:
5737
5796
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofComputedFieldDeclaration(parent));
5738
5797
  break;
5739
- case 146 /* TranslationTextTemplateParameter */:
5798
+ case 148 /* TranslationTextTemplateParameter */:
5740
5799
  result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTranslationTextTemplateParameter(parent));
5741
5800
  break;
5742
5801
  case 3 /* Keyword */:
@@ -5885,9 +5944,9 @@ var NodeSemanticInfoService = class {
5885
5944
  switch (node.parent.kind) {
5886
5945
  case 10 /* NamedTypeSpecifier */:
5887
5946
  return this.ofNamedTypeSpecifierNameQualifier(analyzer, node.parent, qualifier, options7);
5888
- case 152 /* Tag */:
5947
+ case 154 /* Tag */:
5889
5948
  return this.ofTagNameQualifier(analyzer, node.parent, qualifier, options7);
5890
- case 40 /* ExtendedTypeClause */:
5949
+ case 42 /* ExtendedTypeClause */:
5891
5950
  return void 0;
5892
5951
  default:
5893
5952
  Debug.never(node.parent);
@@ -6386,7 +6445,7 @@ var NodeSemanticInfoService = class {
6386
6445
  }
6387
6446
  static ofPackageNameSegmentAccess(analyzer, packageTreeNode, node) {
6388
6447
  let parent = getParentSkippingParenthesizedExpressions(node);
6389
- while (parent.kind === 76 /* MemberAccessExpression */) {
6448
+ while (parent.kind === 78 /* MemberAccessExpression */) {
6390
6449
  const meaning = analyzer.resolveMemberAccessExpression(parent);
6391
6450
  if (meaning.kind === "package-name-segment-access") {
6392
6451
  packageTreeNode = meaning.packageTreeNode;
@@ -6431,12 +6490,12 @@ var NodeSemanticInfoService = class {
6431
6490
  const translationDeclaration = typeParameterList.parent.parent;
6432
6491
  let translationTargets;
6433
6492
  switch (translationDeclaration.kind) {
6434
- case 132 /* PackageFunctionTranslationDeclaration */:
6435
- case 134 /* FunctionTypeTranslationDeclaration */:
6436
- case 139 /* TypeTranslationDeclaration */:
6493
+ case 134 /* PackageFunctionTranslationDeclaration */:
6494
+ case 136 /* FunctionTypeTranslationDeclaration */:
6495
+ case 141 /* TypeTranslationDeclaration */:
6437
6496
  translationTargets = translationPackage.getPackageMemberTranslationTargets(translationDeclaration);
6438
6497
  break;
6439
- case 133 /* MethodTranslation */:
6498
+ case 135 /* MethodTranslation */:
6440
6499
  translationTargets = translationPackage.getTypeMemberTranslationTargets(translationDeclaration);
6441
6500
  break;
6442
6501
  default:
@@ -6476,13 +6535,13 @@ var NodeSemanticInfoService = class {
6476
6535
  const translationDeclaration = parameterList.parent.parent;
6477
6536
  let translationTargets;
6478
6537
  switch (translationDeclaration.kind) {
6479
- case 132 /* PackageFunctionTranslationDeclaration */:
6480
- case 134 /* FunctionTypeTranslationDeclaration */:
6538
+ case 134 /* PackageFunctionTranslationDeclaration */:
6539
+ case 136 /* FunctionTypeTranslationDeclaration */:
6481
6540
  translationTargets = translationPackage.getPackageMemberTranslationTargets(translationDeclaration);
6482
6541
  break;
6483
- case 133 /* MethodTranslation */:
6484
- case 127 /* ConstructorTranslation */:
6485
- case 129 /* IndexerTranslation */:
6542
+ case 135 /* MethodTranslation */:
6543
+ case 129 /* ConstructorTranslation */:
6544
+ case 131 /* IndexerTranslation */:
6486
6545
  translationTargets = translationPackage.getTypeMemberTranslationTargets(translationDeclaration);
6487
6546
  break;
6488
6547
  default:
@@ -6761,57 +6820,58 @@ function getEntitySourceLocations(analyzer, entity) {
6761
6820
  range = node.rangeWithoutTrivia;
6762
6821
  break;
6763
6822
  case 20 /* PackageAliasTypeDeclaration */:
6764
- case 25 /* PackageFunctionDeclaration */:
6765
- case 26 /* PackageFunctionTypeDeclaration */:
6766
- case 31 /* PackageStructuredTypeDeclaration */:
6767
- case 36 /* PackageVariantTypeDeclaration */:
6768
- case 56 /* NestedFunctionDeclaration */:
6769
- case 50 /* MethodDeclaration */:
6770
- case 148 /* TypeParameterDeclaration */:
6771
- case 51 /* OperatorDeclaration */:
6823
+ case 22 /* PackageReducedTypeDeclaration */:
6824
+ case 27 /* PackageFunctionDeclaration */:
6825
+ case 28 /* PackageFunctionTypeDeclaration */:
6826
+ case 33 /* PackageStructuredTypeDeclaration */:
6827
+ case 38 /* PackageVariantTypeDeclaration */:
6828
+ case 58 /* NestedFunctionDeclaration */:
6829
+ case 52 /* MethodDeclaration */:
6830
+ case 150 /* TypeParameterDeclaration */:
6831
+ case 53 /* OperatorDeclaration */:
6772
6832
  range = node.name.rangeWithoutTrivia;
6773
6833
  break;
6774
- case 43 /* ConstructorDeclaration */:
6834
+ case 45 /* ConstructorDeclaration */:
6775
6835
  range = node.creationKeyword.rangeWithoutTrivia;
6776
6836
  break;
6777
- case 44 /* DestructorDeclaration */:
6837
+ case 46 /* DestructorDeclaration */:
6778
6838
  range = node.destructionKeyword.rangeWithoutTrivia;
6779
6839
  break;
6780
6840
  case 8 /* PackageImport */:
6781
6841
  Debug.assertNotNull(node.alias);
6782
6842
  range = node.alias.rangeWithoutTrivia;
6783
6843
  break;
6784
- case 38 /* TypeExtensionDeclaration */:
6844
+ case 40 /* TypeExtensionDeclaration */:
6785
6845
  range = node.plusEqualsToken.rangeWithoutTrivia;
6786
6846
  break;
6787
- case 34 /* PackageVariableGetterDeclaration */:
6847
+ case 36 /* PackageVariableGetterDeclaration */:
6788
6848
  range = node.getKeyword.rangeWithoutTrivia;
6789
6849
  break;
6790
- case 35 /* PackageVariableSetterDeclaration */:
6850
+ case 37 /* PackageVariableSetterDeclaration */:
6791
6851
  range = node.setKeyword.rangeWithoutTrivia;
6792
6852
  break;
6793
- case 53 /* FieldGetterDeclaration */:
6853
+ case 55 /* FieldGetterDeclaration */:
6794
6854
  range = node.getKeyword.rangeWithoutTrivia;
6795
6855
  break;
6796
- case 54 /* FieldSetterDeclaration */:
6856
+ case 56 /* FieldSetterDeclaration */:
6797
6857
  range = node.setKeyword.rangeWithoutTrivia;
6798
6858
  break;
6799
- case 45 /* IndexedElementGetterDeclaration */:
6859
+ case 47 /* IndexedElementGetterDeclaration */:
6800
6860
  range = node.parameterClause.rangeWithoutTrivia;
6801
6861
  break;
6802
- case 46 /* IndexedElementSetterDeclaration */:
6862
+ case 48 /* IndexedElementSetterDeclaration */:
6803
6863
  range = node.parameterClause.rangeWithoutTrivia;
6804
6864
  break;
6805
- case 48 /* DereferencedVariableGetterDeclaration */:
6865
+ case 50 /* DereferencedVariableGetterDeclaration */:
6806
6866
  range = node.caretToken.rangeWithoutTrivia;
6807
6867
  break;
6808
- case 49 /* DereferencedVariableSetterDeclaration */:
6868
+ case 51 /* DereferencedVariableSetterDeclaration */:
6809
6869
  range = node.caretToken.rangeWithoutTrivia;
6810
6870
  break;
6811
- case 65 /* FunctionLiteral */:
6871
+ case 67 /* FunctionLiteral */:
6812
6872
  range = node.functionKeyword.rangeWithoutTrivia;
6813
6873
  break;
6814
- case 66 /* FunctionBlockLiteral */:
6874
+ case 68 /* FunctionBlockLiteral */:
6815
6875
  range = node.block.openBraceToken.rangeWithoutTrivia;
6816
6876
  break;
6817
6877
  default:
@@ -7010,48 +7070,48 @@ var DefinitionService = class {
7010
7070
  getSourceLocationOfSubprogramNode(analyzer, node) {
7011
7071
  let range;
7012
7072
  switch (node.kind) {
7013
- case 25 /* PackageFunctionDeclaration */:
7014
- case 34 /* PackageVariableGetterDeclaration */:
7015
- case 35 /* PackageVariableSetterDeclaration */:
7016
- case 50 /* MethodDeclaration */:
7017
- case 53 /* FieldGetterDeclaration */:
7018
- case 54 /* FieldSetterDeclaration */:
7019
- case 56 /* NestedFunctionDeclaration */:
7073
+ case 27 /* PackageFunctionDeclaration */:
7074
+ case 36 /* PackageVariableGetterDeclaration */:
7075
+ case 37 /* PackageVariableSetterDeclaration */:
7076
+ case 52 /* MethodDeclaration */:
7077
+ case 55 /* FieldGetterDeclaration */:
7078
+ case 56 /* FieldSetterDeclaration */:
7079
+ case 58 /* NestedFunctionDeclaration */:
7020
7080
  range = node.name.rangeWithoutTrivia;
7021
7081
  break;
7022
- case 23 /* PackageConstructorDeclaration */:
7082
+ case 25 /* PackageConstructorDeclaration */:
7023
7083
  range = node.creationKeyword.rangeWithoutTrivia;
7024
7084
  break;
7025
- case 24 /* PackageEntryPointDeclaration */:
7085
+ case 26 /* PackageEntryPointDeclaration */:
7026
7086
  range = node.runKeyword.rangeWithoutTrivia;
7027
7087
  break;
7028
- case 43 /* ConstructorDeclaration */:
7088
+ case 45 /* ConstructorDeclaration */:
7029
7089
  range = node.creationKeyword.rangeWithoutTrivia;
7030
7090
  break;
7031
- case 44 /* DestructorDeclaration */:
7091
+ case 46 /* DestructorDeclaration */:
7032
7092
  range = node.destructionKeyword.rangeWithoutTrivia;
7033
7093
  break;
7034
- case 45 /* IndexedElementGetterDeclaration */:
7035
- case 46 /* IndexedElementSetterDeclaration */:
7094
+ case 47 /* IndexedElementGetterDeclaration */:
7095
+ case 48 /* IndexedElementSetterDeclaration */:
7036
7096
  range = node.parameterClause.rangeWithoutTrivia;
7037
7097
  break;
7038
- case 48 /* DereferencedVariableGetterDeclaration */:
7039
- case 49 /* DereferencedVariableSetterDeclaration */:
7098
+ case 50 /* DereferencedVariableGetterDeclaration */:
7099
+ case 51 /* DereferencedVariableSetterDeclaration */:
7040
7100
  range = node.caretToken.rangeWithoutTrivia;
7041
7101
  break;
7042
- case 51 /* OperatorDeclaration */:
7102
+ case 53 /* OperatorDeclaration */:
7043
7103
  range = node.name.rangeWithoutTrivia;
7044
7104
  break;
7045
- case 66 /* FunctionBlockLiteral */:
7105
+ case 68 /* FunctionBlockLiteral */:
7046
7106
  range = node.block.openBraceToken.rangeWithoutTrivia;
7047
7107
  break;
7048
- case 65 /* FunctionLiteral */: {
7108
+ case 67 /* FunctionLiteral */: {
7049
7109
  const rangeStart = node.functionKeyword.rangeWithoutTrivia.start;
7050
7110
  const rangeEnd = node.parameterClause.rangeWithoutTrivia.end;
7051
7111
  range = new Range(rangeStart, rangeEnd);
7052
7112
  break;
7053
7113
  }
7054
- case 141 /* TextTranslationFunctionDeclaration */:
7114
+ case 143 /* TextTranslationFunctionDeclaration */:
7055
7115
  range = node.sourceText.rangeWithoutTrivia;
7056
7116
  break;
7057
7117
  default:
@@ -7124,7 +7184,7 @@ var ReferencesService = class {
7124
7184
  }
7125
7185
  }
7126
7186
  if (!options7.onlyNamed) {
7127
- if (node.kind === 69 /* AutotypeCallExpression */ && restrictions.canBeAutotypeCall) {
7187
+ if (node.kind === 71 /* AutotypeCallExpression */ && restrictions.canBeAutotypeCall) {
7128
7188
  const semanticInfo = NodeSemanticInfoService.ofAutotypeCallExpression(analyzer, node, semanticInfoOptions);
7129
7189
  const referenceKind = this.ifReferenceToSomeOfDefinitionsThenKind(
7130
7190
  definitions,
@@ -7136,7 +7196,7 @@ var ReferencesService = class {
7136
7196
  result.push(new Reference(sourceFile2, node.autotypeKeyword.rangeWithoutTrivia, referenceKind));
7137
7197
  }
7138
7198
  }
7139
- if (node.kind === 75 /* PrefixUnaryExpression */ && restrictions.canBePrefixUnaryOperator) {
7199
+ if (node.kind === 77 /* PrefixUnaryExpression */ && restrictions.canBePrefixUnaryOperator) {
7140
7200
  const semanticInfo = NodeSemanticInfoService.ofPrefixUnaryExpressionOperator(
7141
7201
  analyzer,
7142
7202
  node,
@@ -7152,7 +7212,7 @@ var ReferencesService = class {
7152
7212
  result.push(new Reference(sourceFile2, node.operator.rangeWithoutTrivia, referenceKind));
7153
7213
  }
7154
7214
  }
7155
- if (node.kind === 64 /* BinaryExpression */ && restrictions.canBeBinaryExpressionOperator) {
7215
+ if (node.kind === 66 /* BinaryExpression */ && restrictions.canBeBinaryExpressionOperator) {
7156
7216
  const semanticInfo = NodeSemanticInfoService.ofBinaryExpressionOperator(
7157
7217
  analyzer,
7158
7218
  node,
@@ -7168,7 +7228,7 @@ var ReferencesService = class {
7168
7228
  result.push(new Reference(sourceFile2, node.operator.rangeWithoutTrivia, referenceKind));
7169
7229
  }
7170
7230
  }
7171
- if ((node.kind === 48 /* DereferencedVariableGetterDeclaration */ || node.kind === 49 /* DereferencedVariableSetterDeclaration */) && restrictions.canBeDereferenceOperator) {
7231
+ if ((node.kind === 50 /* DereferencedVariableGetterDeclaration */ || node.kind === 51 /* DereferencedVariableSetterDeclaration */) && restrictions.canBeDereferenceOperator) {
7172
7232
  const semanticInfo = NodeSemanticInfoService.ofDereferenceOperatorDeclaration(analyzer, node);
7173
7233
  const referenceKind = this.ifReferenceToSomeOfDefinitionsThenKind(
7174
7234
  definitions,
@@ -7180,7 +7240,7 @@ var ReferencesService = class {
7180
7240
  result.push(new Reference(sourceFile2, node.caretToken.rangeWithoutTrivia, referenceKind));
7181
7241
  }
7182
7242
  }
7183
- if (node.kind === 78 /* DereferenceExpression */ && restrictions.canBeDereferenceOperator) {
7243
+ if (node.kind === 80 /* DereferenceExpression */ && restrictions.canBeDereferenceOperator) {
7184
7244
  const semanticInfo = NodeSemanticInfoService.ofDereferenceExpressionOperator(
7185
7245
  analyzer,
7186
7246
  node,
@@ -7196,7 +7256,7 @@ var ReferencesService = class {
7196
7256
  result.push(new Reference(sourceFile2, node.caretToken.rangeWithoutTrivia, referenceKind));
7197
7257
  }
7198
7258
  }
7199
- if (node.kind === 92 /* AssignmentStatement */ && restrictions.canBeAssignmentStatementOperator) {
7259
+ if (node.kind === 94 /* AssignmentStatement */ && restrictions.canBeAssignmentStatementOperator) {
7200
7260
  const semanticInfo = NodeSemanticInfoService.ofAssignmentStatementOperator(
7201
7261
  analyzer,
7202
7262
  node,
@@ -7212,7 +7272,7 @@ var ReferencesService = class {
7212
7272
  result.push(new Reference(sourceFile2, node.operator.rangeWithoutTrivia, referenceKind));
7213
7273
  }
7214
7274
  }
7215
- if (node.kind === 43 /* ConstructorDeclaration */ && restrictions.canBeConstructorDeclaration) {
7275
+ if (node.kind === 45 /* ConstructorDeclaration */ && restrictions.canBeConstructorDeclaration) {
7216
7276
  const semanticInfo = NodeSemanticInfoService.ofConstructorDeclaration(analyzer, node);
7217
7277
  const referenceKind = this.ifReferenceToSomeOfDefinitionsThenKind(
7218
7278
  definitions,
@@ -7224,7 +7284,7 @@ var ReferencesService = class {
7224
7284
  result.push(new Reference(sourceFile2, node.creationKeyword.rangeWithoutTrivia, referenceKind));
7225
7285
  }
7226
7286
  }
7227
- if (node.kind === 87 /* ObjectExpression */ && restrictions.canBeObjectExpression) {
7287
+ if (node.kind === 89 /* ObjectExpression */ && restrictions.canBeObjectExpression) {
7228
7288
  const semanticInfo = NodeSemanticInfoService.ofObjectExpression(analyzer, node, semanticInfoOptions);
7229
7289
  const referenceKind = this.ifReferenceToSomeOfDefinitionsThenKind(
7230
7290
  definitions,
@@ -7236,7 +7296,7 @@ var ReferencesService = class {
7236
7296
  result.push(new Reference(sourceFile2, node.keyword.rangeWithoutTrivia, referenceKind));
7237
7297
  }
7238
7298
  }
7239
- if (node.kind === 88 /* BaseExpression */ && restrictions.canBeBaseExpression) {
7299
+ if (node.kind === 90 /* BaseExpression */ && restrictions.canBeBaseExpression) {
7240
7300
  const semanticInfo = NodeSemanticInfoService.ofBaseExpression(analyzer, node, semanticInfoOptions);
7241
7301
  const referenceKind = this.ifReferenceToSomeOfDefinitionsThenKind(
7242
7302
  definitions,
@@ -7248,7 +7308,7 @@ var ReferencesService = class {
7248
7308
  result.push(new Reference(sourceFile2, node.keyword.rangeWithoutTrivia, referenceKind));
7249
7309
  }
7250
7310
  }
7251
- if ((node.kind === 45 /* IndexedElementGetterDeclaration */ || node.kind === 46 /* IndexedElementSetterDeclaration */) && restrictions.canBeIndexer) {
7311
+ if ((node.kind === 47 /* IndexedElementGetterDeclaration */ || node.kind === 48 /* IndexedElementSetterDeclaration */) && restrictions.canBeIndexer) {
7252
7312
  const semanticInfo = NodeSemanticInfoService.ofIndexedElementAccessorDeclaration(analyzer, node);
7253
7313
  const referenceKind = this.ifReferenceToSomeOfDefinitionsThenKind(
7254
7314
  definitions,
@@ -7260,7 +7320,7 @@ var ReferencesService = class {
7260
7320
  result.push(new Reference(sourceFile2, node.parameterClause.rangeWithoutTrivia, referenceKind));
7261
7321
  }
7262
7322
  }
7263
- if (node.kind === 70 /* IndexedAccessExpression */ && restrictions.canBeIndexer) {
7323
+ if (node.kind === 72 /* IndexedAccessExpression */ && restrictions.canBeIndexer) {
7264
7324
  const semanticInfo = NodeSemanticInfoService.ofIndexedAccessExpressionOperator(
7265
7325
  analyzer,
7266
7326
  node,
@@ -7280,7 +7340,7 @@ var ReferencesService = class {
7280
7340
  result.push(new Reference(sourceFile2, range, referenceKind));
7281
7341
  }
7282
7342
  }
7283
- if (node.kind === 127 /* ConstructorTranslation */ && restrictions.canBeConstructorDeclaration) {
7343
+ if (node.kind === 129 /* ConstructorTranslation */ && restrictions.canBeConstructorDeclaration) {
7284
7344
  {
7285
7345
  const semanticInfo = NodeSemanticInfoService.ofConstructorTranslationSourceConstructor(
7286
7346
  analyzer,
@@ -7318,7 +7378,7 @@ var ReferencesService = class {
7318
7378
  }
7319
7379
  }
7320
7380
  }
7321
- if (node.kind === 129 /* IndexerTranslation */ && restrictions.canBeIndexer) {
7381
+ if (node.kind === 131 /* IndexerTranslation */ && restrictions.canBeIndexer) {
7322
7382
  {
7323
7383
  const semanticInfo = NodeSemanticInfoService.ofIndexerTranslationSourceIndexer(
7324
7384
  analyzer,
@@ -7590,6 +7650,8 @@ var ReferencesService = class {
7590
7650
  }
7591
7651
  case 4 /* Alias */:
7592
7652
  return { name: entity.getName() };
7653
+ case 5 /* Reduced */:
7654
+ return { name: entity.getName() };
7593
7655
  default:
7594
7656
  Debug.never(entity);
7595
7657
  }
@@ -7709,7 +7771,7 @@ var EvaluatableExpressionService = class {
7709
7771
  let result = "";
7710
7772
  if (isIdentifier(node)) {
7711
7773
  let originalName;
7712
- if (node.parent.kind === 76 /* MemberAccessExpression */) {
7774
+ if (node.parent.kind === 78 /* MemberAccessExpression */) {
7713
7775
  const meaning = analyzer.resolveMemberAccessExpression(node.parent);
7714
7776
  let entity;
7715
7777
  switch (meaning.kind) {
@@ -7727,7 +7789,7 @@ var EvaluatableExpressionService = class {
7727
7789
  break;
7728
7790
  }
7729
7791
  originalName = entity?.getOriginalEntity().getName().keyWithoutBackQuotes;
7730
- } else if (node.parent.kind === 89 /* IdentifierExpression */) {
7792
+ } else if (node.parent.kind === 91 /* IdentifierExpression */) {
7731
7793
  const meaning = analyzer.resolveIdentifierExpression(node.parent);
7732
7794
  let entity;
7733
7795
  switch (meaning.kind) {
@@ -7755,9 +7817,9 @@ var EvaluatableExpressionService = class {
7755
7817
  getEvaluatableExpressionForIdentifier(node) {
7756
7818
  const parent = node.parent;
7757
7819
  switch (parent.kind) {
7758
- case 89 /* IdentifierExpression */:
7820
+ case 91 /* IdentifierExpression */:
7759
7821
  return parent;
7760
- case 76 /* MemberAccessExpression */:
7822
+ case 78 /* MemberAccessExpression */:
7761
7823
  if (this.isEvaluatableReceiver(parent.expression)) {
7762
7824
  return parent;
7763
7825
  }
@@ -7778,9 +7840,9 @@ var EvaluatableExpressionService = class {
7778
7840
  }
7779
7841
  isEvaluatableReceiver(expression) {
7780
7842
  switch (expression.kind) {
7781
- case 89 /* IdentifierExpression */:
7843
+ case 91 /* IdentifierExpression */:
7782
7844
  return true;
7783
- case 76 /* MemberAccessExpression */:
7845
+ case 78 /* MemberAccessExpression */:
7784
7846
  return this.isEvaluatableReceiver(expression.expression);
7785
7847
  default:
7786
7848
  return false;
@@ -7788,40 +7850,41 @@ var EvaluatableExpressionService = class {
7788
7850
  }
7789
7851
  ifNamedDeclarationThenName(node) {
7790
7852
  switch (node.kind) {
7791
- case 58 /* ForStatementVariableDeclaration */:
7853
+ case 60 /* ForStatementVariableDeclaration */:
7792
7854
  case 20 /* PackageAliasTypeDeclaration */:
7793
- case 25 /* PackageFunctionDeclaration */:
7794
- case 26 /* PackageFunctionTypeDeclaration */:
7795
- case 31 /* PackageStructuredTypeDeclaration */:
7796
- case 33 /* PackageVariableDeclaration */:
7797
- case 36 /* PackageVariantTypeDeclaration */:
7798
- case 56 /* NestedFunctionDeclaration */:
7799
- case 57 /* LocalVariableDeclaration */:
7800
- case 149 /* ParameterDeclaration */:
7801
- case 50 /* MethodDeclaration */:
7802
- case 52 /* FieldDeclaration */:
7803
- case 148 /* TypeParameterDeclaration */:
7804
- case 147 /* VariantValueDeclaration */:
7805
- case 102 /* ErrorVariableDeclaration */:
7806
- case 34 /* PackageVariableGetterDeclaration */:
7807
- case 35 /* PackageVariableSetterDeclaration */:
7808
- case 53 /* FieldGetterDeclaration */:
7809
- case 54 /* FieldSetterDeclaration */:
7810
- case 51 /* OperatorDeclaration */:
7811
- case 146 /* TranslationTextTemplateParameter */:
7855
+ case 22 /* PackageReducedTypeDeclaration */:
7856
+ case 27 /* PackageFunctionDeclaration */:
7857
+ case 28 /* PackageFunctionTypeDeclaration */:
7858
+ case 33 /* PackageStructuredTypeDeclaration */:
7859
+ case 35 /* PackageVariableDeclaration */:
7860
+ case 38 /* PackageVariantTypeDeclaration */:
7861
+ case 58 /* NestedFunctionDeclaration */:
7862
+ case 59 /* LocalVariableDeclaration */:
7863
+ case 151 /* ParameterDeclaration */:
7864
+ case 52 /* MethodDeclaration */:
7865
+ case 54 /* FieldDeclaration */:
7866
+ case 150 /* TypeParameterDeclaration */:
7867
+ case 149 /* VariantValueDeclaration */:
7868
+ case 104 /* ErrorVariableDeclaration */:
7869
+ case 36 /* PackageVariableGetterDeclaration */:
7870
+ case 37 /* PackageVariableSetterDeclaration */:
7871
+ case 55 /* FieldGetterDeclaration */:
7872
+ case 56 /* FieldSetterDeclaration */:
7873
+ case 53 /* OperatorDeclaration */:
7874
+ case 148 /* TranslationTextTemplateParameter */:
7812
7875
  return node.name;
7813
- case 89 /* IdentifierExpression */:
7814
- case 76 /* MemberAccessExpression */:
7815
- case 150 /* Argument */:
7816
- case 125 /* TranslationParameterList */:
7817
- case 130 /* TranslationTypeParameterList */:
7818
- case 132 /* PackageFunctionTranslationDeclaration */:
7819
- case 134 /* FunctionTypeTranslationDeclaration */:
7820
- case 136 /* PackageVariableTranslationDeclaration */:
7821
- case 137 /* FieldOrVariantTranslation */:
7822
- case 139 /* TypeTranslationDeclaration */:
7823
- case 135 /* QualifiedName */:
7824
- case 133 /* MethodTranslation */:
7876
+ case 91 /* IdentifierExpression */:
7877
+ case 78 /* MemberAccessExpression */:
7878
+ case 152 /* Argument */:
7879
+ case 127 /* TranslationParameterList */:
7880
+ case 132 /* TranslationTypeParameterList */:
7881
+ case 134 /* PackageFunctionTranslationDeclaration */:
7882
+ case 136 /* FunctionTypeTranslationDeclaration */:
7883
+ case 138 /* PackageVariableTranslationDeclaration */:
7884
+ case 139 /* FieldOrVariantTranslation */:
7885
+ case 141 /* TypeTranslationDeclaration */:
7886
+ case 137 /* QualifiedName */:
7887
+ case 135 /* MethodTranslation */:
7825
7888
  case 8 /* PackageImport */:
7826
7889
  case 9 /* PackageName */:
7827
7890
  case 3 /* Keyword */:
@@ -7900,12 +7963,7 @@ var HoverService = class {
7900
7963
  if (semanticInfo === void 0) {
7901
7964
  return void 0;
7902
7965
  }
7903
- this.displayService = new DisplayService(
7904
- analyzer,
7905
- sourceFile.package.locale,
7906
- sourceFile.package.dialect,
7907
- sourceFile
7908
- );
7966
+ this.displayService = new DisplayService(analyzer, sourceFile.locale, sourceFile.dialect, sourceFile);
7909
7967
  switch (semanticInfo.kind) {
7910
7968
  case "definition":
7911
7969
  return this.createHoverForEntity(semanticInfo.entity, void 0, tokenOrKeyword.value.rangeWithoutTrivia);
@@ -7974,7 +8032,7 @@ var HoverService = class {
7974
8032
  const typeText = this.displayService.displayType(firstTarget.type);
7975
8033
  return new Hover(`${keywordText}: ${typeText}`, range);
7976
8034
  } else if (firstTarget.typeContextKind === "base") {
7977
- const keywordText = this.displayService.displayKeyword(56 /* Base */);
8035
+ const keywordText = this.displayService.displayKeyword(57 /* Base */);
7978
8036
  const typeText = this.displayService.displayType(firstTarget.type);
7979
8037
  return new Hover(`${keywordText}: ${typeText}`, range);
7980
8038
  } else {
@@ -8150,7 +8208,7 @@ var ScriptEditingService = class _ScriptEditingService {
8150
8208
  result = new SourceFileEdit(sourceFile, lastAssignmentStatement.right.rangeWithoutTrivia, value);
8151
8209
  } else {
8152
8210
  const assignmentText = `${_ScriptEditingService.elementParameterNameText}.${fieldName} = ${value}`;
8153
- if (subprogramBlock.expressionOrStatementList.kind === 93 /* StatementList */) {
8211
+ if (subprogramBlock.expressionOrStatementList.kind === 95 /* StatementList */) {
8154
8212
  const lastStatement = subprogramBlock.expressionOrStatementList?.statements.last();
8155
8213
  let editRange;
8156
8214
  let indentationText;
@@ -8188,7 +8246,7 @@ var ScriptEditingService = class _ScriptEditingService {
8188
8246
  }
8189
8247
  let scriptBlockIndentation;
8190
8248
  let editStart;
8191
- if (subprogramBlock.expressionOrStatementList.kind === 93 /* StatementList */) {
8249
+ if (subprogramBlock.expressionOrStatementList.kind === 95 /* StatementList */) {
8192
8250
  const lastStatement = subprogramBlock.expressionOrStatementList.statements.last();
8193
8251
  if (lastStatement !== void 0) {
8194
8252
  const lastStatementStartCharacter = sourceFile.getPositionAt(lastStatement.rangeWithoutTrivia.start).character;
@@ -8216,7 +8274,7 @@ var ScriptEditingService = class _ScriptEditingService {
8216
8274
  }
8217
8275
  createEditDeletingBlock(sourceFile, scriptDeclaration) {
8218
8276
  let result;
8219
- if (NodeTypeUtils.isRegularOrBlockFunctionLiteral(scriptDeclaration) && scriptDeclaration.parent.kind === 150 /* Argument */ && scriptDeclaration.parent.parent.parent.kind === 68 /* CallExpression */) {
8277
+ if (NodeTypeUtils.isRegularOrBlockFunctionLiteral(scriptDeclaration) && scriptDeclaration.parent.kind === 152 /* Argument */ && scriptDeclaration.parent.parent.parent.kind === 70 /* CallExpression */) {
8220
8278
  const callExpression = scriptDeclaration.parent.parent.parent;
8221
8279
  let rangeStart = callExpression.rangeWithoutTrivia.start;
8222
8280
  let rangeEnd = callExpression.rangeWithoutTrivia.end;
@@ -8243,20 +8301,20 @@ var ScriptEditingService = class _ScriptEditingService {
8243
8301
  return result;
8244
8302
  }
8245
8303
  findLastAssignmentToField(analyzer, block, fieldNameText) {
8246
- if (block.expressionOrStatementList.kind !== 93 /* StatementList */) {
8304
+ if (block.expressionOrStatementList.kind !== 95 /* StatementList */) {
8247
8305
  return void 0;
8248
8306
  }
8249
8307
  const fieldName = new Name(fieldNameText);
8250
8308
  const statements = block.expressionOrStatementList.statements.toArray();
8251
8309
  for (let i = statements.length - 1; i >= 0; i--) {
8252
8310
  const statement = statements[i];
8253
- if (statement.kind === 92 /* AssignmentStatement */) {
8311
+ if (statement.kind === 94 /* AssignmentStatement */) {
8254
8312
  const left = unwrapParenthesizedExpressions(statement.left);
8255
- if (left.kind === 76 /* MemberAccessExpression */) {
8313
+ if (left.kind === 78 /* MemberAccessExpression */) {
8256
8314
  const memberAccessMeaning = analyzer.resolveMemberAccessExpression(left);
8257
8315
  if (memberAccessMeaning.kind === "instance-field-access" && memberAccessMeaning.field.getName().considerEqual(fieldName)) {
8258
8316
  const receiver = unwrapParenthesizedExpressions(left.expression);
8259
- if (receiver.kind === 89 /* IdentifierExpression */) {
8317
+ if (receiver.kind === 91 /* IdentifierExpression */) {
8260
8318
  const receiverMeaning = analyzer.resolveIdentifierExpression(receiver);
8261
8319
  if (receiverMeaning.kind === "variable-access" && receiverMeaning.variable.getName().considerEqual(_ScriptEditingService.elementParameterName)) {
8262
8320
  return statement;
@@ -8345,13 +8403,13 @@ var SelectionRangeService = class {
8345
8403
  }
8346
8404
  }
8347
8405
  switch (node.kind) {
8348
- case 161 /* TypeAnnotation */:
8349
- case 32 /* StructuredTypeDeclarationBody */:
8350
- case 37 /* VariantTypeDeclarationBody */:
8406
+ case 163 /* TypeAnnotation */:
8407
+ case 34 /* StructuredTypeDeclarationBody */:
8408
+ case 39 /* VariantTypeDeclarationBody */:
8351
8409
  case 21 /* AliasTypeDeclarationBody */:
8352
- case 27 /* FunctionTypeDeclarationBody */:
8353
- case 82 /* TextTemplateSpan */:
8354
- case 81 /* TextTemplateSpanList */:
8410
+ case 29 /* FunctionTypeDeclarationBody */:
8411
+ case 84 /* TextTemplateSpan */:
8412
+ case 83 /* TextTemplateSpanList */:
8355
8413
  return true;
8356
8414
  default:
8357
8415
  return false;
@@ -8389,7 +8447,7 @@ var SemanticTokensService = class {
8389
8447
  controller.skipChildrenTraverse();
8390
8448
  return;
8391
8449
  }
8392
- if (node.kind === 89 /* IdentifierExpression */) {
8450
+ if (node.kind === 91 /* IdentifierExpression */) {
8393
8451
  const meaning = analyzer.resolveIdentifierExpression(node);
8394
8452
  if (meaning.kind === "variable-access") {
8395
8453
  const variable = meaning.variable.getEntity();
@@ -8443,7 +8501,7 @@ var SemanticTokensService = class {
8443
8501
  ));
8444
8502
  }
8445
8503
  }
8446
- if (node.kind === 76 /* MemberAccessExpression */) {
8504
+ if (node.kind === 78 /* MemberAccessExpression */) {
8447
8505
  const meaning = analyzer.resolveMemberAccessExpression(node);
8448
8506
  if (meaning.kind === "static-field-access") {
8449
8507
  const entity = meaning.field.getEntity();
@@ -8487,7 +8545,7 @@ var SemanticTokensService = class {
8487
8545
  ));
8488
8546
  }
8489
8547
  }
8490
- if (node.kind === 147 /* VariantValueDeclaration */) {
8548
+ if (node.kind === 149 /* VariantValueDeclaration */) {
8491
8549
  result.push(
8492
8550
  new SemanticToken(
8493
8551
  node.name.rangeWithoutTrivia,
@@ -8496,7 +8554,7 @@ var SemanticTokensService = class {
8496
8554
  )
8497
8555
  );
8498
8556
  }
8499
- if (node.kind === 25 /* PackageFunctionDeclaration */) {
8557
+ if (node.kind === 27 /* PackageFunctionDeclaration */) {
8500
8558
  result.push(
8501
8559
  new SemanticToken(
8502
8560
  node.name.rangeWithoutTrivia,
@@ -8505,7 +8563,7 @@ var SemanticTokensService = class {
8505
8563
  )
8506
8564
  );
8507
8565
  }
8508
- if (node.kind === 56 /* NestedFunctionDeclaration */) {
8566
+ if (node.kind === 58 /* NestedFunctionDeclaration */) {
8509
8567
  result.push(
8510
8568
  new SemanticToken(
8511
8569
  node.name.rangeWithoutTrivia,
@@ -8514,12 +8572,12 @@ var SemanticTokensService = class {
8514
8572
  )
8515
8573
  );
8516
8574
  }
8517
- if (node.kind === 50 /* MethodDeclaration */) {
8575
+ if (node.kind === 52 /* MethodDeclaration */) {
8518
8576
  result.push(
8519
8577
  new SemanticToken(node.name.rangeWithoutTrivia, 6 /* Method */, new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(node.name.value)))
8520
8578
  );
8521
8579
  }
8522
- if (node.kind === 51 /* OperatorDeclaration */) {
8580
+ if (node.kind === 53 /* OperatorDeclaration */) {
8523
8581
  result.push(
8524
8582
  new SemanticToken(node.name.rangeWithoutTrivia, 7 /* Operator */, new SemanticTokenModifiers().makeDeclaration())
8525
8583
  );
@@ -8638,8 +8696,8 @@ var TypeParameterSignatureHelpProvider = class {
8638
8696
  get signatureContext() {
8639
8697
  return this.signatureContext_.getOrInsertWith(() => new SignatureContext(new DisplayService(
8640
8698
  this.analyzer,
8641
- this.sourceFile.package.locale,
8642
- this.sourceFile.package.dialect,
8699
+ this.sourceFile.locale,
8700
+ this.sourceFile.dialect,
8643
8701
  this.sourceFile
8644
8702
  )));
8645
8703
  }
@@ -8669,7 +8727,7 @@ var TypeParameterSignatureHelpProvider = class {
8669
8727
  }
8670
8728
  let node = token.parent;
8671
8729
  while (node !== void 0) {
8672
- if (node.kind === 157 /* TypeArgumentClause */ && this.offset >= node.lessThanToken.rangeWithoutTrivia.end && (node.greaterThanToken.rangeWithoutTrivia.isEmpty || this.offset <= node.greaterThanToken.rangeWithoutTrivia.start)) {
8730
+ if (node.kind === 159 /* TypeArgumentClause */ && this.offset >= node.lessThanToken.rangeWithoutTrivia.end && (node.greaterThanToken.rangeWithoutTrivia.isEmpty || this.offset <= node.greaterThanToken.rangeWithoutTrivia.start)) {
8673
8731
  const argumentIndex = this.getArgumentIndex(node.typeArgumentList, this.offset);
8674
8732
  const argumentCount = this.countArguments(node.typeArgumentList);
8675
8733
  return new NodeWithTypeArgumentsInfo(node.parent, argumentIndex, argumentCount);
@@ -8714,9 +8772,9 @@ var TypeParameterSignatureHelpProvider = class {
8714
8772
  switch (node.kind) {
8715
8773
  case 10 /* NamedTypeSpecifier */:
8716
8774
  return this.getSignaturesForNamedTypeSpecifier(node);
8717
- case 90 /* GenericSpecializationExpression */:
8775
+ case 92 /* GenericSpecializationExpression */:
8718
8776
  return this.getSignaturesForGenericSpecializationExpression(node);
8719
- case 152 /* Tag */:
8777
+ case 154 /* Tag */:
8720
8778
  return this.getSignaturesForTag(node);
8721
8779
  default:
8722
8780
  Debug.never(node);
@@ -8750,7 +8808,7 @@ var TypeParameterSignatureHelpProvider = class {
8750
8808
  }
8751
8809
  getSignaturesForGenericSpecializationExpression(node) {
8752
8810
  const expression = unwrapParenthesizedExpressions(node.expression);
8753
- if (expression.kind === 89 /* IdentifierExpression */) {
8811
+ if (expression.kind === 91 /* IdentifierExpression */) {
8754
8812
  const meaning = this.analyzer.resolveIdentifierExpression(expression);
8755
8813
  if (meaning.kind === "function-access") {
8756
8814
  return Query.from(meaning.candidates).mapAndFilter((f) => this.getSignatureForAccessedFunction(f)).toArray();
@@ -8763,7 +8821,7 @@ var TypeParameterSignatureHelpProvider = class {
8763
8821
  }
8764
8822
  return void 0;
8765
8823
  }
8766
- if (expression.kind === 76 /* MemberAccessExpression */) {
8824
+ if (expression.kind === 78 /* MemberAccessExpression */) {
8767
8825
  const meaning = this.analyzer.resolveMemberAccessExpression(expression);
8768
8826
  let accessedFunctions;
8769
8827
  if (meaning.kind === "instance-method-access") {
@@ -8844,6 +8902,11 @@ var TypeParameterSignatureHelpProvider = class {
8844
8902
  result = new AliasTypeSignature(this.signatureContext, type);
8845
8903
  }
8846
8904
  break;
8905
+ case 5 /* Reduced */:
8906
+ if (type.getArity() > 0) {
8907
+ result = new ReducedTypeSignature(this.signatureContext, type);
8908
+ }
8909
+ break;
8847
8910
  case 2 /* Parameter */:
8848
8911
  break;
8849
8912
  default:
@@ -8949,6 +9012,21 @@ var AliasTypeSignature = class {
8949
9012
  return this.ctx.convertNamedTypeDisplayParts(displayParts);
8950
9013
  }
8951
9014
  };
9015
+ var ReducedTypeSignature = class {
9016
+ constructor(ctx, type) {
9017
+ this.ctx = ctx;
9018
+ this.type = type;
9019
+ this.kind = "reduced-type";
9020
+ }
9021
+ getArity() {
9022
+ return this.type.getArity();
9023
+ }
9024
+ getDisplayParts() {
9025
+ const type = new NamedType_reduced(this.type);
9026
+ const displayParts = this.ctx.displayService.getNamedTypeDisplayParts(type);
9027
+ return this.ctx.convertNamedTypeDisplayParts(displayParts);
9028
+ }
9029
+ };
8952
9030
  var SignatureContext = class {
8953
9031
  constructor(displayService) {
8954
9032
  this.displayService = displayService;
@@ -8974,8 +9052,8 @@ var ParametersSignatureHelpProvider = class {
8974
9052
  get signatureContext() {
8975
9053
  return this.signatureContext_.getOrInsertWith(() => new SignatureContext2(new DisplayService(
8976
9054
  this.analyzer,
8977
- this.sourceFile.package.locale,
8978
- this.sourceFile.package.dialect,
9055
+ this.sourceFile.locale,
9056
+ this.sourceFile.dialect,
8979
9057
  this.sourceFile
8980
9058
  )));
8981
9059
  }
@@ -9026,7 +9104,7 @@ var ParametersSignatureHelpProvider = class {
9026
9104
  let node = token.parent;
9027
9105
  while (node !== void 0) {
9028
9106
  switch (node.kind) {
9029
- case 68 /* CallExpression */: {
9107
+ case 70 /* CallExpression */: {
9030
9108
  if (this.offset >= node.openParenthesisToken.rangeWithoutTrivia.end && (node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this.offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9031
9109
  const args = ArgumentFactory.createArgumentsOfCallExpression(node);
9032
9110
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this.offset);
@@ -9034,7 +9112,7 @@ var ParametersSignatureHelpProvider = class {
9034
9112
  }
9035
9113
  break;
9036
9114
  }
9037
- case 69 /* AutotypeCallExpression */: {
9115
+ case 71 /* AutotypeCallExpression */: {
9038
9116
  if (this.offset >= node.openParenthesisToken.rangeWithoutTrivia.end && (node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this.offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9039
9117
  const args = ArgumentFactory.createArgumentsOfAutotypeCallExpression(node);
9040
9118
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this.offset);
@@ -9042,7 +9120,7 @@ var ParametersSignatureHelpProvider = class {
9042
9120
  }
9043
9121
  break;
9044
9122
  }
9045
- case 70 /* IndexedAccessExpression */: {
9123
+ case 72 /* IndexedAccessExpression */: {
9046
9124
  if (this.offset >= node.openSquareBracketToken.rangeWithoutTrivia.end && (node.closeSquareBracketToken.rangeWithoutTrivia.isEmpty || this.offset <= node.closeSquareBracketToken.rangeWithoutTrivia.start)) {
9047
9125
  const args = ArgumentFactory.createArgumentsOfIndexedAccessExpression(node);
9048
9126
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this.offset);
@@ -9050,7 +9128,7 @@ var ParametersSignatureHelpProvider = class {
9050
9128
  }
9051
9129
  break;
9052
9130
  }
9053
- case 152 /* Tag */: {
9131
+ case 154 /* Tag */: {
9054
9132
  if (node.openParenthesisToken !== void 0 && this.offset >= node.openParenthesisToken.rangeWithoutTrivia.end && node.argumentList !== void 0 && (node.closeParenthesisToken === void 0 || node.closeParenthesisToken.rangeWithoutTrivia.isEmpty || this.offset <= node.closeParenthesisToken.rangeWithoutTrivia.start)) {
9055
9133
  const argumentIndex = this.getArgumentIndexInList(node.argumentList.elements, this.offset);
9056
9134
  const args = ArgumentFactory.createArgumentsOfTag(node);
@@ -11600,6 +11678,8 @@ var EntityToSyntax = class {
11600
11678
  return this.convertPackageVariantType(entity);
11601
11679
  case 4 /* Alias */:
11602
11680
  return this.convertPackageAliasType(entity);
11681
+ case 5 /* Reduced */:
11682
+ return this.convertPackageReducedType(entity);
11603
11683
  default:
11604
11684
  Debug.never(entity);
11605
11685
  }
@@ -11632,7 +11712,7 @@ var EntityToSyntax = class {
11632
11712
  modifiers.push(this.createHidingModifier(isHidden));
11633
11713
  }
11634
11714
  if (entity.isConstant()) {
11635
- modifiers.push(SyntaxFactory.modifier(36 /* Const */));
11715
+ modifiers.push(SyntaxFactory.modifier(37 /* Const */));
11636
11716
  }
11637
11717
  return modifiers;
11638
11718
  }
@@ -11660,7 +11740,7 @@ var EntityToSyntax = class {
11660
11740
  modifiers.push(this.createHidingModifier(isHidden));
11661
11741
  }
11662
11742
  if (entity.isAsync()) {
11663
- modifiers.push(SyntaxFactory.modifier(40 /* Async */));
11743
+ modifiers.push(SyntaxFactory.modifier(41 /* Async */));
11664
11744
  }
11665
11745
  return modifiers;
11666
11746
  }
@@ -11679,10 +11759,10 @@ var EntityToSyntax = class {
11679
11759
  modifiers.push(this.createHidingModifier(isHidden));
11680
11760
  }
11681
11761
  if (entity.markedBasic()) {
11682
- modifiers.push(SyntaxFactory.modifier(17 /* Basic */));
11762
+ modifiers.push(SyntaxFactory.modifier(18 /* Basic */));
11683
11763
  }
11684
11764
  if (entity.isAbstract()) {
11685
- modifiers.push(SyntaxFactory.modifier(38 /* Abstract */));
11765
+ modifiers.push(SyntaxFactory.modifier(39 /* Abstract */));
11686
11766
  }
11687
11767
  return modifiers;
11688
11768
  }
@@ -11702,6 +11782,22 @@ var EntityToSyntax = class {
11702
11782
  }
11703
11783
  return modifiers;
11704
11784
  }
11785
+ convertPackageReducedType(entity) {
11786
+ const tags = this.convertTags(entity.getTags());
11787
+ const modifiers = this.convertPackageReducedTypeModifiers(entity);
11788
+ const name = this.getEntityName(entity);
11789
+ const typeParameters = this.convertTypeParameters(entity.getTypeParameters());
11790
+ const body = this.createReducedTypeDeclarationBody(entity);
11791
+ return SyntaxFactory.packageReducedTypeDeclaration(tags, modifiers, name, typeParameters, body);
11792
+ }
11793
+ convertPackageReducedTypeModifiers(entity) {
11794
+ const modifiers = new Array();
11795
+ const isHidden = entity.isHidden();
11796
+ if (isHidden !== void 0) {
11797
+ modifiers.push(this.createHidingModifier(isHidden));
11798
+ }
11799
+ return modifiers;
11800
+ }
11705
11801
  convertPackageVariantType(entity) {
11706
11802
  const tags = this.convertTags(entity.getTags());
11707
11803
  const modifiers = this.convertPackageVariantTypeModifiers(entity);
@@ -11773,19 +11869,19 @@ var EntityToSyntax = class {
11773
11869
  modifiers.push(this.createHidingModifier(isHidden));
11774
11870
  }
11775
11871
  if (entity.isStatic()) {
11776
- modifiers.push(SyntaxFactory.modifier(41 /* Static */));
11872
+ modifiers.push(SyntaxFactory.modifier(42 /* Static */));
11777
11873
  }
11778
11874
  if (entity.markedBasic()) {
11779
- modifiers.push(SyntaxFactory.modifier(17 /* Basic */));
11875
+ modifiers.push(SyntaxFactory.modifier(18 /* Basic */));
11780
11876
  }
11781
11877
  if (entity.markedAbstract()) {
11782
- modifiers.push(SyntaxFactory.modifier(38 /* Abstract */));
11878
+ modifiers.push(SyntaxFactory.modifier(39 /* Abstract */));
11783
11879
  }
11784
11880
  if (entity.isOverride()) {
11785
- modifiers.push(SyntaxFactory.modifier(39 /* Override */));
11881
+ modifiers.push(SyntaxFactory.modifier(40 /* Override */));
11786
11882
  }
11787
11883
  if (entity.isConstant()) {
11788
- modifiers.push(SyntaxFactory.modifier(36 /* Const */));
11884
+ modifiers.push(SyntaxFactory.modifier(37 /* Const */));
11789
11885
  }
11790
11886
  return modifiers;
11791
11887
  }
@@ -11805,16 +11901,16 @@ var EntityToSyntax = class {
11805
11901
  modifiers.push(this.createHidingModifier(isHidden));
11806
11902
  }
11807
11903
  if (entity.isStatic()) {
11808
- modifiers.push(SyntaxFactory.modifier(41 /* Static */));
11904
+ modifiers.push(SyntaxFactory.modifier(42 /* Static */));
11809
11905
  }
11810
11906
  if (entity.markedBasic()) {
11811
- modifiers.push(SyntaxFactory.modifier(17 /* Basic */));
11907
+ modifiers.push(SyntaxFactory.modifier(18 /* Basic */));
11812
11908
  }
11813
11909
  if (entity.markedAbstract()) {
11814
- modifiers.push(SyntaxFactory.modifier(38 /* Abstract */));
11910
+ modifiers.push(SyntaxFactory.modifier(39 /* Abstract */));
11815
11911
  }
11816
11912
  if (entity.isOverride()) {
11817
- modifiers.push(SyntaxFactory.modifier(39 /* Override */));
11913
+ modifiers.push(SyntaxFactory.modifier(40 /* Override */));
11818
11914
  }
11819
11915
  return modifiers;
11820
11916
  }
@@ -11831,7 +11927,7 @@ var EntityToSyntax = class {
11831
11927
  modifiers.push(this.createHidingModifier(isHidden));
11832
11928
  }
11833
11929
  if (entity.markedAbstract()) {
11834
- modifiers.push(SyntaxFactory.modifier(38 /* Abstract */));
11930
+ modifiers.push(SyntaxFactory.modifier(39 /* Abstract */));
11835
11931
  }
11836
11932
  return modifiers;
11837
11933
  }
@@ -11848,7 +11944,7 @@ var EntityToSyntax = class {
11848
11944
  modifiers.push(this.createHidingModifier(isHidden));
11849
11945
  }
11850
11946
  if (entity.markedAbstract()) {
11851
- modifiers.push(SyntaxFactory.modifier(38 /* Abstract */));
11947
+ modifiers.push(SyntaxFactory.modifier(39 /* Abstract */));
11852
11948
  }
11853
11949
  return modifiers;
11854
11950
  }
@@ -11877,10 +11973,10 @@ var EntityToSyntax = class {
11877
11973
  modifiers.push(this.createHidingModifier(isHidden));
11878
11974
  }
11879
11975
  if (entity.isStatic()) {
11880
- modifiers.push(SyntaxFactory.modifier(41 /* Static */));
11976
+ modifiers.push(SyntaxFactory.modifier(42 /* Static */));
11881
11977
  }
11882
11978
  if (entity.markedAbstract()) {
11883
- modifiers.push(SyntaxFactory.modifier(38 /* Abstract */));
11979
+ modifiers.push(SyntaxFactory.modifier(39 /* Abstract */));
11884
11980
  }
11885
11981
  return modifiers;
11886
11982
  }
@@ -11929,6 +12025,27 @@ var EntityToSyntax = class {
11929
12025
  }
11930
12026
  return SyntaxFactory.aliasTypeDeclarationBody(aliasedType, members);
11931
12027
  }
12028
+ createReducedTypeDeclarationBody(entity) {
12029
+ let reductionSource = this.convertType(entity.getReductionSource().declared);
12030
+ if (reductionSource.kind !== 10 /* NamedTypeSpecifier */) {
12031
+ reductionSource = SyntaxFactory.namedTypeSpecifier("\u041E\u0431\u044A\u0435\u043A\u0442");
12032
+ }
12033
+ let preservedTypes;
12034
+ const baseObjectType = entity.getBaseObjectType().declared;
12035
+ const baseAspectTypes = entity.getBaseAspectTypes().declared;
12036
+ if (baseObjectType !== void 0 || baseAspectTypes.length > 0) {
12037
+ preservedTypes = [];
12038
+ if (baseObjectType !== void 0) {
12039
+ const baseObjectTypeSpecifier = this.convertType(baseObjectType);
12040
+ if (baseObjectTypeSpecifier.kind === 10 /* NamedTypeSpecifier */) {
12041
+ preservedTypes.push(baseObjectTypeSpecifier);
12042
+ }
12043
+ }
12044
+ preservedTypes.push(...baseAspectTypes.map((t) => this.convertType(t)).filter((t) => t.kind === 10 /* NamedTypeSpecifier */));
12045
+ }
12046
+ const members = this.convertTypeEntityMembers(entity.getMembers());
12047
+ return SyntaxFactory.reducedTypeDeclarationBody(reductionSource, preservedTypes, members);
12048
+ }
11932
12049
  createVariantTypeDeclarationBody(entity) {
11933
12050
  const members = this.convertTypeEntityMembers(entity.getMembers());
11934
12051
  return SyntaxFactory.variantTypeDeclarationBody(members);
@@ -11978,21 +12095,21 @@ var EntityToSyntax = class {
11978
12095
  let levelKeyword;
11979
12096
  switch (hiding.kind) {
11980
12097
  case "type":
11981
- levelKeyword = 51 /* InType */;
12098
+ levelKeyword = 52 /* InType */;
11982
12099
  break;
11983
12100
  case "type-hierarchy":
11984
- levelKeyword = 48 /* InHierarchy */;
12101
+ levelKeyword = 49 /* InHierarchy */;
11985
12102
  break;
11986
12103
  case "file":
11987
- levelKeyword = 49 /* InFile */;
12104
+ levelKeyword = 50 /* InFile */;
11988
12105
  break;
11989
12106
  case "package":
11990
- levelKeyword = 50 /* InPackage */;
12107
+ levelKeyword = 51 /* InPackage */;
11991
12108
  break;
11992
12109
  default:
11993
12110
  Debug.never(hiding);
11994
12111
  }
11995
- return SyntaxFactory.modifier(37 /* Hidden */, levelKeyword);
12112
+ return SyntaxFactory.modifier(38 /* Hidden */, levelKeyword);
11996
12113
  }
11997
12114
  convertTags(entityTags) {
11998
12115
  return [];
@@ -12010,6 +12127,8 @@ var EntityToSyntax = class {
12010
12127
  return this.convertFunctionType(type);
12011
12128
  case "alias":
12012
12129
  return this.convertAliasType(type);
12130
+ case "reduced":
12131
+ return this.convertReducedType(type);
12013
12132
  case "parameter":
12014
12133
  return this.convertParameterType(type);
12015
12134
  case "union":
@@ -12058,6 +12177,10 @@ var EntityToSyntax = class {
12058
12177
  const name = this.getEntityName(type.getEntity());
12059
12178
  return this.createNamedTypeSpecifier(name, type.getSubstitutions());
12060
12179
  }
12180
+ convertReducedType(type) {
12181
+ const name = this.getEntityName(type.getEntity());
12182
+ return this.createNamedTypeSpecifier(name, type.getSubstitutions());
12183
+ }
12061
12184
  convertParameterType(type) {
12062
12185
  const name = this.getEntityName(type.getEntity());
12063
12186
  return this.createNamedTypeSpecifier(name, type.getSubstitutions());
@@ -12298,6 +12421,7 @@ var SourceGenerationService = class extends ObservableObject7 {
12298
12421
  return true;
12299
12422
  }
12300
12423
  case 4 /* Alias */:
12424
+ case 5 /* Reduced */:
12301
12425
  return true;
12302
12426
  case 2 /* Parameter */:
12303
12427
  return this.checkIfEntityOfKindIsPresentInGeneratedCode(entity.getContainingEntity());
@@ -12403,6 +12527,8 @@ var EntityFinder = class {
12403
12527
  }
12404
12528
  case 4 /* Alias */:
12405
12529
  return this.findPackageTypeEntityByNameAndArity(this.getEntityName(entity), entity.getArity());
12530
+ case 5 /* Reduced */:
12531
+ return this.findPackageTypeEntityByNameAndArity(this.getEntityName(entity), entity.getArity());
12406
12532
  case 2 /* Parameter */:
12407
12533
  return this.findTypeParameterEntity(entity);
12408
12534
  default:
@@ -12683,10 +12809,10 @@ var SourceFileItemsService = class {
12683
12809
  return this.getChildItems(sourceFile.getSyntaxNode());
12684
12810
  }
12685
12811
  get locale() {
12686
- return this.sourceFile.package.locale;
12812
+ return this.sourceFile.locale;
12687
12813
  }
12688
12814
  get dialect() {
12689
- return this.sourceFile.package.dialect;
12815
+ return this.sourceFile.dialect;
12690
12816
  }
12691
12817
  getChildItems(node) {
12692
12818
  const result = new Array();
@@ -12705,7 +12831,7 @@ var SourceFileItemsService = class {
12705
12831
  }
12706
12832
  break;
12707
12833
  }
12708
- case 33 /* PackageVariableDeclaration */: {
12834
+ case 35 /* PackageVariableDeclaration */: {
12709
12835
  result.push(this.createItem(
12710
12836
  1 /* PackageVariable */,
12711
12837
  node2.name.value,
@@ -12715,7 +12841,7 @@ var SourceFileItemsService = class {
12715
12841
  ));
12716
12842
  break;
12717
12843
  }
12718
- case 34 /* PackageVariableGetterDeclaration */: {
12844
+ case 36 /* PackageVariableGetterDeclaration */: {
12719
12845
  result.push(this.createItem(
12720
12846
  2 /* PackageVariableGetter */,
12721
12847
  node2.name.value,
@@ -12725,7 +12851,7 @@ var SourceFileItemsService = class {
12725
12851
  ));
12726
12852
  break;
12727
12853
  }
12728
- case 35 /* PackageVariableSetterDeclaration */: {
12854
+ case 37 /* PackageVariableSetterDeclaration */: {
12729
12855
  result.push(this.createItem(
12730
12856
  3 /* PackageVariableSetter */,
12731
12857
  node2.name.value,
@@ -12735,7 +12861,7 @@ var SourceFileItemsService = class {
12735
12861
  ));
12736
12862
  break;
12737
12863
  }
12738
- case 25 /* PackageFunctionDeclaration */: {
12864
+ case 27 /* PackageFunctionDeclaration */: {
12739
12865
  result.push(this.createItem(
12740
12866
  4 /* PackageFunction */,
12741
12867
  node2.name.value,
@@ -12745,7 +12871,7 @@ var SourceFileItemsService = class {
12745
12871
  ));
12746
12872
  break;
12747
12873
  }
12748
- case 31 /* PackageStructuredTypeDeclaration */: {
12874
+ case 33 /* PackageStructuredTypeDeclaration */: {
12749
12875
  result.push(this.createItem(
12750
12876
  5 /* StructuredType */,
12751
12877
  node2.name.value,
@@ -12755,7 +12881,7 @@ var SourceFileItemsService = class {
12755
12881
  ));
12756
12882
  break;
12757
12883
  }
12758
- case 52 /* FieldDeclaration */: {
12884
+ case 54 /* FieldDeclaration */: {
12759
12885
  result.push(this.createItem(
12760
12886
  12 /* Field */,
12761
12887
  node2.name.value,
@@ -12765,7 +12891,7 @@ var SourceFileItemsService = class {
12765
12891
  ));
12766
12892
  break;
12767
12893
  }
12768
- case 53 /* FieldGetterDeclaration */: {
12894
+ case 55 /* FieldGetterDeclaration */: {
12769
12895
  result.push(this.createItem(
12770
12896
  13 /* FieldGetter */,
12771
12897
  node2.name.value,
@@ -12775,7 +12901,7 @@ var SourceFileItemsService = class {
12775
12901
  ));
12776
12902
  break;
12777
12903
  }
12778
- case 54 /* FieldSetterDeclaration */: {
12904
+ case 56 /* FieldSetterDeclaration */: {
12779
12905
  result.push(this.createItem(
12780
12906
  14 /* FieldSetter */,
12781
12907
  node2.name.value,
@@ -12785,7 +12911,7 @@ var SourceFileItemsService = class {
12785
12911
  ));
12786
12912
  break;
12787
12913
  }
12788
- case 50 /* MethodDeclaration */: {
12914
+ case 52 /* MethodDeclaration */: {
12789
12915
  result.push(this.createItem(
12790
12916
  15 /* Method */,
12791
12917
  node2.name.value,
@@ -12795,7 +12921,7 @@ var SourceFileItemsService = class {
12795
12921
  ));
12796
12922
  break;
12797
12923
  }
12798
- case 43 /* ConstructorDeclaration */: {
12924
+ case 45 /* ConstructorDeclaration */: {
12799
12925
  result.push(this.createItem(
12800
12926
  10 /* Constructor */,
12801
12927
  void 0,
@@ -12805,7 +12931,7 @@ var SourceFileItemsService = class {
12805
12931
  ));
12806
12932
  break;
12807
12933
  }
12808
- case 44 /* DestructorDeclaration */: {
12934
+ case 46 /* DestructorDeclaration */: {
12809
12935
  result.push(this.createItem(
12810
12936
  11 /* Destructor */,
12811
12937
  void 0,
@@ -12815,7 +12941,7 @@ var SourceFileItemsService = class {
12815
12941
  ));
12816
12942
  break;
12817
12943
  }
12818
- case 45 /* IndexedElementGetterDeclaration */: {
12944
+ case 47 /* IndexedElementGetterDeclaration */: {
12819
12945
  result.push(this.createItem(
12820
12946
  16 /* IndexedElementGetter */,
12821
12947
  void 0,
@@ -12825,7 +12951,7 @@ var SourceFileItemsService = class {
12825
12951
  ));
12826
12952
  break;
12827
12953
  }
12828
- case 46 /* IndexedElementSetterDeclaration */: {
12954
+ case 48 /* IndexedElementSetterDeclaration */: {
12829
12955
  result.push(this.createItem(
12830
12956
  17 /* IndexedElementSetter */,
12831
12957
  void 0,
@@ -12835,7 +12961,7 @@ var SourceFileItemsService = class {
12835
12961
  ));
12836
12962
  break;
12837
12963
  }
12838
- case 26 /* PackageFunctionTypeDeclaration */: {
12964
+ case 28 /* PackageFunctionTypeDeclaration */: {
12839
12965
  result.push(this.createItem(
12840
12966
  6 /* FunctionType */,
12841
12967
  node2.name.value,
@@ -12845,7 +12971,7 @@ var SourceFileItemsService = class {
12845
12971
  ));
12846
12972
  break;
12847
12973
  }
12848
- case 36 /* PackageVariantTypeDeclaration */: {
12974
+ case 38 /* PackageVariantTypeDeclaration */: {
12849
12975
  result.push(this.createItem(
12850
12976
  7 /* VariantType */,
12851
12977
  node2.name.value,
@@ -12855,7 +12981,7 @@ var SourceFileItemsService = class {
12855
12981
  ));
12856
12982
  break;
12857
12983
  }
12858
- case 147 /* VariantValueDeclaration */: {
12984
+ case 149 /* VariantValueDeclaration */: {
12859
12985
  result.push(this.createItem(
12860
12986
  9 /* VariantValue */,
12861
12987
  node2.name.value,
@@ -12865,7 +12991,7 @@ var SourceFileItemsService = class {
12865
12991
  ));
12866
12992
  break;
12867
12993
  }
12868
- case 148 /* TypeParameterDeclaration */: {
12994
+ case 150 /* TypeParameterDeclaration */: {
12869
12995
  result.push(this.createItem(
12870
12996
  18 /* TypeParameter */,
12871
12997
  node2.name.value,
@@ -12875,7 +13001,7 @@ var SourceFileItemsService = class {
12875
13001
  ));
12876
13002
  break;
12877
13003
  }
12878
- case 56 /* NestedFunctionDeclaration */: {
13004
+ case 58 /* NestedFunctionDeclaration */: {
12879
13005
  result.push(this.createItem(
12880
13006
  19 /* NestedFunction */,
12881
13007
  node2.name.value,
@@ -12910,30 +13036,30 @@ var SourceFileItemsService = class {
12910
13036
  case 4 /* PackageFunction */:
12911
13037
  case 15 /* Method */:
12912
13038
  case 19 /* NestedFunction */:
12913
- return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(12 /* Function */, this.locale, this.dialect)}>`;
13039
+ return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(13 /* Function */, this.locale, this.dialect)}>`;
12914
13040
  case 5 /* StructuredType */:
12915
13041
  case 6 /* FunctionType */:
12916
13042
  case 7 /* VariantType */:
12917
13043
  case 8 /* InvalidType */:
12918
- return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(16 /* Type */, this.locale, this.dialect)}>`;
13044
+ return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(17 /* Type */, this.locale, this.dialect)}>`;
12919
13045
  case 10 /* Constructor */:
12920
- return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(31 /* Creation */, this.locale, this.dialect);
13046
+ return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(32 /* Creation */, this.locale, this.dialect);
12921
13047
  case 11 /* Destructor */:
12922
- return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(47 /* Destruction */, this.locale, this.dialect);
13048
+ return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(48 /* Destruction */, this.locale, this.dialect);
12923
13049
  case 9 /* VariantValue */:
12924
- return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(6 /* Variant */, this.locale, this.dialect)}>`;
13050
+ return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(7 /* Variant */, this.locale, this.dialect)}>`;
12925
13051
  case 18 /* TypeParameter */:
12926
13052
  return name ?? `<${LocalizationHelper.localizeHelperPhrase(2 /* TypeParameter */, this.locale)}>`;
12927
13053
  case 2 /* PackageVariableGetter */:
12928
13054
  case 13 /* FieldGetter */:
12929
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(58 /* Get */, this.locale, this.dialect)} ${name ?? ""}`;
13055
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(59 /* Get */, this.locale, this.dialect)} ${name ?? ""}`;
12930
13056
  case 3 /* PackageVariableSetter */:
12931
13057
  case 14 /* FieldSetter */:
12932
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(59 /* Set */, this.locale, this.dialect)} ${name ?? ""}`;
13058
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(60 /* Set */, this.locale, this.dialect)} ${name ?? ""}`;
12933
13059
  case 16 /* IndexedElementGetter */:
12934
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(58 /* Get */, this.locale, this.dialect)} []`;
13060
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(59 /* Get */, this.locale, this.dialect)} []`;
12935
13061
  case 17 /* IndexedElementSetter */:
12936
- return `${LocalizationHelper.localizeKeywordAndTakeFirst(59 /* Set */, this.locale, this.dialect)} []`;
13062
+ return `${LocalizationHelper.localizeKeywordAndTakeFirst(60 /* Set */, this.locale, this.dialect)} []`;
12937
13063
  default:
12938
13064
  Debug.never(kind);
12939
13065
  }
@@ -13769,7 +13895,7 @@ var _LanguageServer = class _LanguageServer {
13769
13895
  const node = NodePath.parse(uri.fragment).getNode(sourceFileContext.sourceFile.getSyntaxNode());
13770
13896
  if (node !== void 0) {
13771
13897
  let nodeForRange = node;
13772
- if (node.kind === 92 /* AssignmentStatement */) {
13898
+ if (node.kind === 94 /* AssignmentStatement */) {
13773
13899
  nodeForRange = node.right;
13774
13900
  }
13775
13901
  result = this.convertSourceFileRange(sourceFileContext.sourceFile, nodeForRange.rangeWithoutTrivia);
@@ -14001,15 +14127,17 @@ ${e}`);
14001
14127
  return ls3.CompletionItemKind.Function;
14002
14128
  case 19 /* AliasType */:
14003
14129
  return ls3.CompletionItemKind.Class;
14004
- case 20 /* InvalidType */:
14130
+ case 20 /* ReducedType */:
14131
+ return ls3.CompletionItemKind.Class;
14132
+ case 21 /* InvalidType */:
14005
14133
  return ls3.CompletionItemKind.Class;
14006
- case 21 /* Keyword */:
14134
+ case 22 /* Keyword */:
14007
14135
  return ls3.CompletionItemKind.Keyword;
14008
- case 22 /* TargetSignatureParameter */:
14136
+ case 23 /* TargetSignatureParameter */:
14009
14137
  return ls3.CompletionItemKind.Variable;
14010
14138
  case 4 /* Operator */:
14011
14139
  return ls3.CompletionItemKind.Operator;
14012
- case 23 /* OperatorName */:
14140
+ case 24 /* OperatorName */:
14013
14141
  return ls3.CompletionItemKind.Operator;
14014
14142
  default:
14015
14143
  Debug.never(kind);