@artel/artc 0.6.25248 → 0.6.25250

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 (35) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +2 -2
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +40 -24
  5. package/build/{chunk-CWGZOWF7.js → chunk-DJEEXP7U.js} +648 -442
  6. package/build/{chunk-CBZMJHSW.js → chunk-VYUD26HA.js} +2 -2
  7. package/build/{chunk-JKFASNU3.js → chunk-ZZKHAAAX.js} +1 -1
  8. package/build/types/analysis/Analyzer.d.ts +11 -12
  9. package/build/types/analysis/NodeTypeUtils.d.ts +1 -1
  10. package/build/types/analysis/TypeNarrower.d.ts +1 -1
  11. package/build/types/analysis/WellKnownDeclarations.d.ts +3 -3
  12. package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -1
  13. package/build/types/analysis/semantic-context/TranslationTextTemplateSemanticContext.d.ts +2 -2
  14. package/build/types/common/HelperPhrases.d.ts +2 -1
  15. package/build/types/diagnostic/DiagnosticCode.d.ts +1 -1
  16. package/build/types/emitter/EmitterContext.d.ts +2 -2
  17. package/build/types/emitter/Entities.d.ts +1 -0
  18. package/build/types/emitter/EntityMap.d.ts +1 -0
  19. package/build/types/emitter/IrBuilder.d.ts +4 -1
  20. package/build/types/emitter/IrToJs.d.ts +1 -1
  21. package/build/types/emitter/Transformer.d.ts +4 -2
  22. package/build/types/emitter/ir/Nodes.d.ts +26 -5
  23. package/build/types/emitter/ir/types.d.ts +4 -4
  24. package/build/types/entities/VariableEntity.d.ts +2 -2
  25. package/build/types/services/DisplayService.d.ts +3 -3
  26. package/build/types/tree/KeywordKind.d.ts +1 -1
  27. package/build/types/tree/NodeKind.d.ts +5 -5
  28. package/build/types/tree/green/Nodes.d.ts +28 -28
  29. package/build/types/tree/green/SyntaxFactory.d.ts +1 -1
  30. package/build/types/tree/red/Nodes.d.ts +42 -42
  31. package/build/types/ts-interop/Entities.d.ts +0 -1
  32. package/build/types/ts-interop/TsInteropContext.d.ts +1 -1
  33. package/build/types/types/ParameterType.d.ts +3 -3
  34. package/build/types/types/StandardTypes.d.ts +2 -2
  35. package/package.json +1 -1
@@ -620,7 +620,7 @@ var UniqueWithComparatorQuery = class extends Query {
620
620
  };
621
621
 
622
622
  // source/common/Constants.ts
623
- var ArtelVersion = true ? "0.6.25248" : "";
623
+ var ArtelVersion = true ? "0.6.25250" : "";
624
624
  var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
625
625
  var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
626
626
  var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
@@ -1186,10 +1186,14 @@ __export(green_exports, {
1186
1186
  SwitchStatement: () => SwitchStatement2,
1187
1187
  Tag: () => Tag2,
1188
1188
  TagList: () => TagList2,
1189
+ TextTemplateDeclaration: () => TextTemplateDeclaration2,
1190
+ TextTemplateDeclarationSpan: () => TextTemplateDeclarationSpan2,
1191
+ TextTemplateDeclarationSpanList: () => TextTemplateDeclarationSpanList2,
1189
1192
  TextTemplateLiteral: () => TextTemplateLiteral2,
1193
+ TextTemplateParameterDeclaration: () => TextTemplateParameterDeclaration2,
1190
1194
  TextTemplateSpan: () => TextTemplateSpan2,
1191
1195
  TextTemplateSpanList: () => TextTemplateSpanList2,
1192
- TextTranslation: () => TextTranslation2,
1196
+ TextTranslationDeclaration: () => TextTranslationDeclaration2,
1193
1197
  Token: () => Token6,
1194
1198
  TokenExpression: () => TokenExpression2,
1195
1199
  TokenFlags: () => TokenFlags2,
@@ -1197,10 +1201,6 @@ __export(green_exports, {
1197
1201
  TopLevelTranslationList: () => TopLevelTranslationList2,
1198
1202
  TranslationParameterClause: () => TranslationParameterClause2,
1199
1203
  TranslationParameterList: () => TranslationParameterList2,
1200
- TranslationTextTemplate: () => TranslationTextTemplate2,
1201
- TranslationTextTemplateParameterDeclaration: () => TranslationTextTemplateParameterDeclaration2,
1202
- TranslationTextTemplateSpan: () => TranslationTextTemplateSpan2,
1203
- TranslationTextTemplateSpanList: () => TranslationTextTemplateSpanList2,
1204
1204
  TranslationTypeParameterClause: () => TranslationTypeParameterClause2,
1205
1205
  TranslationTypeParameterList: () => TranslationTypeParameterList2,
1206
1206
  TranslationsDeclaration: () => TranslationsDeclaration2,
@@ -1294,7 +1294,7 @@ var KeywordKind = /* @__PURE__ */ ((KeywordKind5) => {
1294
1294
  KeywordKind5[KeywordKind5["Reference"] = 54] = "Reference";
1295
1295
  KeywordKind5[KeywordKind5["Translations"] = 55] = "Translations";
1296
1296
  KeywordKind5[KeywordKind5["Base"] = 56] = "Base";
1297
- KeywordKind5[KeywordKind5["None"] = 57] = "None";
1297
+ KeywordKind5[KeywordKind5["Null"] = 57] = "Null";
1298
1298
  KeywordKind5[KeywordKind5["Get"] = 58] = "Get";
1299
1299
  KeywordKind5[KeywordKind5["Set"] = 59] = "Set";
1300
1300
  return KeywordKind5;
@@ -1442,11 +1442,11 @@ var NodeKind = /* @__PURE__ */ ((NodeKind3) => {
1442
1442
  NodeKind3[NodeKind3["FieldOrVariantTranslation"] = 137] = "FieldOrVariantTranslation";
1443
1443
  NodeKind3[NodeKind3["TypeMemberTranslationList"] = 138] = "TypeMemberTranslationList";
1444
1444
  NodeKind3[NodeKind3["TypeTranslation"] = 139] = "TypeTranslation";
1445
- NodeKind3[NodeKind3["TextTranslation"] = 140] = "TextTranslation";
1446
- NodeKind3[NodeKind3["TranslationTextTemplate"] = 141] = "TranslationTextTemplate";
1447
- NodeKind3[NodeKind3["TranslationTextTemplateSpanList"] = 142] = "TranslationTextTemplateSpanList";
1448
- NodeKind3[NodeKind3["TranslationTextTemplateSpan"] = 143] = "TranslationTextTemplateSpan";
1449
- NodeKind3[NodeKind3["TranslationTextTemplateParameterDeclaration"] = 144] = "TranslationTextTemplateParameterDeclaration";
1445
+ NodeKind3[NodeKind3["TextTranslationDeclaration"] = 140] = "TextTranslationDeclaration";
1446
+ NodeKind3[NodeKind3["TextTemplateDeclaration"] = 141] = "TextTemplateDeclaration";
1447
+ NodeKind3[NodeKind3["TextTemplateDeclarationSpanList"] = 142] = "TextTemplateDeclarationSpanList";
1448
+ NodeKind3[NodeKind3["TextTemplateDeclarationSpan"] = 143] = "TextTemplateDeclarationSpan";
1449
+ NodeKind3[NodeKind3["TextTemplateParameterDeclaration"] = 144] = "TextTemplateParameterDeclaration";
1450
1450
  NodeKind3[NodeKind3["VariantDeclaration"] = 145] = "VariantDeclaration";
1451
1451
  NodeKind3[NodeKind3["TypeParameterDeclaration"] = 146] = "TypeParameterDeclaration";
1452
1452
  NodeKind3[NodeKind3["ParameterDeclaration"] = 147] = "ParameterDeclaration";
@@ -1846,10 +1846,14 @@ __export(tree_exports, {
1846
1846
  SwitchStatement: () => SwitchStatement,
1847
1847
  Tag: () => Tag,
1848
1848
  TagList: () => TagList,
1849
+ TextTemplateDeclaration: () => TextTemplateDeclaration,
1850
+ TextTemplateDeclarationSpan: () => TextTemplateDeclarationSpan,
1851
+ TextTemplateDeclarationSpanList: () => TextTemplateDeclarationSpanList,
1849
1852
  TextTemplateLiteral: () => TextTemplateLiteral,
1853
+ TextTemplateParameterDeclaration: () => TextTemplateParameterDeclaration,
1850
1854
  TextTemplateSpan: () => TextTemplateSpan,
1851
1855
  TextTemplateSpanList: () => TextTemplateSpanList,
1852
- TextTranslation: () => TextTranslation,
1856
+ TextTranslationDeclaration: () => TextTranslationDeclaration,
1853
1857
  Token: () => Token4,
1854
1858
  TokenExpression: () => TokenExpression,
1855
1859
  TokenFlags: () => TokenFlags2,
@@ -1857,10 +1861,6 @@ __export(tree_exports, {
1857
1861
  TopLevelTranslationList: () => TopLevelTranslationList,
1858
1862
  TranslationParameterClause: () => TranslationParameterClause,
1859
1863
  TranslationParameterList: () => TranslationParameterList,
1860
- TranslationTextTemplate: () => TranslationTextTemplate,
1861
- TranslationTextTemplateParameterDeclaration: () => TranslationTextTemplateParameterDeclaration,
1862
- TranslationTextTemplateSpan: () => TranslationTextTemplateSpan,
1863
- TranslationTextTemplateSpanList: () => TranslationTextTemplateSpanList,
1864
1864
  TranslationTypeParameterClause: () => TranslationTypeParameterClause,
1865
1865
  TranslationTypeParameterList: () => TranslationTypeParameterList,
1866
1866
  TranslationsDeclaration: () => TranslationsDeclaration,
@@ -2095,7 +2095,7 @@ var englishKeywords = new Lazy(() => [
2095
2095
  { keyword: "loop", kind: 26 /* Loop */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2096
2096
  { keyword: "no", kind: 53 /* No */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2097
2097
  { keyword: "not", kind: 43 /* Not */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2098
- { keyword: "none", kind: 57 /* None */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2098
+ { keyword: "null", kind: 57 /* Null */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2099
2099
  { keyword: "object", kind: 4 /* Object */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2100
2100
  { keyword: "operation", kind: 12 /* Function */, dialects: [2 /* ArtelM */] },
2101
2101
  { keyword: "or", kind: 23 /* Or */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
@@ -2168,7 +2168,7 @@ var russianKeywords = new Lazy(() => [
2168
2168
  { keyword: "\u043F\u043E\u043F\u044B\u0442\u043A\u0430", kind: 8 /* Try */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2169
2169
  { keyword: "\u043F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u0446\u0438\u043A\u043B", kind: 33 /* BreakLoop */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2170
2170
  { keyword: "\u043F\u0440\u043E\u0441\u0442\u043E\u0439 \u043E\u0431\u044A\u0435\u043A\u0442", kind: 5 /* PlainObject */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2171
- { keyword: "\u043F\u0443\u0441\u0442\u043E", kind: 57 /* None */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2171
+ { keyword: "\u043F\u0443\u0441\u0442\u043E", kind: 57 /* Null */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2172
2172
  { keyword: "\u043F\u0443\u0441\u0442\u044C", kind: 1 /* Let */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2173
2173
  { keyword: "\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0446\u0438\u043A\u043B", kind: 34 /* ContinueLoop */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
2174
2174
  { keyword: "\u0441\u043E\u0437\u0434\u0430\u043D\u0438\u0435", kind: 31 /* Creation */, dialects: [1 /* ArtelA */, 2 /* ArtelM */] },
@@ -2403,7 +2403,8 @@ var russianHelperPhrases = {
2403
2403
  [5 /* PackageNameSegment */]: "\u0447\u0430\u0441\u0442\u044C \u0438\u043C\u0435\u043D\u0438 \u043F\u0430\u043A\u0435\u0442\u0430",
2404
2404
  [6 /* Variable */]: "\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F",
2405
2405
  [7 /* Overloads */]: "\u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043A\u0438",
2406
- [8 /* EnumeratorMethodName */]: "\u043F\u0435\u0440\u0435\u0431\u043E\u0440"
2406
+ [8 /* EnumeratorMethodName */]: "\u043F\u0435\u0440\u0435\u0431\u043E\u0440",
2407
+ [9 /* InvokeMethodName */]: "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C"
2407
2408
  };
2408
2409
  var englishHelperPhrases = {
2409
2410
  [0 /* Unresolved */]: "unresolved",
@@ -2414,7 +2415,8 @@ var englishHelperPhrases = {
2414
2415
  [5 /* PackageNameSegment */]: "package name segment",
2415
2416
  [6 /* Variable */]: "variable",
2416
2417
  [7 /* Overloads */]: "overloads",
2417
- [8 /* EnumeratorMethodName */]: "enumerator"
2418
+ [8 /* EnumeratorMethodName */]: "enumerator",
2419
+ [9 /* InvokeMethodName */]: "invoke"
2418
2420
  };
2419
2421
  var helperPhrases = {
2420
2422
  [1 /* Ru */]: russianHelperPhrases,
@@ -3395,7 +3397,9 @@ function parseBinaryInteger(text) {
3395
3397
  function withoutQuotes(text) {
3396
3398
  let start = 0;
3397
3399
  let end = text.length;
3398
- if (text.startsWith('"') || text.startsWith("'")) {
3400
+ if (text.startsWith('~"')) {
3401
+ start += 2;
3402
+ } else if (text.startsWith('"') || text.startsWith("'")) {
3399
3403
  start += 1;
3400
3404
  }
3401
3405
  if (text.endsWith('"') || text.endsWith("'")) {
@@ -3406,7 +3410,9 @@ function withoutQuotes(text) {
3406
3410
  function withoutTemplateQuotes(text) {
3407
3411
  let start = 0;
3408
3412
  let end = text.length;
3409
- if (text.startsWith('"') || text.startsWith("{") || text.startsWith("}")) {
3413
+ if (text.startsWith('~"')) {
3414
+ start += 2;
3415
+ } else if (text.startsWith('"') || text.startsWith("{") || text.startsWith("}")) {
3410
3416
  start += 1;
3411
3417
  }
3412
3418
  if (text.endsWith('"') || text.endsWith("{") || text.endsWith("}")) {
@@ -4071,7 +4077,7 @@ var TreeQuery = class {
4071
4077
  return analyzer.entity.ofDereferencedVariableSetterDeclaration(parent);
4072
4078
  case 51 /* OperatorDeclaration */:
4073
4079
  return analyzer.entity.ofOperatorDeclaration(parent);
4074
- case 144 /* TranslationTextTemplateParameterDeclaration */:
4080
+ case 144 /* TextTemplateParameterDeclaration */:
4075
4081
  return analyzer.entity.ofTranslationTextTemplateParameterDeclaration(parent);
4076
4082
  default:
4077
4083
  Debug.typeIsAssignableTo();
@@ -8468,10 +8474,10 @@ var TypeTranslation = class extends BaseNode {
8468
8474
  ];
8469
8475
  }
8470
8476
  };
8471
- var TextTranslation = class extends BaseNode {
8477
+ var TextTranslationDeclaration = class extends BaseNode {
8472
8478
  constructor(green, rangeStart, parent) {
8473
8479
  super(green, rangeStart, parent);
8474
- this.kind = 140 /* TextTranslation */;
8480
+ this.kind = 140 /* TextTranslationDeclaration */;
8475
8481
  }
8476
8482
  get children() {
8477
8483
  return this._children ??= this.createChildren();
@@ -8496,10 +8502,10 @@ var TextTranslation = class extends BaseNode {
8496
8502
  ];
8497
8503
  }
8498
8504
  };
8499
- var TranslationTextTemplate = class extends BaseNode {
8505
+ var TextTemplateDeclaration = class extends BaseNode {
8500
8506
  constructor(green, rangeStart, parent) {
8501
8507
  super(green, rangeStart, parent);
8502
- this.kind = 141 /* TranslationTextTemplate */;
8508
+ this.kind = 141 /* TextTemplateDeclaration */;
8503
8509
  }
8504
8510
  get children() {
8505
8511
  return this._children ??= this.createChildren();
@@ -8520,10 +8526,10 @@ var TranslationTextTemplate = class extends BaseNode {
8520
8526
  ];
8521
8527
  }
8522
8528
  };
8523
- var TranslationTextTemplateSpanList = class extends BaseNode {
8529
+ var TextTemplateDeclarationSpanList = class extends BaseNode {
8524
8530
  constructor(green, rangeStart, parent) {
8525
8531
  super(green, rangeStart, parent);
8526
- this.kind = 142 /* TranslationTextTemplateSpanList */;
8532
+ this.kind = 142 /* TextTemplateDeclarationSpanList */;
8527
8533
  }
8528
8534
  get children() {
8529
8535
  return this._children ??= this.createChildren();
@@ -8538,10 +8544,10 @@ var TranslationTextTemplateSpanList = class extends BaseNode {
8538
8544
  return this.green.spans.map((e, i) => e.toRed(childRangeStart(this, i), this));
8539
8545
  }
8540
8546
  };
8541
- var TranslationTextTemplateSpan = class extends BaseNode {
8547
+ var TextTemplateDeclarationSpan = class extends BaseNode {
8542
8548
  constructor(green, rangeStart, parent) {
8543
8549
  super(green, rangeStart, parent);
8544
- this.kind = 143 /* TranslationTextTemplateSpan */;
8550
+ this.kind = 143 /* TextTemplateDeclarationSpan */;
8545
8551
  }
8546
8552
  get children() {
8547
8553
  return this._children ??= this.createChildren();
@@ -8562,10 +8568,10 @@ var TranslationTextTemplateSpan = class extends BaseNode {
8562
8568
  ];
8563
8569
  }
8564
8570
  };
8565
- var TranslationTextTemplateParameterDeclaration = class extends BaseNode {
8571
+ var TextTemplateParameterDeclaration = class extends BaseNode {
8566
8572
  constructor(green, rangeStart, parent) {
8567
8573
  super(green, rangeStart, parent);
8568
- this.kind = 144 /* TranslationTextTemplateParameterDeclaration */;
8574
+ this.kind = 144 /* TextTemplateParameterDeclaration */;
8569
8575
  }
8570
8576
  get children() {
8571
8577
  return this._children ??= this.createChildren();
@@ -12200,10 +12206,10 @@ var TypeTranslation2 = class extends BaseNode2 {
12200
12206
  return new TypeTranslation(this, rangeStart, parent);
12201
12207
  }
12202
12208
  };
12203
- var TextTranslation2 = class extends BaseNode2 {
12209
+ var TextTranslationDeclaration2 = class extends BaseNode2 {
12204
12210
  constructor(sourceText, minusGreaterThanToken, translatedTextOrTranslationFunction) {
12205
12211
  super();
12206
- this.kind = 140 /* TextTranslation */;
12212
+ this.kind = 140 /* TextTranslationDeclaration */;
12207
12213
  this.children = [sourceText, minusGreaterThanToken, translatedTextOrTranslationFunction];
12208
12214
  }
12209
12215
  get sourceText() {
@@ -12219,13 +12225,13 @@ var TextTranslation2 = class extends BaseNode2 {
12219
12225
  return this;
12220
12226
  }
12221
12227
  toRed(rangeStart, parent) {
12222
- return new TextTranslation(this, rangeStart, parent);
12228
+ return new TextTranslationDeclaration(this, rangeStart, parent);
12223
12229
  }
12224
12230
  };
12225
- var TranslationTextTemplate2 = class extends BaseNode2 {
12231
+ var TextTemplateDeclaration2 = class extends BaseNode2 {
12226
12232
  constructor(head, spanList) {
12227
12233
  super();
12228
- this.kind = 141 /* TranslationTextTemplate */;
12234
+ this.kind = 141 /* TextTemplateDeclaration */;
12229
12235
  this.children = [head, spanList];
12230
12236
  }
12231
12237
  get head() {
@@ -12238,13 +12244,13 @@ var TranslationTextTemplate2 = class extends BaseNode2 {
12238
12244
  return this;
12239
12245
  }
12240
12246
  toRed(rangeStart, parent) {
12241
- return new TranslationTextTemplate(this, rangeStart, parent);
12247
+ return new TextTemplateDeclaration(this, rangeStart, parent);
12242
12248
  }
12243
12249
  };
12244
- var TranslationTextTemplateSpanList2 = class extends BaseNode2 {
12250
+ var TextTemplateDeclarationSpanList2 = class extends BaseNode2 {
12245
12251
  constructor(spans) {
12246
12252
  super();
12247
- this.kind = 142 /* TranslationTextTemplateSpanList */;
12253
+ this.kind = 142 /* TextTemplateDeclarationSpanList */;
12248
12254
  this.children = spans;
12249
12255
  }
12250
12256
  get spans() {
@@ -12254,13 +12260,13 @@ var TranslationTextTemplateSpanList2 = class extends BaseNode2 {
12254
12260
  return this;
12255
12261
  }
12256
12262
  toRed(rangeStart, parent) {
12257
- return new TranslationTextTemplateSpanList(this, rangeStart, parent);
12263
+ return new TextTemplateDeclarationSpanList(this, rangeStart, parent);
12258
12264
  }
12259
12265
  };
12260
- var TranslationTextTemplateSpan2 = class extends BaseNode2 {
12266
+ var TextTemplateDeclarationSpan2 = class extends BaseNode2 {
12261
12267
  constructor(parameter, text) {
12262
12268
  super();
12263
- this.kind = 143 /* TranslationTextTemplateSpan */;
12269
+ this.kind = 143 /* TextTemplateDeclarationSpan */;
12264
12270
  this.children = [parameter, text];
12265
12271
  }
12266
12272
  get parameter() {
@@ -12273,13 +12279,13 @@ var TranslationTextTemplateSpan2 = class extends BaseNode2 {
12273
12279
  return this;
12274
12280
  }
12275
12281
  toRed(rangeStart, parent) {
12276
- return new TranslationTextTemplateSpan(this, rangeStart, parent);
12282
+ return new TextTemplateDeclarationSpan(this, rangeStart, parent);
12277
12283
  }
12278
12284
  };
12279
- var TranslationTextTemplateParameterDeclaration2 = class extends BaseNode2 {
12285
+ var TextTemplateParameterDeclaration2 = class extends BaseNode2 {
12280
12286
  constructor(name, typeAnnotation) {
12281
12287
  super();
12282
- this.kind = 144 /* TranslationTextTemplateParameterDeclaration */;
12288
+ this.kind = 144 /* TextTemplateParameterDeclaration */;
12283
12289
  this.children = [name, typeAnnotation];
12284
12290
  }
12285
12291
  get name() {
@@ -12292,7 +12298,7 @@ var TranslationTextTemplateParameterDeclaration2 = class extends BaseNode2 {
12292
12298
  return this;
12293
12299
  }
12294
12300
  toRed(rangeStart, parent) {
12295
- return new TranslationTextTemplateParameterDeclaration(this, rangeStart, parent);
12301
+ return new TextTemplateParameterDeclaration(this, rangeStart, parent);
12296
12302
  }
12297
12303
  };
12298
12304
  var VariantDeclaration2 = class extends BaseNode2 {
@@ -12871,7 +12877,7 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
12871
12877
  DiagnosticCode2[DiagnosticCode2["TagNotFound"] = 284] = "TagNotFound";
12872
12878
  DiagnosticCode2[DiagnosticCode2["TypeOrFunctionNameExpected"] = 285] = "TypeOrFunctionNameExpected";
12873
12879
  DiagnosticCode2[DiagnosticCode2["PackageNameOrAliasExpected"] = 286] = "PackageNameOrAliasExpected";
12874
- DiagnosticCode2[DiagnosticCode2["ExpressionCanBeNone"] = 287] = "ExpressionCanBeNone";
12880
+ DiagnosticCode2[DiagnosticCode2["ExpressionCanBeNull"] = 287] = "ExpressionCanBeNull";
12875
12881
  DiagnosticCode2[DiagnosticCode2["TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator"] = 288] = "TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator";
12876
12882
  DiagnosticCode2[DiagnosticCode2["UnreachableCode"] = 289] = "UnreachableCode";
12877
12883
  DiagnosticCode2[DiagnosticCode2["RecursionOccurredWhileCalculatingTheTypeOfTheExpression"] = 290] = "RecursionOccurredWhileCalculatingTheTypeOfTheExpression";
@@ -13128,8 +13134,8 @@ var englishErrorMessages = {
13128
13134
  [284 /* TagNotFound */]: "Tag not found.",
13129
13135
  [285 /* TypeOrFunctionNameExpected */]: "Type or function name expected.",
13130
13136
  [286 /* PackageNameOrAliasExpected */]: "Package name or alias expected.",
13131
- [287 /* ExpressionCanBeNone */]: "Expression can be none.",
13132
- [288 /* TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator */]: "Target variable expression in the assignment statement cannot contain '?' operator used to check for 'none' value.",
13137
+ [287 /* ExpressionCanBeNull */]: "Expression can be null.",
13138
+ [288 /* TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator */]: "Target variable expression in the assignment statement cannot contain '?' operator used to check for 'null' value.",
13133
13139
  [289 /* UnreachableCode */]: "Unreachable code.",
13134
13140
  [290 /* RecursionOccurredWhileCalculatingTheTypeOfTheExpression */]: "Recursion occurred while calculating the type of the expression. To fix this error, specify the type of the variable explicitly.",
13135
13141
  [291 /* RecursionOccurredWhileInferringTheTypeOfTheVariable */]: "Recursion occurred while inferring the type of the variable. To fix this error, specify the type of the variable explicitly.",
@@ -13338,7 +13344,7 @@ var russianErrorMessages = {
13338
13344
  [284 /* TagNotFound */]: "\u0422\u0435\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.",
13339
13345
  [285 /* TypeOrFunctionNameExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u043C\u044F \u0442\u0438\u043F\u0430 \u0438\u043B\u0438 \u0444\u0443\u043D\u043A\u0446\u0438\u0438.",
13340
13346
  [286 /* PackageNameOrAliasExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u043C\u044F \u0438\u043B\u0438 \u043F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C \u043F\u0430\u043A\u0435\u0442\u0430.",
13341
- [287 /* ExpressionCanBeNone */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 '\u043F\u0443\u0441\u0442\u043E'.",
13347
+ [287 /* ExpressionCanBeNull */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 '\u043F\u0443\u0441\u0442\u043E'.",
13342
13348
  [288 /* TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0446\u0435\u043B\u0435\u0432\u043E\u0439 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0432 \u043A\u043E\u043C\u0430\u043D\u0434\u0435 \u043F\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043D\u0438\u044F \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u0437\u043D\u0430\u043A \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 '?' \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043D\u0430 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 '\u043F\u0443\u0441\u0442\u043E'.",
13343
13349
  [289 /* UnreachableCode */]: "\u041D\u0435\u0434\u043E\u0441\u0442\u0438\u0436\u0438\u043C\u044B\u0439 \u043A\u043E\u0434.",
13344
13350
  [290 /* RecursionOccurredWhileCalculatingTheTypeOfTheExpression */]: "\u041F\u0440\u0438 \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0438 \u0442\u0438\u043F\u0430 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u0440\u0435\u043A\u0443\u0440\u0441\u0438\u044F. \u0427\u0442\u043E\u0431\u044B \u0438\u0441\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u044D\u0442\u0443 \u043E\u0448\u0438\u0431\u043A\u0443, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u044F\u0432\u043D\u043E\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439.",
@@ -13707,7 +13713,7 @@ var DisplayService = class {
13707
13713
  const returnType = type.getReturnType();
13708
13714
  let returnTypeAnnotationColon = "";
13709
13715
  let returnTypeText = "";
13710
- if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.none)) {
13716
+ if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.nullType)) {
13711
13717
  returnTypeAnnotationColon = ": ";
13712
13718
  returnTypeText = this.displayType(returnType);
13713
13719
  }
@@ -13781,7 +13787,7 @@ var DisplayService = class {
13781
13787
  const returnType = func.getReturnType();
13782
13788
  let returnTypeAnnotationColon = "";
13783
13789
  let returnTypeText = "";
13784
- if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.none)) {
13790
+ if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.nullType)) {
13785
13791
  returnTypeAnnotationColon = ": ";
13786
13792
  returnTypeText = this.displayType(returnType);
13787
13793
  }
@@ -13820,7 +13826,7 @@ var DisplayService = class {
13820
13826
  const returnType = operator.getReturnType();
13821
13827
  let returnTypeAnnotationColon = "";
13822
13828
  let returnTypeText = "";
13823
- if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.none)) {
13829
+ if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.nullType)) {
13824
13830
  returnTypeAnnotationColon = ": ";
13825
13831
  returnTypeText = this.displayType(returnType);
13826
13832
  }
@@ -13951,7 +13957,7 @@ var DisplayService = class {
13951
13957
  const functionKeyword = this.displayKeyword(12 /* Function */);
13952
13958
  const valueParametersText = `(${type.value.getValueParameters().map((p) => this.displayValueParameterDeclaration(p)).join(", ")})`;
13953
13959
  const returnType = type.value.getReturnType();
13954
- const returnTypeText = this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.none) ? `: ${this.displayType(returnType)}` : "";
13960
+ const returnTypeText = this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.nullType) ? `: ${this.displayType(returnType)}` : "";
13955
13961
  typeBody = `${asyncKeyword}${functionKeyword}${valueParametersText}${returnTypeText}`;
13956
13962
  break;
13957
13963
  }
@@ -14283,7 +14289,7 @@ var DisplayService = class {
14283
14289
  const valueParametersText = type.getValueParameters().map((p) => this.displayValueParameterDeclaration(p, lessDetailsTypeDisplayOptions)).join(", ");
14284
14290
  let returnTypeText = "";
14285
14291
  const returnType = type.getReturnType();
14286
- if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.none)) {
14292
+ if (this._analyzer === void 0 || !returnType.equals(this._analyzer.originalStandardTypes.nullType)) {
14287
14293
  returnTypeText += `: ${this.displayTypeInternal(returnType, lessDetailsTypeDisplayOptions)}`;
14288
14294
  }
14289
14295
  if (namedTypeEntity !== void 0) {
@@ -14295,7 +14301,7 @@ var DisplayService = class {
14295
14301
  }
14296
14302
  displayParameterTypeUsage(type) {
14297
14303
  const name = this.displayEntityNameText(type.getEntity());
14298
- const nonNullableText = type.isNoneExcluded() ? "!" : "";
14304
+ const nonNullableText = type.isNullExcluded() ? "!" : "";
14299
14305
  return `${name}${nonNullableText}`;
14300
14306
  }
14301
14307
  displayAliasTypeUsage(type, options) {
@@ -14379,12 +14385,12 @@ var DisplayService = class {
14379
14385
  }
14380
14386
  displayUnionOrIntersectionTypeTypes(types, isUnion) {
14381
14387
  if (this._analyzer !== void 0 && isUnion && types.length === 2) {
14382
- let noneTypeIndex = -1;
14388
+ let nullTypeIndex = -1;
14383
14389
  if (this._analyzer !== void 0) {
14384
- noneTypeIndex = types.findIndex((t) => t.equals(this._analyzer.originalStandardTypes.none));
14390
+ nullTypeIndex = types.findIndex((t) => t.equals(this._analyzer.originalStandardTypes.nullType));
14385
14391
  }
14386
- if (noneTypeIndex >= 0) {
14387
- const type = noneTypeIndex === 0 ? types[1] : types[0];
14392
+ if (nullTypeIndex >= 0) {
14393
+ const type = nullTypeIndex === 0 ? types[1] : types[0];
14388
14394
  const options = {
14389
14395
  displayFullVersionOfNamedFunctionType: true,
14390
14396
  unionAndAliasTypeDisplayKind: 1 /* OnlyOriginalType */,
@@ -15426,8 +15432,8 @@ var ParameterTypeUsage_type = class {
15426
15432
  getEntity() {
15427
15433
  return this.type.getEntity();
15428
15434
  }
15429
- isNoneExcluded() {
15430
- return this.type.isNoneExcluded;
15435
+ isNullExcluded() {
15436
+ return this.type.isNullExcluded;
15431
15437
  }
15432
15438
  };
15433
15439
  var ParameterTypeUsage_entity = class {
@@ -15438,7 +15444,7 @@ var ParameterTypeUsage_entity = class {
15438
15444
  getEntity() {
15439
15445
  return this.entity;
15440
15446
  }
15441
- isNoneExcluded() {
15447
+ isNullExcluded() {
15442
15448
  return false;
15443
15449
  }
15444
15450
  };
@@ -19592,9 +19598,9 @@ var ExpressionParser = class {
19592
19598
  return result;
19593
19599
  }
19594
19600
  parseExpression(isFollowedByStatementBlock) {
19595
- return this.parseNoneCoalescingExpression(isFollowedByStatementBlock);
19601
+ return this.parseNullCoalescingExpression(isFollowedByStatementBlock);
19596
19602
  }
19597
- parseNoneCoalescingExpression(isFollowedByStatementBlock) {
19603
+ parseNullCoalescingExpression(isFollowedByStatementBlock) {
19598
19604
  const expressionStart = this.parser.tokenOrKeywordStartPosition();
19599
19605
  let result = this.parseDisjunctiveExpression(isFollowedByStatementBlock);
19600
19606
  while (this.parser.currentTokenOrKeyword.isToken(51 /* QuestionQuestion */)) {
@@ -19798,14 +19804,7 @@ var ExpressionParser = class {
19798
19804
  }
19799
19805
  case 27 /* Dot */: {
19800
19806
  const dotToken = this.parser.parseExpectedToken(27 /* Dot */);
19801
- let memberName;
19802
- const runKeyword = this.parser.parseOptionalKeyword(7 /* Run */);
19803
- if (runKeyword !== void 0) {
19804
- Debug.assert(runKeyword.tokens.length === 1);
19805
- memberName = runKeyword.tokens[0];
19806
- } else {
19807
- memberName = this.parser.parseIdentifier();
19808
- }
19807
+ const memberName = this.parser.parseIdentifier();
19809
19808
  expression = this.parser.intern(
19810
19809
  new MemberAccessExpression2(expression, dotToken, memberName),
19811
19810
  expressionStart
@@ -19884,7 +19883,7 @@ var ExpressionParser = class {
19884
19883
  break;
19885
19884
  case 52 /* Yes */:
19886
19885
  case 53 /* No */:
19887
- case 57 /* None */:
19886
+ case 57 /* Null */:
19888
19887
  case 4 /* Object */:
19889
19888
  case 56 /* Base */:
19890
19889
  case 54 /* Reference */:
@@ -19937,7 +19936,7 @@ var ExpressionParser = class {
19937
19936
  break;
19938
19937
  case 52 /* Yes */:
19939
19938
  case 53 /* No */:
19940
- case 57 /* None */: {
19939
+ case 57 /* Null */: {
19941
19940
  const expressionStart = this.parser.tokenOrKeywordStartPosition();
19942
19941
  const keyword = this.parser.parseTokenOrKeyword().asKeyword();
19943
19942
  const expression = new KeywordExpression2(keyword);
@@ -20084,35 +20083,6 @@ var ExpressionParser = class {
20084
20083
  }
20085
20084
  return result;
20086
20085
  }
20087
- parseTranslationTextTemplate() {
20088
- const literalStart = this.parser.tokenOrKeywordStartPosition();
20089
- const head = this.parser.parseExpectedToken(7 /* TextTemplateHead */);
20090
- const spanListStart = this.parser.tokenOrKeywordStartPosition();
20091
- const spans = new Array();
20092
- if (!head.isMissing) {
20093
- let span;
20094
- do {
20095
- const spanStart = this.parser.tokenOrKeywordStartPosition();
20096
- const parameter = this.parseTranslationTextTemplateParameter();
20097
- const text = this.parseTextTemplatePartOrTail();
20098
- span = this.parser.intern(new TranslationTextTemplateSpan2(parameter, text), spanStart);
20099
- spans.push(span);
20100
- } while (span.text.tokenKind === 8 /* TextTemplatePart */);
20101
- }
20102
- const spanList = this.parser.intern(new TranslationTextTemplateSpanList2(spans), spanListStart);
20103
- const result = new TranslationTextTemplate2(head, spanList);
20104
- return this.parser.intern(result, literalStart);
20105
- }
20106
- parseTranslationTextTemplateParameter() {
20107
- const parameterStart = this.parser.tokenOrKeywordStartPosition();
20108
- const name = this.parser.parseIdentifier(4 /* Other */);
20109
- let typeAnnotation;
20110
- if (this.parser.typeAnnotationParser.isStartOfTypeAnnotation()) {
20111
- typeAnnotation = this.parser.typeAnnotationParser.parseTypeAnnotation();
20112
- }
20113
- const result = new TranslationTextTemplateParameterDeclaration2(name, typeAnnotation);
20114
- return this.parser.intern(result, parameterStart);
20115
- }
20116
20086
  parseFunctionBlockLiteral() {
20117
20087
  const functionBlockLiteralStart = this.parser.tokenOrKeywordStartPosition();
20118
20088
  const block = this.parser.statementParser.parseFunctionBlock();
@@ -21170,7 +21140,7 @@ var TranslationsDeclarationParser = class {
21170
21140
  return () => this.parsePackageVariableTranslation();
21171
21141
  case 6 /* TextLiteral */:
21172
21142
  case 7 /* TextTemplateHead */:
21173
- return () => this.parseTextTranslation();
21143
+ return () => this.parseTextTranslationDeclaration();
21174
21144
  }
21175
21145
  } else {
21176
21146
  switch (this.parser.currentTokenOrKeyword.keywordKind) {
@@ -21387,13 +21357,13 @@ var TranslationsDeclarationParser = class {
21387
21357
  );
21388
21358
  return this.parser.intern(result, translationStart);
21389
21359
  }
21390
- parseTextTranslation() {
21360
+ parseTextTranslationDeclaration() {
21391
21361
  const translationStart = this.parser.tokenOrKeywordStartPosition();
21392
21362
  let sourceText;
21393
21363
  if (this.parser.currentTokenOrKeyword.isToken(6 /* TextLiteral */)) {
21394
21364
  sourceText = this.parser.parseExpectedToken(6 /* TextLiteral */);
21395
21365
  } else {
21396
- sourceText = this.parser.expressionParser.parseTranslationTextTemplate();
21366
+ sourceText = this.parseTextTemplateDeclaration();
21397
21367
  }
21398
21368
  const minusGreaterThanToken = this.parser.parseExpectedToken(43 /* MinusGreaterThan */);
21399
21369
  let translatedTextOrTranslationFunction;
@@ -21421,13 +21391,42 @@ var TranslationsDeclarationParser = class {
21421
21391
  133 /* TranslatedTextTemplateOrTranslationFunctionBlockExpected */
21422
21392
  );
21423
21393
  }
21424
- const result = new TextTranslation2(
21394
+ const result = new TextTranslationDeclaration2(
21425
21395
  sourceText,
21426
21396
  minusGreaterThanToken,
21427
21397
  translatedTextOrTranslationFunction
21428
21398
  );
21429
21399
  return this.parser.intern(result, translationStart);
21430
21400
  }
21401
+ parseTextTemplateDeclaration() {
21402
+ const literalStart = this.parser.tokenOrKeywordStartPosition();
21403
+ const head = this.parser.parseExpectedToken(7 /* TextTemplateHead */);
21404
+ const spanListStart = this.parser.tokenOrKeywordStartPosition();
21405
+ const spans = new Array();
21406
+ if (!head.isMissing) {
21407
+ let span;
21408
+ do {
21409
+ const spanStart = this.parser.tokenOrKeywordStartPosition();
21410
+ const parameter = this.parseTextTemplateParameterDeclaration();
21411
+ const text = this.parser.expressionParser.parseTextTemplatePartOrTail();
21412
+ span = this.parser.intern(new TextTemplateDeclarationSpan2(parameter, text), spanStart);
21413
+ spans.push(span);
21414
+ } while (span.text.tokenKind === 8 /* TextTemplatePart */);
21415
+ }
21416
+ const spanList = this.parser.intern(new TextTemplateDeclarationSpanList2(spans), spanListStart);
21417
+ const result = new TextTemplateDeclaration2(head, spanList);
21418
+ return this.parser.intern(result, literalStart);
21419
+ }
21420
+ parseTextTemplateParameterDeclaration() {
21421
+ const parameterStart = this.parser.tokenOrKeywordStartPosition();
21422
+ const name = this.parser.parseIdentifier(4 /* Other */);
21423
+ let typeAnnotation;
21424
+ if (this.parser.typeAnnotationParser.isStartOfTypeAnnotation()) {
21425
+ typeAnnotation = this.parser.typeAnnotationParser.parseTypeAnnotation();
21426
+ }
21427
+ const result = new TextTemplateParameterDeclaration2(name, typeAnnotation);
21428
+ return this.parser.intern(result, parameterStart);
21429
+ }
21431
21430
  };
21432
21431
  var TypeSpecifierParser = class {
21433
21432
  constructor(parser2) {
@@ -23008,6 +23007,44 @@ var TypeMemberLookupBase = class {
23008
23007
  }
23009
23008
  return result;
23010
23009
  }
23010
+ tryGetTypeLocale(type) {
23011
+ switch (type.kind) {
23012
+ case "function":
23013
+ return type.getEntity().getLocalization().locale;
23014
+ case "structured":
23015
+ return type.getEntity().getLocalization().locale;
23016
+ case "variant":
23017
+ return type.getEntity().getLocalization().locale;
23018
+ case "alias":
23019
+ return type.getEntity().getLocalization().locale;
23020
+ case "parameter":
23021
+ return type.getEntity().getLocalization().locale;
23022
+ case "unresolved":
23023
+ return void 0;
23024
+ case "union":
23025
+ case "intersection": {
23026
+ const constituentTypes = type.originalTypes;
23027
+ if (constituentTypes.length === 0) {
23028
+ return void 0;
23029
+ }
23030
+ let firstTypeLocale;
23031
+ for (let i = 0; i < constituentTypes.length; i++) {
23032
+ if (i === 0) {
23033
+ firstTypeLocale = this.tryGetTypeLocale(constituentTypes[i]);
23034
+ if (firstTypeLocale === void 0) {
23035
+ break;
23036
+ }
23037
+ } else if (this.tryGetTypeLocale(constituentTypes[i]) !== firstTypeLocale) {
23038
+ firstTypeLocale = void 0;
23039
+ break;
23040
+ }
23041
+ }
23042
+ return firstTypeLocale;
23043
+ }
23044
+ default:
23045
+ Debug.never(type);
23046
+ }
23047
+ }
23011
23048
  getAllMembersOfTypeOrExtension(typeOrExtension, options, hidingMatcher, typeExtensionLookup) {
23012
23049
  switch (typeOrExtension.kind) {
23013
23050
  case "type":
@@ -23023,8 +23060,9 @@ var TypeMemberLookupBase = class {
23023
23060
  const state = new TypeMemberLookupState();
23024
23061
  let result = this.getAllMembersOfType(type, options, state, hidingMatcher, typeExtensionLookup);
23025
23062
  if (state.searchedInAspect && !state.searchedInStandardObjectType) {
23063
+ const locale = this.tryGetTypeLocale(type) ?? this._contextLocale;
23026
23064
  const objectTypeMembers = this.getAllMembersOfType(
23027
- this._analyzer.getLocalizedStandardTypes(this._contextLocale).refObject,
23065
+ this._analyzer.getLocalizedStandardTypes(locale).refObject,
23028
23066
  options,
23029
23067
  state,
23030
23068
  hidingMatcher,
@@ -23286,9 +23324,10 @@ var TypeMemberLookupByKeyBase = class extends TypeMemberLookupBase {
23286
23324
  const state = new TypeMemberLookupState();
23287
23325
  let result = this.getMembersOfTypeByKey(key, type, options, state, hidingMatcher, typeExtensionLookup);
23288
23326
  if (state.searchedInAspect && !state.searchedInStandardObjectType) {
23327
+ const locale = this.tryGetTypeLocale(type) ?? this._contextLocale;
23289
23328
  const objectTypeMembers = this.getMembersOfTypeByKey(
23290
23329
  key,
23291
- this._analyzer.getLocalizedStandardTypes(this._contextLocale).refObject,
23330
+ this._analyzer.getLocalizedStandardTypes(locale).refObject,
23292
23331
  options,
23293
23332
  state,
23294
23333
  hidingMatcher,
@@ -23900,7 +23939,11 @@ var TsTypeMembersCreator = class {
23900
23939
  if (this._symbolsToForceStatic !== void 0) {
23901
23940
  createMembers(this._symbolsToForceStatic, true);
23902
23941
  }
23903
- if (this._typeSymbolDeclarations !== void 0 && this.getNamedMembersFromTypeToMergeWith(Analyzer.enumeratorMethodName) === void 0) {
23942
+ const enumeratorMethodName = LocalizationHelper.localizeHelperPhrase(
23943
+ 8 /* EnumeratorMethodName */,
23944
+ this._typeEntity.getLocalization().locale
23945
+ );
23946
+ if (this._typeSymbolDeclarations !== void 0 && this.getNamedMembersFromTypeToMergeWith(enumeratorMethodName) === void 0) {
23904
23947
  const enumeratorMethod = this.createEnumeratorMethodIfIteratorMethodExists(this._typeSymbolDeclarations);
23905
23948
  if (enumeratorMethod !== void 0) {
23906
23949
  namedMembersFromSymbols.push(enumeratorMethod);
@@ -24439,6 +24482,9 @@ var TsGlobalClassOrInterfaceEntity = class {
24439
24482
  if (TsUtils.isClassOrInterfaceType(symbolType)) {
24440
24483
  const baseTypes = this._tsctx.tsChecker.getBaseTypes(symbolType);
24441
24484
  type = Query.from(baseTypes).map((t) => this._tsctx.type.ofTsType(t)).mapAndFilter((t) => t.kind === "structured" && t.isRefObject() ? t : void 0).first();
24485
+ if (type === void 0) {
24486
+ type = this._tsctx.analyzer.getImplicitBaseTypeForStructuredType(this);
24487
+ }
24442
24488
  }
24443
24489
  }
24444
24490
  return new OriginalBaseObjectType(type);
@@ -24602,7 +24648,7 @@ var TsTypeLiteralEntity = class {
24602
24648
  this.kind = 2 /* Type */;
24603
24649
  this.typeEntityKind = 1 /* Structured */;
24604
24650
  this.subkind = "anonymous";
24605
- this._baseObjectType = new OriginalBaseObjectType(void 0);
24651
+ this._baseObjectType = new Cached();
24606
24652
  this._baseAspectTypes = new OriginalBaseAspectTypes([]);
24607
24653
  this._members = new Cached();
24608
24654
  }
@@ -24649,7 +24695,7 @@ var TsTypeLiteralEntity = class {
24649
24695
  return this.getTypeParameters().length;
24650
24696
  }
24651
24697
  getBaseObjectType() {
24652
- return this._baseObjectType;
24698
+ return this._baseObjectType.getOrInsertWith(() => new OriginalBaseObjectType(this._tsctx.analyzer.getImplicitBaseTypeForStructuredType(this)));
24653
24699
  }
24654
24700
  getBaseAspectTypes() {
24655
24701
  return this._baseAspectTypes;
@@ -24692,7 +24738,7 @@ var TsNamedTypeLiteralEntity = class {
24692
24738
  this.typeEntityKind = 1 /* Structured */;
24693
24739
  this.subkind = "package";
24694
24740
  this._typeParameters = new Cached();
24695
- this._baseObjectType = new OriginalBaseObjectType(void 0);
24741
+ this._baseObjectType = new Cached();
24696
24742
  this._baseAspectTypes = new OriginalBaseAspectTypes([]);
24697
24743
  this._members = new Cached();
24698
24744
  }
@@ -24750,7 +24796,7 @@ var TsNamedTypeLiteralEntity = class {
24750
24796
  return this.getTypeParameters().length;
24751
24797
  }
24752
24798
  getBaseObjectType() {
24753
- return this._baseObjectType;
24799
+ return this._baseObjectType.getOrInsertWith(() => new OriginalBaseObjectType(this._tsctx.analyzer.getImplicitBaseTypeForStructuredType(this)));
24754
24800
  }
24755
24801
  getBaseAspectTypes() {
24756
24802
  return this._baseAspectTypes;
@@ -25287,10 +25333,13 @@ var TsIteratorFunctionEntity = class {
25287
25333
  this.kind = 1 /* Function */;
25288
25334
  this.subkind = "method";
25289
25335
  this._returnType = new Cached();
25290
- this._overriddenMembers = new Cached();
25291
25336
  }
25292
25337
  getName() {
25293
- return this._tsctx.getName(Analyzer.enumeratorMethodName, "method");
25338
+ const locale = this.getLocalization().locale;
25339
+ return this._tsctx.getName(
25340
+ LocalizationHelper.localizeHelperPhrase(8 /* EnumeratorMethodName */, locale),
25341
+ "method"
25342
+ );
25294
25343
  }
25295
25344
  getTypeParameters() {
25296
25345
  return [];
@@ -25359,17 +25408,7 @@ var TsIteratorFunctionEntity = class {
25359
25408
  return 0 /* SubstituteOwnSubstitutions */;
25360
25409
  }
25361
25410
  getOverriddenMembers() {
25362
- return this._overriddenMembers.getOrInsertWith(() => {
25363
- const elementType = Query.from(this.getReturnType().getSubstitutions().getTypes()).first() ?? this._tsctx.analyzer.originalStandardTypes.unresolved;
25364
- const wellKnownDeclarations = this._tsctx.analyzer.getLocalizedWellKnownDeclarations(this.getLocalization().locale);
25365
- const substitutions = new Substitutions(
25366
- this._tsctx.analyzer,
25367
- wellKnownDeclarations.enumerable.getTypeParameters(),
25368
- [elementType]
25369
- );
25370
- const method = new Method(this._tsctx.analyzer, wellKnownDeclarations.enumeratorMethod, substitutions);
25371
- return [method];
25372
- });
25411
+ return [];
25373
25412
  }
25374
25413
  getLocalization() {
25375
25414
  return Localization.Original.ofEntity(this);
@@ -27247,8 +27286,8 @@ var NodeTypeUtils = class {
27247
27286
  return false;
27248
27287
  }
27249
27288
  }
27250
- static isNoneLiteral(node) {
27251
- return node.kind === 83 /* KeywordExpression */ && node.keyword.keywordKind === 57 /* None */;
27289
+ static isNullLiteral(node) {
27290
+ return node.kind === 83 /* KeywordExpression */ && node.keyword.keywordKind === 57 /* Null */;
27252
27291
  }
27253
27292
  static isSubprogramDeclarationOrLiteral(node) {
27254
27293
  switch (node.kind) {
@@ -28559,7 +28598,7 @@ var TranslationTextTemplateParameterDeclarationEntity = class {
28559
28598
  if (node.typeAnnotation !== void 0) {
28560
28599
  return this._analyzer.type.ofTypeSpecifier(node.typeAnnotation.typeSpecifier);
28561
28600
  }
28562
- return this._analyzer.includeNoneToType(
28601
+ return this._analyzer.includeNullToType(
28563
28602
  this._analyzer.originalStandardTypes.refObject,
28564
28603
  this.getLocalization().locale
28565
28604
  );
@@ -29448,8 +29487,8 @@ var TypeContext = class {
29448
29487
  get checker() {
29449
29488
  return this._tsctx.tsChecker;
29450
29489
  }
29451
- get refObjectOrNone() {
29452
- return this.analyzer.includeNoneToType(this._tsctx.standardTypes.refObject, 0 /* En */);
29490
+ get refObjectOrNull() {
29491
+ return this.analyzer.includeNullToType(this._tsctx.standardTypes.refObject, 0 /* En */);
29453
29492
  }
29454
29493
  get esSymbolType() {
29455
29494
  return this._esSymbolType.getOrInsertWith(() => {
@@ -29468,7 +29507,7 @@ var TypeContext = class {
29468
29507
  }
29469
29508
  ofTypeNode(node) {
29470
29509
  if (node === void 0) {
29471
- return this.refObjectOrNone;
29510
+ return this.refObjectOrNull;
29472
29511
  }
29473
29512
  const type = this.checker.getTypeFromTypeNode(node);
29474
29513
  return this.ofTsType(type);
@@ -29493,19 +29532,19 @@ var TypeContext = class {
29493
29532
  return this._tsctx.standardTypes.yesNo;
29494
29533
  }
29495
29534
  if ((type.flags & ts5.TypeFlags.Undefined) !== 0) {
29496
- return this._tsctx.standardTypes.none;
29535
+ return this._tsctx.standardTypes.nullType;
29497
29536
  }
29498
29537
  if ((type.flags & ts5.TypeFlags.Null) !== 0) {
29499
- return this._tsctx.standardTypes.none;
29538
+ return this._tsctx.standardTypes.nullType;
29500
29539
  }
29501
29540
  if ((type.flags & ts5.TypeFlags.Void) !== 0) {
29502
- return this._tsctx.standardTypes.none;
29541
+ return this._tsctx.standardTypes.nullType;
29503
29542
  }
29504
29543
  if ((type.flags & ts5.TypeFlags.Any) !== 0) {
29505
- return this.refObjectOrNone;
29544
+ return this.refObjectOrNull;
29506
29545
  }
29507
29546
  if ((type.flags & ts5.TypeFlags.Unknown) !== 0) {
29508
- return this.refObjectOrNone;
29547
+ return this.refObjectOrNull;
29509
29548
  }
29510
29549
  if ((type.flags & ts5.TypeFlags.Never) !== 0) {
29511
29550
  return this._tsctx.standardTypes.unresolved;
@@ -29514,7 +29553,7 @@ var TypeContext = class {
29514
29553
  return this._tsctx.standardTypes.refObject;
29515
29554
  }
29516
29555
  if ((type.flags & ts5.TypeFlags.ESSymbolLike) !== 0) {
29517
- return this.esSymbolType ?? this.refObjectOrNone;
29556
+ return this.esSymbolType ?? this.refObjectOrNull;
29518
29557
  }
29519
29558
  if ((type.flags & ts5.TypeFlags.Object) !== 0) {
29520
29559
  return this.ofObjectType(type);
@@ -29528,7 +29567,7 @@ var TypeContext = class {
29528
29567
  if ((type.flags & ts5.TypeFlags.TypeParameter) !== 0) {
29529
29568
  return this.ofTypeParameter(type);
29530
29569
  }
29531
- return this.refObjectOrNone;
29570
+ return this.refObjectOrNull;
29532
29571
  }
29533
29572
  getUnderlyingTypeOfEnum(symbol) {
29534
29573
  const declaredEnumType = this._tsctx.tsChecker.getDeclaredTypeOfSymbol(symbol);
@@ -29579,7 +29618,7 @@ var TypeContext = class {
29579
29618
  return this.createTypeFromEntity(entity);
29580
29619
  }
29581
29620
  }
29582
- return this.refObjectOrNone;
29621
+ return this.refObjectOrNull;
29583
29622
  }
29584
29623
  ofEnumLiteralType(type) {
29585
29624
  if (type.symbol?.parent !== void 0) {
@@ -29588,7 +29627,7 @@ var TypeContext = class {
29588
29627
  return this.createTypeFromEntity(entity);
29589
29628
  }
29590
29629
  }
29591
- return this.refObjectOrNone;
29630
+ return this.refObjectOrNull;
29592
29631
  }
29593
29632
  ofTypeAlias(type, aliasSymbol) {
29594
29633
  const entity = this.getEntityOfTypeSymbol(aliasSymbol);
@@ -29599,7 +29638,7 @@ var TypeContext = class {
29599
29638
  }
29600
29639
  return this.createTypeFromEntity(entity, typeArguments);
29601
29640
  }
29602
- return this.refObjectOrNone;
29641
+ return this.refObjectOrNull;
29603
29642
  }
29604
29643
  ofObjectType(type) {
29605
29644
  if (type.symbol !== void 0 && TsUtils.isTypeReference(type)) {
@@ -29638,7 +29677,7 @@ var TypeContext = class {
29638
29677
  return this.createTypeFromEntity(entity, typeArguments);
29639
29678
  }
29640
29679
  }
29641
- return this.refObjectOrNone;
29680
+ return this.refObjectOrNull;
29642
29681
  }
29643
29682
  ofUnionType(type) {
29644
29683
  const constituentTypes = type.types.map((t) => this.ofTsType(t));
@@ -29655,7 +29694,7 @@ var TypeContext = class {
29655
29694
  return this.analyzer.typeFactory.getParameterType(entity, false);
29656
29695
  }
29657
29696
  }
29658
- return this.refObjectOrNone;
29697
+ return this.refObjectOrNull;
29659
29698
  }
29660
29699
  createTypeArguments(type) {
29661
29700
  if (type.typeArguments === void 0) {
@@ -33304,7 +33343,7 @@ var EntityLocalizationContext = class {
33304
33343
  case "parameter":
33305
33344
  return this._analyzer.typeFactory.getParameterType(
33306
33345
  this.getLocalizedTypeParameterEntity(type.getEntity()),
33307
- type.isNoneExcluded
33346
+ type.isNullExcluded
33308
33347
  );
33309
33348
  case "unresolved":
33310
33349
  return type;
@@ -34164,7 +34203,7 @@ var AnalyzedTranslationPackage2 = class {
34164
34203
  }
34165
34204
  case 134 /* PackageImportTranslation */:
34166
34205
  break;
34167
- case 140 /* TextTranslation */:
34206
+ case 140 /* TextTranslationDeclaration */:
34168
34207
  break;
34169
34208
  default:
34170
34209
  Debug.never(translation);
@@ -35193,14 +35232,14 @@ var OverloadResolver = class {
35193
35232
  return void 0;
35194
35233
  }
35195
35234
  chooseBetterTargetType(targetTypeA, typeWhenTargetTypeIsA, targetTypeB, typeWhenTargetTypeIsB) {
35196
- const isTargetTypeANullable = this._analyzer.isNoneAssignableToType(targetTypeA);
35197
- targetTypeA = this._analyzer.excludeNoneFromType(targetTypeA);
35198
- const isTypeWhenTargetTypeIsANullable = this._analyzer.isNoneAssignableToType(typeWhenTargetTypeIsA);
35199
- typeWhenTargetTypeIsA = this._analyzer.excludeNoneFromType(typeWhenTargetTypeIsA);
35200
- const isTargetTypeBNullable = this._analyzer.isNoneAssignableToType(targetTypeB);
35201
- targetTypeB = this._analyzer.excludeNoneFromType(targetTypeB);
35202
- const isTypeWhenTargetTypeIsBNullable = this._analyzer.isNoneAssignableToType(typeWhenTargetTypeIsB);
35203
- typeWhenTargetTypeIsB = this._analyzer.excludeNoneFromType(typeWhenTargetTypeIsB);
35235
+ const isTargetTypeANullable = this._analyzer.isNullAssignableToType(targetTypeA);
35236
+ targetTypeA = this._analyzer.excludeNullFromType(targetTypeA);
35237
+ const isTypeWhenTargetTypeIsANullable = this._analyzer.isNullAssignableToType(typeWhenTargetTypeIsA);
35238
+ typeWhenTargetTypeIsA = this._analyzer.excludeNullFromType(typeWhenTargetTypeIsA);
35239
+ const isTargetTypeBNullable = this._analyzer.isNullAssignableToType(targetTypeB);
35240
+ targetTypeB = this._analyzer.excludeNullFromType(targetTypeB);
35241
+ const isTypeWhenTargetTypeIsBNullable = this._analyzer.isNullAssignableToType(typeWhenTargetTypeIsB);
35242
+ typeWhenTargetTypeIsB = this._analyzer.excludeNullFromType(typeWhenTargetTypeIsB);
35204
35243
  let result;
35205
35244
  if (typeWhenTargetTypeIsA.equals(targetTypeA) && !typeWhenTargetTypeIsB.equals(targetTypeB)) {
35206
35245
  result = 1 /* TypeAIsBetter */;
@@ -35228,8 +35267,8 @@ var OverloadResolver = class {
35228
35267
  }
35229
35268
  getDistanceBetweenTypesInHierarchy(baseType, derivedType) {
35230
35269
  let result;
35231
- baseType = this._analyzer.excludeNoneFromType(baseType);
35232
- derivedType = this._analyzer.excludeNoneFromType(derivedType);
35270
+ baseType = this._analyzer.excludeNullFromType(baseType);
35271
+ derivedType = this._analyzer.excludeNullFromType(derivedType);
35233
35272
  if (baseType.kind === "structured" && derivedType.kind === "structured") {
35234
35273
  if (derivedType.equals(baseType)) {
35235
35274
  result = 0;
@@ -35331,7 +35370,7 @@ var Resolver2 = class {
35331
35370
  this._analyzer.createNodeDiagnostic(230 /* CannotDetermineTargetTypeToCallTheConstructor */, this._node)
35332
35371
  ]);
35333
35372
  }
35334
- targetType = this._analyzer.excludeNoneFromType(targetType);
35373
+ targetType = this._analyzer.excludeNullFromType(targetType);
35335
35374
  if (targetType.kind === "unresolved") {
35336
35375
  return new Meaning_unresolved([
35337
35376
  this._analyzer.createNodeDiagnostic(214 /* CannotCreateInstanceOfUnresolvedType */, this._node)
@@ -35634,7 +35673,7 @@ var Resolver4 = class {
35634
35673
  }
35635
35674
  }
35636
35675
  {
35637
- let type2 = this._analyzer.excludeNoneFromType(this._analyzer.type.ofExpression(this.callee));
35676
+ let type2 = this._analyzer.excludeNullFromType(this._analyzer.type.ofExpression(this.callee));
35638
35677
  type2 = unaliasType(type2);
35639
35678
  if (type2.kind === "function") {
35640
35679
  return new Meaning_objectFunctionCall(type2);
@@ -35719,17 +35758,17 @@ var Resolver4 = class {
35719
35758
  getTypeFromMeaning(meaning) {
35720
35759
  switch (meaning.kind) {
35721
35760
  case "function-call":
35722
- return this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(
35761
+ return this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(
35723
35762
  meaning.func.getReturnType(),
35724
35763
  this._node
35725
35764
  );
35726
35765
  case "operator-call":
35727
- return this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(
35766
+ return this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(
35728
35767
  meaning.operator.getReturnType(),
35729
35768
  this._node
35730
35769
  );
35731
35770
  case "object-function-call":
35732
- return this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(
35771
+ return this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(
35733
35772
  meaning.type.getReturnType(),
35734
35773
  this._node
35735
35774
  );
@@ -35912,7 +35951,7 @@ var Resolver5 = class {
35912
35951
  }
35913
35952
  resolve() {
35914
35953
  let receiverType = this._analyzer.type.ofExpression(this._node.expression);
35915
- receiverType = this._analyzer.excludeNoneFromType(receiverType);
35954
+ receiverType = this._analyzer.excludeNullFromType(receiverType);
35916
35955
  if (receiverType.kind === "unresolved") {
35917
35956
  return new Meaning_unresolved4(void 0);
35918
35957
  }
@@ -36637,7 +36676,7 @@ var Resolver8 = class {
36637
36676
  }
36638
36677
  resolve() {
36639
36678
  let receiverType = this._analyzer.type.ofExpression(this._node.expression);
36640
- receiverType = this._analyzer.excludeNoneFromType(receiverType);
36679
+ receiverType = this._analyzer.excludeNullFromType(receiverType);
36641
36680
  if (receiverType.kind === "unresolved") {
36642
36681
  return new ResolutionResult2(new Meaning_unresolved6());
36643
36682
  }
@@ -37039,7 +37078,7 @@ var Resolver9 = class {
37039
37078
  return new AccessedFunction_typeMember(method);
37040
37079
  }
37041
37080
  resolveInstanceMemberAccessMeaning(type) {
37042
- type = this._analyzer.excludeNoneFromType(type);
37081
+ type = this._analyzer.excludeNullFromType(type);
37043
37082
  if (type.kind === "unresolved") {
37044
37083
  return new ResolutionResult3(new Meaning_unresolved7());
37045
37084
  }
@@ -39078,7 +39117,7 @@ var PackageAndStaticVariablesInitializationValidator = class {
39078
39117
  getVariablesThatNeedToBeInitializedInConstructor(packageEntity) {
39079
39118
  const result = new Array();
39080
39119
  for (const member of packageEntity.getMembers().getNamedMembers()) {
39081
- if (member.kind === 0 /* Variable */ && !member.isConstant() && !isComputedVariableEntity(member) && !this._analyzer.isNoneAssignableToType(member.getType())) {
39120
+ if (member.kind === 0 /* Variable */ && !member.isConstant() && !isComputedVariableEntity(member) && !this._analyzer.isNullAssignableToType(member.getType())) {
39082
39121
  const definition = member.getDefinition();
39083
39122
  let variableEntity;
39084
39123
  if (definition.kind === 0 /* Source */) {
@@ -39090,7 +39129,7 @@ var PackageAndStaticVariablesInitializationValidator = class {
39090
39129
  variableEntity = member;
39091
39130
  }
39092
39131
  }
39093
- if (variableEntity !== void 0 && !variableEntity.isConstant() && !this._analyzer.isNoneAssignableToType(variableEntity.getType())) {
39132
+ if (variableEntity !== void 0 && !variableEntity.isConstant() && !this._analyzer.isNullAssignableToType(variableEntity.getType())) {
39094
39133
  result.push(variableEntity);
39095
39134
  }
39096
39135
  } else if (member.kind === 2 /* Type */) {
@@ -39101,7 +39140,7 @@ var PackageAndStaticVariablesInitializationValidator = class {
39101
39140
  }
39102
39141
  collectStaticFieldsThatNeedToBeInitializedInConstructor(typeEntity, result) {
39103
39142
  for (const member of typeEntity.getMembers().getNamedMembers()) {
39104
- if (member.kind === 0 /* Variable */ && member.isStatic() && !member.isConstant() && !isComputedVariableEntity(member) && !this._analyzer.isNoneAssignableToType(member.getType())) {
39143
+ if (member.kind === 0 /* Variable */ && member.isStatic() && !member.isConstant() && !isComputedVariableEntity(member) && !this._analyzer.isNullAssignableToType(member.getType())) {
39105
39144
  const definition = member.getDefinition();
39106
39145
  if (definition.kind === 0 /* Source */) {
39107
39146
  if (definition.value.kind === "single" && definition.value.node.kind === 52 /* FieldDeclaration */ && definition.value.node.initializer === void 0) {
@@ -40075,9 +40114,9 @@ var TypeNarrower = class {
40075
40114
  const right = unwrapParenthesizedExpressions(node.syntaxNode.right);
40076
40115
  const operator = node.syntaxNode.operator;
40077
40116
  if (operator.kind === 0 /* Token */ && (operator.tokenKind === 30 /* EqualsEquals */ || operator.tokenKind === 33 /* ExclamationEquals */)) {
40078
- if (this.isSameReferenceAsNarrowedExpression(left) && NodeTypeUtils.isNoneLiteral(right) || this.isSameReferenceAsNarrowedExpression(right) && NodeTypeUtils.isNoneLiteral(left)) {
40117
+ if (this.isSameReferenceAsNarrowedExpression(left) && NodeTypeUtils.isNullLiteral(right) || this.isSameReferenceAsNarrowedExpression(right) && NodeTypeUtils.isNullLiteral(left)) {
40079
40118
  const isEqual = node.isTrue ? operator.tokenKind === 30 /* EqualsEquals */ : !(operator.tokenKind === 30 /* EqualsEquals */);
40080
- return this.getTypeAtComparisonWithNone(typeAtPredecessor, isEqual);
40119
+ return this.getTypeAtComparisonWithNull(typeAtPredecessor, isEqual);
40081
40120
  }
40082
40121
  }
40083
40122
  return typeAtPredecessor;
@@ -40136,18 +40175,18 @@ var TypeNarrower = class {
40136
40175
  if (this._initialType.kind === "union" && rightType.kind !== "union") {
40137
40176
  const constituentTypes = this._initialType.originalTypes.filter((t) => this._analyzer.isTypeAssignableTo(rightType, t));
40138
40177
  result = this._analyzer.typeFactory.getUnionType(constituentTypes);
40139
- } else if (!this._analyzer.isNoneAssignableToType(rightType)) {
40140
- result = this._analyzer.excludeNoneFromType(this._initialType);
40178
+ } else if (!this._analyzer.isNullAssignableToType(rightType)) {
40179
+ result = this._analyzer.excludeNullFromType(this._initialType);
40141
40180
  } else {
40142
40181
  result = this._initialType;
40143
40182
  }
40144
40183
  return result;
40145
40184
  }
40146
- getTypeAtComparisonWithNone(type, isEqual) {
40185
+ getTypeAtComparisonWithNull(type, isEqual) {
40147
40186
  if (isEqual) {
40148
- return this._analyzer.includeNoneToType(type, this.locale);
40187
+ return this._analyzer.includeNullToType(type, this.locale);
40149
40188
  } else {
40150
- return this._analyzer.excludeNoneFromType(type);
40189
+ return this._analyzer.excludeNullFromType(type);
40151
40190
  }
40152
40191
  }
40153
40192
  getTypeAtIsExpression(typeAtPredecessor, node, isTrue) {
@@ -40166,8 +40205,8 @@ var TypeNarrower = class {
40166
40205
  if ((typeAssignabilityFlags & 16 /* ImplicitConversion */) !== 0) {
40167
40206
  return this.getTypeAtAssignmentWithImplicitConversion(rightType);
40168
40207
  }
40169
- if (rightType.equals(this._analyzer.originalStandardTypes.none)) {
40170
- return isDeclaration ? this._initialType : this._analyzer.includeNoneToType(this.getTypeAtControlFlowNode(predecessor), this.locale);
40208
+ if (rightType.equals(this._analyzer.originalStandardTypes.nullType)) {
40209
+ return isDeclaration ? this._initialType : this._analyzer.includeNullToType(this.getTypeAtControlFlowNode(predecessor), this.locale);
40171
40210
  }
40172
40211
  return rightType;
40173
40212
  }
@@ -40272,7 +40311,7 @@ var UserDefinableBinaryOperatorResolver = class {
40272
40311
  const semanticContext = this._analyzer.semanticContext.containing(this._left);
40273
40312
  const hidingMatcher = semanticContext.getHidingMatcher();
40274
40313
  const typeExtensionLookup = semanticContext;
40275
- const nonNullableLeftType = this._analyzer.excludeNoneFromType(this.leftType);
40314
+ const nonNullableLeftType = this._analyzer.excludeNullFromType(this.leftType);
40276
40315
  const leftTypeMemberLookup = TypeMemberLookup.ofType(
40277
40316
  this._analyzer,
40278
40317
  nonNullableLeftType,
@@ -40402,7 +40441,7 @@ var UserDefinableUnaryOperatorResolver = class {
40402
40441
  const operandType = this._analyzer.type.ofExpression(this._node.operand);
40403
40442
  const semanticContext = this._analyzer.semanticContext.containing(this._node.operand);
40404
40443
  const hidingMatcher = semanticContext.getHidingMatcher();
40405
- const nonNullableOperandType = this._analyzer.excludeNoneFromType(operandType);
40444
+ const nonNullableOperandType = this._analyzer.excludeNullFromType(operandType);
40406
40445
  const typeMemberLookup = TypeMemberLookup.ofType(
40407
40446
  this._analyzer,
40408
40447
  nonNullableOperandType,
@@ -41876,8 +41915,8 @@ var SemanticContextBuilder = class {
41876
41915
  }
41877
41916
  }
41878
41917
  break;
41879
- case 140 /* TextTranslation */:
41880
- if (cursor.sourceText.kind === 141 /* TranslationTextTemplate */) {
41918
+ case 140 /* TextTranslationDeclaration */:
41919
+ if (cursor.sourceText.kind === 141 /* TextTemplateDeclaration */) {
41881
41920
  return this.ofTranslationTextTemplate(cursor.sourceText);
41882
41921
  }
41883
41922
  break;
@@ -42891,7 +42930,7 @@ var ParametersOfFunctionTypeSemanticContext = class extends SemanticContextValid
42891
42930
  };
42892
42931
 
42893
42932
  // source/analysis/Analyzer.ts
42894
- var Analyzer = class _Analyzer {
42933
+ var Analyzer12 = class {
42895
42934
  constructor(compilation, tsInteropInputs) {
42896
42935
  this._tsInterop = new Cached();
42897
42936
  this._memberAccessExpressionResolutionResults = /* @__PURE__ */ new Map();
@@ -42946,7 +42985,7 @@ var Analyzer = class _Analyzer {
42946
42985
  this.typeUtils = new TypeUtils(this);
42947
42986
  this.conflictsCheck = new ConflictsCheck(this);
42948
42987
  const systemPackageName = PackageName3.parse("\u0410\u0440\u0442\u0435\u043B\u044C");
42949
- const systemPackage = this.getPackageEntityByName(systemPackageName);
42988
+ const systemPackage = this.getOriginalPackageEntityByName(systemPackageName);
42950
42989
  if (systemPackage === void 0) {
42951
42990
  throw new WellKnownDeclarationsLoadError(new Diagnostic(DiagnosticData.withCode(
42952
42991
  405 /* StandardPackage0NotFound */,
@@ -42959,12 +42998,6 @@ var Analyzer = class _Analyzer {
42959
42998
  this.originalStandardTypes = new StandardTypes(this, this.originalWellKnownDeclarations);
42960
42999
  this._localizedStandardTypes.set(1 /* Ru */, this.originalStandardTypes);
42961
43000
  }
42962
- static {
42963
- this.enumeratorMethodName = "\u043F\u0435\u0440\u0435\u0431\u043E\u0440";
42964
- }
42965
- static {
42966
- this.functionTypeInvokeMethodName = "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C";
42967
- }
42968
43001
  get tsInterop() {
42969
43002
  return this._tsInterop.getOrInsertWith(() => this.createTsInterop());
42970
43003
  }
@@ -43013,9 +43046,8 @@ var Analyzer = class _Analyzer {
43013
43046
  );
43014
43047
  result = new WithDiagnostics_error(diagnostic);
43015
43048
  } else {
43016
- const returnType = member.getReturnType();
43017
- const elementType = this.ifTypeEnumeratorThenItemType(returnType);
43018
- if (elementType !== void 0) {
43049
+ const elementType = this.ifTypeEnumeratorThenItemType(member.getReturnType());
43050
+ if (member.getValueParameters().length === 0 && elementType !== void 0) {
43019
43051
  result = new WithDiagnostics_ok(new ExpressionCanBeUsedInForLoopCheckResult(elementType, member));
43020
43052
  } else {
43021
43053
  const diagnosticArgumentFactory = semanticContext.getDiagnosticArgumentFactory();
@@ -43033,6 +43065,23 @@ var Analyzer = class _Analyzer {
43033
43065
  }
43034
43066
  return result;
43035
43067
  }
43068
+ isEnumeratorMethodSignature(entity) {
43069
+ const name = LocalizationHelper.localizeHelperPhrase(
43070
+ 8 /* EnumeratorMethodName */,
43071
+ entity.getLocalization().locale
43072
+ );
43073
+ if (!entity.getName().considerEqual(new Name(name))) {
43074
+ return false;
43075
+ }
43076
+ if (entity.getValueParameters().length !== 0) {
43077
+ return false;
43078
+ }
43079
+ const elementType = this.ifTypeEnumeratorThenItemType(entity.getReturnType());
43080
+ if (elementType === void 0) {
43081
+ return false;
43082
+ }
43083
+ return true;
43084
+ }
43036
43085
  ifTypeEnumerableThenItemType(type) {
43037
43086
  let result = void 0;
43038
43087
  const enumerableEntity = this.originalWellKnownDeclarations.enumerable;
@@ -43362,7 +43411,7 @@ var Analyzer = class _Analyzer {
43362
43411
  case 78 /* DereferenceExpression */: {
43363
43412
  if (node.expression.kind === 62 /* AssumptionExpression */) {
43364
43413
  const type = this.type.ofExpression(node.expression.expression);
43365
- if (this.canTypeBeNone(type)) {
43414
+ if (this.canTypeBeNull(type)) {
43366
43415
  return true;
43367
43416
  } else {
43368
43417
  return this.isExpressionValidOptionalChaining(node.expression.expression);
@@ -43415,10 +43464,10 @@ var Analyzer = class _Analyzer {
43415
43464
  }
43416
43465
  return result;
43417
43466
  }
43418
- includeNoneToTypeIfExpressionValidOutermostOptionalChaining(type, node) {
43467
+ includeNullToTypeIfExpressionValidOutermostOptionalChaining(type, node) {
43419
43468
  let result = type;
43420
43469
  if (this.isExpressionValidOutermostOptionalChaining(node)) {
43421
- result = this.includeNoneToType(type, TreeQuery.fromNode(node).locale(this));
43470
+ result = this.includeNullToType(type, TreeQuery.fromNode(node).locale(this));
43422
43471
  }
43423
43472
  return result;
43424
43473
  }
@@ -43742,7 +43791,10 @@ var Analyzer = class _Analyzer {
43742
43791
  return Query.from(this.compilation.allPackages).mapAndFilter((p) => p.kind === "translation" ? this.getAnalyzedTranslationPackageIfTargetResolved(p) : void 0).toArray();
43743
43792
  }
43744
43793
  createFunctionTypeInvokeMethod(entity) {
43745
- const name = new Name(_Analyzer.functionTypeInvokeMethodName);
43794
+ const name = new Name(LocalizationHelper.localizeHelperPhrase(
43795
+ 9 /* InvokeMethodName */,
43796
+ entity.getLocalization().locale
43797
+ ));
43746
43798
  const valueParameters = entity.getValueParameters();
43747
43799
  const returnType = entity.getReturnType();
43748
43800
  const method = new IntrinsicMethodEntity(
@@ -43766,38 +43818,38 @@ var Analyzer = class _Analyzer {
43766
43818
  }
43767
43819
  /**
43768
43820
  * Преобразует тип таким образом, чтобы он не мог содержать значение `пусто`.
43769
- * После преобразования метод `canTypeBeNone` вернёт `true` для полученного типа.
43821
+ * После преобразования метод `canTypeBeNull` вернёт `true` для полученного типа.
43770
43822
  * @example
43771
43823
  * - Число -> Число
43772
43824
  * - Число | Пусто -> Число
43773
- * - Т: Объект? -> Т: Объект? (с флагом isNoneExcluded === true)
43825
+ * - Т: Объект? -> Т: Объект? (с флагом isNullExcluded === true)
43774
43826
  * - Т: Объект -> Т: Объект (без изменения)
43775
43827
  */
43776
- excludeNoneFromType(type) {
43777
- if (!this.canTypeBeNone(type)) {
43828
+ excludeNullFromType(type) {
43829
+ if (!this.canTypeBeNull(type)) {
43778
43830
  return type;
43779
43831
  }
43780
43832
  type = unaliasType(type);
43781
43833
  if (type.kind === "union") {
43782
- const typesWithoutNone = new Array();
43834
+ const typesWithoutNull = new Array();
43783
43835
  for (const composingType of type.originalTypes) {
43784
- const typeWithoutNone = this.excludeNoneFromType(composingType);
43785
- if (!typeWithoutNone.equals(this.originalStandardTypes.none)) {
43786
- typesWithoutNone.push(typeWithoutNone);
43836
+ const typeWithoutNull = this.excludeNullFromType(composingType);
43837
+ if (!typeWithoutNull.equals(this.originalStandardTypes.nullType)) {
43838
+ typesWithoutNull.push(typeWithoutNull);
43787
43839
  }
43788
43840
  }
43789
- if (typesWithoutNone.length === 0) {
43841
+ if (typesWithoutNull.length === 0) {
43790
43842
  return type;
43791
- } else if (typesWithoutNone.length === 1) {
43792
- return typesWithoutNone[0];
43843
+ } else if (typesWithoutNull.length === 1) {
43844
+ return typesWithoutNull[0];
43793
43845
  } else {
43794
- return this.typeFactory.getUnionType(typesWithoutNone);
43846
+ return this.typeFactory.getUnionType(typesWithoutNull);
43795
43847
  }
43796
43848
  }
43797
- if (type.kind === "parameter" && this.canTypeParameterBeNone(type)) {
43849
+ if (type.kind === "parameter" && this.canTypeParameterBeNull(type)) {
43798
43850
  return this.typeFactory.getParameterType(type.getEntity(), true);
43799
43851
  }
43800
- if (type.equals(this.originalStandardTypes.none)) {
43852
+ if (type.equals(this.originalStandardTypes.nullType)) {
43801
43853
  return type;
43802
43854
  }
43803
43855
  return type;
@@ -43810,21 +43862,21 @@ var Analyzer = class _Analyzer {
43810
43862
  * - Т: Объект? -> да
43811
43863
  * - Т: Объект -> нет
43812
43864
  */
43813
- canTypeBeNone(type) {
43865
+ canTypeBeNull(type) {
43814
43866
  type = unaliasType(type);
43815
43867
  if (type.kind === "union") {
43816
- return type.unaliasedFlattenedTypes.some((t) => t.equals(this.originalStandardTypes.none) || t.kind === "parameter" && this.canTypeParameterBeNone(t));
43868
+ return type.unaliasedFlattenedTypes.some((t) => t.equals(this.originalStandardTypes.nullType) || t.kind === "parameter" && this.canTypeParameterBeNull(t));
43817
43869
  }
43818
43870
  if (type.kind === "parameter") {
43819
- return this.canTypeParameterBeNone(type);
43871
+ return this.canTypeParameterBeNull(type);
43820
43872
  }
43821
- if (type.equals(this.originalStandardTypes.none)) {
43873
+ if (type.equals(this.originalStandardTypes.nullType)) {
43822
43874
  return true;
43823
43875
  }
43824
43876
  return false;
43825
43877
  }
43826
- canTypeParameterBeNone(type) {
43827
- return type.constraint === void 0 || this.canTypeBeNone(type.constraint);
43878
+ canTypeParameterBeNull(type) {
43879
+ return type.constraint === void 0 || this.canTypeBeNull(type.constraint);
43828
43880
  }
43829
43881
  /**
43830
43882
  * Делает тип `Пусто` совместимым с данным типом.
@@ -43834,22 +43886,22 @@ var Analyzer = class _Analyzer {
43834
43886
  * @example
43835
43887
  * - Число -> Число | Пусто
43836
43888
  * - Число | Пусто -> Число | Пусто
43837
- * - Т: Объект? -> (Т: Объект?) | Пусто (см. метод isNoneAssignableToType)
43889
+ * - Т: Объект? -> (Т: Объект?) | Пусто (см. метод isNullAssignableToType)
43838
43890
  * - Т: Объект -> (Т: Объект) | Пусто
43839
43891
  */
43840
- includeNoneToType(type, locale) {
43841
- if (this.isNoneAssignableToType(type)) {
43892
+ includeNullToType(type, locale) {
43893
+ if (this.isNullAssignableToType(type)) {
43842
43894
  return type;
43843
43895
  }
43844
- const noneType = this.getLocalizedStandardTypes(locale).none;
43845
- let typesWithNone;
43896
+ const nullType = this.getLocalizedStandardTypes(locale).nullType;
43897
+ let typesWithNull;
43846
43898
  if (type.kind === "union") {
43847
- typesWithNone = Array.from(type.originalTypes);
43848
- typesWithNone.push(noneType);
43899
+ typesWithNull = Array.from(type.originalTypes);
43900
+ typesWithNull.push(nullType);
43849
43901
  } else {
43850
- typesWithNone = [type, noneType];
43902
+ typesWithNull = [type, nullType];
43851
43903
  }
43852
- return this.typeFactory.getUnionType(typesWithNone);
43904
+ return this.typeFactory.getUnionType(typesWithNull);
43853
43905
  }
43854
43906
  /**
43855
43907
  * Отвечает на вопрос "Совместим ли тип `Пусто` с данным типом?" (Можно ли присвоить `пусто` в переменную с данным типом?).
@@ -43858,12 +43910,12 @@ var Analyzer = class _Analyzer {
43858
43910
  * - Число | Пусто -> да
43859
43911
  * - Т: Объект? -> нет, поскольку в качестве конкретного типа, заменяющего параметр, может быть использован тип, исключающий `пусто`.
43860
43912
  */
43861
- isNoneAssignableToType(type) {
43913
+ isNullAssignableToType(type) {
43862
43914
  type = unaliasType(type);
43863
43915
  if (type.kind === "union") {
43864
- return type.unaliasedFlattenedTypes.find((t) => t.equals(this.originalStandardTypes.none)) !== void 0;
43916
+ return type.unaliasedFlattenedTypes.find((t) => t.equals(this.originalStandardTypes.nullType)) !== void 0;
43865
43917
  }
43866
- if (type.equals(this.originalStandardTypes.none)) {
43918
+ if (type.equals(this.originalStandardTypes.nullType)) {
43867
43919
  return true;
43868
43920
  }
43869
43921
  return false;
@@ -43881,11 +43933,11 @@ var Analyzer = class _Analyzer {
43881
43933
  }
43882
43934
  }
43883
43935
  isValueParameterVariadic(entity) {
43884
- const type = this.excludeNoneFromType(entity.getType());
43936
+ const type = this.excludeNullFromType(entity.getType());
43885
43937
  return type.kind === "alias" && type.getEntity().getOriginalEntity() === this.originalWellKnownDeclarations.parameterArray;
43886
43938
  }
43887
43939
  getDefaultTypeParameterConstraint(locale) {
43888
- return this.includeNoneToType(this.getLocalizedStandardTypes(locale).refObject, locale);
43940
+ return this.includeNullToType(this.getLocalizedStandardTypes(locale).refObject, locale);
43889
43941
  }
43890
43942
  getSignatureTypeOfFunctionEntity(entity) {
43891
43943
  let result = this._functionEntitySignatureTypes.get(entity);
@@ -44569,7 +44621,7 @@ var Analyzer = class _Analyzer {
44569
44621
  }
44570
44622
  const functionContext = this.semanticContext.ofFunctionBlock(node);
44571
44623
  const returnType = functionContext.getContainingSubprogram()?.getReturnType();
44572
- if (returnType === void 0 || returnType.equals(this.originalStandardTypes.none)) {
44624
+ if (returnType === void 0 || returnType.equals(this.originalStandardTypes.nullType)) {
44573
44625
  if (node.expressionOrStatementList.kind === 68 /* CallExpression */) {
44574
44626
  return false;
44575
44627
  }
@@ -44800,7 +44852,7 @@ var WellKnownDeclarationsLoader = class {
44800
44852
  textTemplate: this.findPackageType(systemPackage, new Name("\u0428\u0430\u0431\u043B\u043E\u043D\u0422\u0435\u043A\u0441\u0442\u0430"), 0, 1 /* Structured */),
44801
44853
  char: this.findPackageType(systemPackage, new Name("\u0421\u0438\u043C\u0432\u043E\u043B"), 0, 1 /* Structured */),
44802
44854
  yesNo: this.findPackageType(systemPackage, new Name("\u0414\u0430\u041D\u0435\u0442"), 0, 1 /* Structured */),
44803
- none: this.findPackageType(systemPackage, new Name("\u041F\u0443\u0441\u0442\u043E"), 0, 1 /* Structured */),
44855
+ nullEntity: this.findPackageType(systemPackage, new Name("\u041F\u0443\u0441\u0442\u043E"), 0, 1 /* Structured */),
44804
44856
  enumerable,
44805
44857
  enumerator: this.findPackageType(systemPackage, new Name("\u041F\u0435\u0440\u0435\u0431\u043E\u0440"), 1, 1 /* Structured */),
44806
44858
  enumeratorMethod: this.findMethodDeclaration(enumerable, new Name("\u043F\u0435\u0440\u0435\u0431\u043E\u0440")),
@@ -45057,11 +45109,11 @@ var Type = class {
45057
45109
  }
45058
45110
  ofAssertionExpression(node) {
45059
45111
  const type = this.ofExpression(node.expression);
45060
- return this._analyzer.excludeNoneFromType(type);
45112
+ return this._analyzer.excludeNullFromType(type);
45061
45113
  }
45062
45114
  ofAssumptionExpression(node) {
45063
45115
  const type = this.ofExpression(node.expression);
45064
- return this._analyzer.excludeNoneFromType(type);
45116
+ return this._analyzer.excludeNullFromType(type);
45065
45117
  }
45066
45118
  ofAsExpression(node) {
45067
45119
  return this._analyzer.type.ofTypeSpecifier(node.typeSpecifier);
@@ -45080,7 +45132,7 @@ var Type = class {
45080
45132
  return this._analyzer.originalStandardTypes.unresolved;
45081
45133
  }
45082
45134
  case "question-question": {
45083
- const leftType = this._analyzer.excludeNoneFromType(this.ofExpression(node.left, targetTypeHint));
45135
+ const leftType = this._analyzer.excludeNullFromType(this.ofExpression(node.left, targetTypeHint));
45084
45136
  const rightType = this.ofExpression(node.right, targetTypeHint);
45085
45137
  return this._analyzer.typeFactory.getUnionType([leftType, rightType], true);
45086
45138
  }
@@ -45110,7 +45162,7 @@ var Type = class {
45110
45162
  switch (meaning.kind) {
45111
45163
  case "resolved":
45112
45164
  if (meaning.singleSuitableIndexer !== void 0) {
45113
- return this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(
45165
+ return this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(
45114
45166
  meaning.singleSuitableIndexer.getType(),
45115
45167
  node
45116
45168
  );
@@ -45158,7 +45210,7 @@ var Type = class {
45158
45210
  return result;
45159
45211
  }
45160
45212
  case "instance-field-access": {
45161
- const declaredType = this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(
45213
+ const declaredType = this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(
45162
45214
  meaning.field.getType(),
45163
45215
  node
45164
45216
  );
@@ -45177,7 +45229,7 @@ var Type = class {
45177
45229
  return this._analyzer.originalStandardTypes.unresolved;
45178
45230
  case "instance-method-access":
45179
45231
  if (meaning.singleSuitableFunction !== void 0) {
45180
- return this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(
45232
+ return this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(
45181
45233
  this.ofAccessedFunction(meaning.singleSuitableFunction),
45182
45234
  node
45183
45235
  );
@@ -45228,7 +45280,7 @@ var Type = class {
45228
45280
  if (meaning.kind === "unresolved") {
45229
45281
  return this._analyzer.originalStandardTypes.unresolved;
45230
45282
  }
45231
- return this._analyzer.includeNoneToTypeIfExpressionValidOutermostOptionalChaining(meaning.operator.getType(), node);
45283
+ return this._analyzer.includeNullToTypeIfExpressionValidOutermostOptionalChaining(meaning.operator.getType(), node);
45232
45284
  }
45233
45285
  ofConditionalExpression(node, targetTypeHint) {
45234
45286
  const firstExpressionType = this.ofExpression(node.firstExpression, targetTypeHint);
@@ -45236,7 +45288,7 @@ var Type = class {
45236
45288
  if (node.secondExpression !== void 0) {
45237
45289
  secondExpressionType = this.ofExpression(node.secondExpression, targetTypeHint);
45238
45290
  } else {
45239
- secondExpressionType = this._analyzer.getLocalizedStandardTypes(TreeQuery.fromNode(node).locale(this._analyzer)).none;
45291
+ secondExpressionType = this._analyzer.getLocalizedStandardTypes(TreeQuery.fromNode(node).locale(this._analyzer)).nullType;
45240
45292
  }
45241
45293
  return this._analyzer.typeFactory.getUnionType([firstExpressionType, secondExpressionType], true);
45242
45294
  }
@@ -45325,8 +45377,8 @@ var Type = class {
45325
45377
  case 52 /* Yes */:
45326
45378
  case 53 /* No */:
45327
45379
  return standardTypes.yesNo;
45328
- case 57 /* None */:
45329
- return standardTypes.none;
45380
+ case 57 /* Null */:
45381
+ return standardTypes.nullType;
45330
45382
  default:
45331
45383
  Debug.never(node.keyword);
45332
45384
  }
@@ -45398,7 +45450,7 @@ var Type = class {
45398
45450
  return this.ofTypeSpecifier(node.typeSpecifier);
45399
45451
  }
45400
45452
  ofNullableTypeSpecifier(node) {
45401
- return this._analyzer.includeNoneToType(
45453
+ return this._analyzer.includeNullToType(
45402
45454
  this.ofTypeSpecifier(node.typeSpecifier),
45403
45455
  TreeQuery.fromNode(node).locale(this._analyzer)
45404
45456
  );
@@ -45428,7 +45480,7 @@ var Type = class {
45428
45480
  const containingPackage = TreeQuery.fromNode(node).packageEntity(this._analyzer);
45429
45481
  const entity = new UnfinishedIntrinsicAnonymousFunctionTypeEntity(
45430
45482
  this._analyzer,
45431
- this._analyzer.getLocalizedStandardTypes(TreeQuery.fromNode(node).locale(this._analyzer)).none,
45483
+ this._analyzer.getLocalizedStandardTypes(TreeQuery.fromNode(node).locale(this._analyzer)).nullType,
45432
45484
  false,
45433
45485
  1 /* SubstituteOwnSubstitutionsAndMerge */,
45434
45486
  containingPackage,
@@ -45503,7 +45555,7 @@ var Type = class {
45503
45555
  if (node.returnTypeAnnotation !== void 0) {
45504
45556
  returnType = this._analyzer.type.ofTypeSpecifier(node.returnTypeAnnotation.typeSpecifier);
45505
45557
  } else {
45506
- returnType = this._analyzer.getLocalizedStandardTypes(TreeQuery.fromNode(node).locale(this._analyzer)).none;
45558
+ returnType = this._analyzer.getLocalizedStandardTypes(TreeQuery.fromNode(node).locale(this._analyzer)).nullType;
45507
45559
  }
45508
45560
  const containingPackage = TreeQuery.fromNode(node).packageEntity(this._analyzer);
45509
45561
  const unfinishedEntity = new UnfinishedIntrinsicAnonymousFunctionTypeEntity(
@@ -45636,7 +45688,7 @@ var TargetType = class {
45636
45688
  return this.getTargetTypeOfChildOfElseIfClause(node.parent, node);
45637
45689
  case 92 /* FunctionBlock */:
45638
45690
  return this.getTargetTypeOfChildOfFunctionBlock(node.parent, node);
45639
- case 140 /* TextTranslation */:
45691
+ case 140 /* TextTranslationDeclaration */:
45640
45692
  return this.getTargetTypeOfChildOfTextTemplateLiteralTranslation(node.parent, node);
45641
45693
  default:
45642
45694
  Debug.never(node.parent);
@@ -45685,7 +45737,7 @@ var TargetType = class {
45685
45737
  case "question-question": {
45686
45738
  const targetType = this.ofExpression(parent);
45687
45739
  if (targetType !== void 0 && child === parent.left) {
45688
- return this._analyzer.includeNoneToType(targetType, TreeQuery.fromNode(child).locale(this._analyzer));
45740
+ return this._analyzer.includeNullToType(targetType, TreeQuery.fromNode(child).locale(this._analyzer));
45689
45741
  }
45690
45742
  return targetType;
45691
45743
  }
@@ -45885,12 +45937,12 @@ var TargetType = class {
45885
45937
  )
45886
45938
  )
45887
45939
  );
45888
- if (node.sourceText.kind === 141 /* TranslationTextTemplate */) {
45940
+ if (node.sourceText.kind === 141 /* TextTemplateDeclaration */) {
45889
45941
  const templateSpans = node.sourceText.spanList.spans;
45890
45942
  for (let i = 0; i < templateSpans.length; i++) {
45891
45943
  const span = templateSpans[i];
45892
45944
  const parameter = span.parameter;
45893
- if (parameter.kind === 144 /* TranslationTextTemplateParameterDeclaration */) {
45945
+ if (parameter.kind === 144 /* TextTemplateParameterDeclaration */) {
45894
45946
  const parameterEntity = this._analyzer.entity.ofTranslationTextTemplateParameterDeclaration(parameter);
45895
45947
  const name = parameterEntity.getName();
45896
45948
  const parameterType = parameterEntity.getType();
@@ -46941,7 +46993,7 @@ var OverriddenMember = class {
46941
46993
  case "constructor":
46942
46994
  return member.getConstructedType();
46943
46995
  case "destructor":
46944
- return this._analyzer.getLocalizedStandardTypes(member.getEntity().getLocalization().locale).none;
46996
+ return this._analyzer.getLocalizedStandardTypes(member.getEntity().getLocalization().locale).nullType;
46945
46997
  default:
46946
46998
  Debug.never(member);
46947
46999
  }
@@ -47548,7 +47600,7 @@ var LinkedMultiPlatformPackage = class {
47548
47600
  if (type2.kind !== "parameter") {
47549
47601
  return false;
47550
47602
  }
47551
- if (type1.isNoneExcluded !== type2.isNoneExcluded) {
47603
+ if (type1.isNullExcluded !== type2.isNullExcluded) {
47552
47604
  return false;
47553
47605
  }
47554
47606
  const containingEntity1 = type1.getEntity().getContainingEntity();
@@ -47821,7 +47873,7 @@ var TypeAssignabilityCheck = class {
47821
47873
  return 2 /* Identity */;
47822
47874
  }
47823
47875
  if (target.kind === "parameter") {
47824
- if (source.kind === "parameter" && source.getEntity() === target.getEntity() && (this._analyzer.canTypeParameterBeNone(target) || !this._analyzer.canTypeParameterBeNone(source))) {
47876
+ if (source.kind === "parameter" && source.getEntity() === target.getEntity() && (this._analyzer.canTypeParameterBeNull(target) || !this._analyzer.canTypeParameterBeNull(source))) {
47825
47877
  return 2 /* Identity */;
47826
47878
  } else {
47827
47879
  return 1 /* NotAssignable */;
@@ -47889,10 +47941,10 @@ var TypeAssignabilityCheck = class {
47889
47941
  }
47890
47942
  return result;
47891
47943
  }
47892
- if (source.equals(this._analyzer.originalStandardTypes.none) || target.equals(this._analyzer.originalStandardTypes.none)) {
47944
+ if (source.equals(this._analyzer.originalStandardTypes.nullType) || target.equals(this._analyzer.originalStandardTypes.nullType)) {
47893
47945
  return source.equals(target) ? 2 /* Identity */ : 1 /* NotAssignable */;
47894
47946
  }
47895
- if (!this._analyzer.canTypeBeNone(source) && target.equals(this._analyzer.originalStandardTypes.refObject)) {
47947
+ if (!this._analyzer.canTypeBeNull(source) && target.equals(this._analyzer.originalStandardTypes.refObject)) {
47896
47948
  return 4 /* DerivedToBase */;
47897
47949
  }
47898
47950
  if (source.equals(this._analyzer.originalStandardTypes.integer) && target.equals(this._analyzer.originalStandardTypes.number)) {
@@ -48207,7 +48259,7 @@ var TypeUtils = class {
48207
48259
  if (constituentTypes.length === 0) {
48208
48260
  return [];
48209
48261
  }
48210
- if (this._analyzer.canTypeBeNone(unionType)) {
48262
+ if (this._analyzer.canTypeBeNull(unionType)) {
48211
48263
  return [];
48212
48264
  }
48213
48265
  const result = this.getBaseTypesForCommonTypesSearch(constituentTypes[0]);
@@ -48935,7 +48987,7 @@ var InstanceFieldsInitializationValidator = class {
48935
48987
  getFieldsThatNeedToBeInitializedInConstructor(typeEntity) {
48936
48988
  const result = new Array();
48937
48989
  for (const member of typeEntity.getMembers().getNamedMembers()) {
48938
- if (member.kind === 0 /* Variable */ && !member.isConstant() && !member.isStatic() && !TypeMemberEntity.isAbstract(member) && !isComputedVariableEntity(member) && !this._analyzer.isNoneAssignableToType(member.getType())) {
48990
+ if (member.kind === 0 /* Variable */ && !member.isConstant() && !member.isStatic() && !TypeMemberEntity.isAbstract(member) && !isComputedVariableEntity(member) && !this._analyzer.isNullAssignableToType(member.getType())) {
48939
48991
  const definition = member.getDefinition();
48940
48992
  if (definition.kind === 0 /* Source */) {
48941
48993
  if (definition.value.kind === "single" && definition.value.node.kind === 52 /* FieldDeclaration */ && definition.value.node.initializer === void 0) {
@@ -49410,8 +49462,8 @@ var DiagnosticCollector = class _DiagnosticCollector {
49410
49462
  case 134 /* PackageImportTranslation */: {
49411
49463
  break;
49412
49464
  }
49413
- case 140 /* TextTranslation */: {
49414
- if (node.sourceText.kind === 141 /* TranslationTextTemplate */) {
49465
+ case 140 /* TextTranslationDeclaration */: {
49466
+ if (node.sourceText.kind === 141 /* TextTemplateDeclaration */) {
49415
49467
  const semanticContext = this._analyzer.semanticContext.ofTranslationTextTemplate(node.sourceText);
49416
49468
  semanticContext.validateNameConflicts(this._diagnosticAcceptor);
49417
49469
  }
@@ -49898,8 +49950,8 @@ var DiagnosticCollector = class _DiagnosticCollector {
49898
49950
  switch (meaning.kind) {
49899
49951
  case "resolved": {
49900
49952
  const receiverType = this._analyzer.type.ofExpression(node.expression);
49901
- if (this._analyzer.canTypeBeNone(receiverType)) {
49902
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNone */, node.expression));
49953
+ if (this._analyzer.canTypeBeNull(receiverType)) {
49954
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNull */, node.expression));
49903
49955
  }
49904
49956
  const entity = meaning.operator.getEntity();
49905
49957
  if (this.isReceiverBaseAutoVariableAccess(node.expression) && TypeMemberEntity.isAbstract(entity)) {
@@ -49930,8 +49982,8 @@ var DiagnosticCollector = class _DiagnosticCollector {
49930
49982
  }
49931
49983
  if (meaning.kind !== "unresolved") {
49932
49984
  const receiverType = this._analyzer.type.ofExpression(node.expression);
49933
- if (this._analyzer.canTypeBeNone(receiverType)) {
49934
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNone */, node.expression));
49985
+ if (this._analyzer.canTypeBeNull(receiverType)) {
49986
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNull */, node.expression));
49935
49987
  }
49936
49988
  const entity = meaning.singleSuitableIndexer?.getEntity();
49937
49989
  if (entity !== void 0 && this.isReceiverBaseAutoVariableAccess(node.expression) && TypeMemberEntity.isAbstract(entity)) {
@@ -49983,8 +50035,8 @@ var DiagnosticCollector = class _DiagnosticCollector {
49983
50035
  }
49984
50036
  if (meaning.kind === "object-function-call") {
49985
50037
  const calleeType = this._analyzer.type.ofExpression(node.expression);
49986
- if (this._analyzer.canTypeBeNone(calleeType)) {
49987
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNone */, node.expression));
50038
+ if (this._analyzer.canTypeBeNull(calleeType)) {
50039
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNull */, node.expression));
49988
50040
  }
49989
50041
  }
49990
50042
  }
@@ -50345,7 +50397,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
50345
50397
  256 /* OnlySubprogramsWithReturnTypeCanReturnValue */,
50346
50398
  node.returnKeyword
50347
50399
  ));
50348
- } else if (returnType !== void 0 && node.expression === void 0 && !returnType.equals(this._analyzer.originalStandardTypes.none)) {
50400
+ } else if (returnType !== void 0 && node.expression === void 0 && !returnType.equals(this._analyzer.originalStandardTypes.nullType)) {
50349
50401
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
50350
50402
  263 /* SubprogramMustReturnValue */,
50351
50403
  node.returnKeyword
@@ -50672,8 +50724,8 @@ var DiagnosticCollector = class _DiagnosticCollector {
50672
50724
  }
50673
50725
  if (meaning.kind === "instance-field-access" || meaning.kind === "instance-method-access" || meaning.kind === "operator-access") {
50674
50726
  const receiverType = this._analyzer.type.ofExpression(node.expression);
50675
- if (this._analyzer.canTypeBeNone(receiverType)) {
50676
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNone */, node.expression));
50727
+ if (this._analyzer.canTypeBeNull(receiverType)) {
50728
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(287 /* ExpressionCanBeNull */, node.expression));
50677
50729
  }
50678
50730
  }
50679
50731
  }
@@ -51048,13 +51100,13 @@ var DiagnosticCollector = class _DiagnosticCollector {
51048
51100
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51049
51101
  269 /* Expected0TypeArguments */,
51050
51102
  nodeForDiagnostics,
51051
- [typeParameterCount.toString()]
51103
+ [typeParameterCount]
51052
51104
  ));
51053
51105
  } else {
51054
51106
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51055
51107
  270 /* ExpectedFrom0To1TypeArguments */,
51056
51108
  nodeForDiagnostics,
51057
- [requiredTypeParameterCount.toString(), typeParameterCount.toString()]
51109
+ [requiredTypeParameterCount, typeParameterCount]
51058
51110
  ));
51059
51111
  }
51060
51112
  return false;
@@ -51125,7 +51177,7 @@ var DiagnosticCollector = class _DiagnosticCollector {
51125
51177
  }
51126
51178
  }
51127
51179
  checkAllCodePathsReturnOrResultVariableIsAssigned(node, nodeForDiagnostic, returnType, resultLocalVariable) {
51128
- if (node.block === void 0 || node.block.openBraceToken.isMissing && node.block.closeBraceToken.isMissing || node.block.expressionOrStatementList.kind !== 90 /* StatementList */ || returnType.equals(this._analyzer.originalStandardTypes.none)) {
51180
+ if (node.block === void 0 || node.block.openBraceToken.isMissing && node.block.closeBraceToken.isMissing || node.block.expressionOrStatementList.kind !== 90 /* StatementList */ || returnType.equals(this._analyzer.originalStandardTypes.nullType)) {
51129
51181
  return;
51130
51182
  }
51131
51183
  const controlFlowNodeEndingSubprogram = this._analyzer.getControlFlowGraph(this._sourceFile).controlFlowNodesEndingSubprogram.get(node);
@@ -51159,68 +51211,71 @@ var DiagnosticCollector = class _DiagnosticCollector {
51159
51211
  ));
51160
51212
  reportedSomeDiagnostics ||= true;
51161
51213
  }
51162
- for (const shadowedMember of overriddenAndShadowedMembers.shadowedMembers) {
51163
- const container = shadowedMember.value.getEntity().getContainer();
51164
- if (container.kind === "type-extension") {
51165
- continue;
51166
- }
51167
- switch (shadowedMember.shadowReason) {
51168
- case 0 /* BaseMemberHasDifferentKind */: {
51169
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51170
- 335 /* DeclarationConflictsWithBaseTypeMember0 */,
51171
- nodeForDiagnostic,
51172
- [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51173
- ));
51174
- break;
51214
+ const container = entity.getContainer();
51215
+ if (!(container.kind === "type" && container.typeEntity.typeEntityKind === 4 /* Alias */)) {
51216
+ for (const shadowedMember of overriddenAndShadowedMembers.shadowedMembers) {
51217
+ const container2 = shadowedMember.value.getEntity().getContainer();
51218
+ if (container2.kind === "type-extension") {
51219
+ continue;
51175
51220
  }
51176
- case 1 /* BaseMemberCannotBeOverridden */: {
51177
- if (entity.isOverride()) {
51221
+ switch (shadowedMember.shadowReason) {
51222
+ case 0 /* BaseMemberHasDifferentKind */: {
51178
51223
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51179
- 337 /* DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden */,
51224
+ 335 /* DeclarationConflictsWithBaseTypeMember0 */,
51180
51225
  nodeForDiagnostic,
51181
51226
  [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51182
51227
  ));
51183
- } else {
51228
+ break;
51229
+ }
51230
+ case 1 /* BaseMemberCannotBeOverridden */: {
51231
+ if (entity.isOverride()) {
51232
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51233
+ 337 /* DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden */,
51234
+ nodeForDiagnostic,
51235
+ [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51236
+ ));
51237
+ } else {
51238
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51239
+ 335 /* DeclarationConflictsWithBaseTypeMember0 */,
51240
+ nodeForDiagnostic,
51241
+ [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51242
+ ));
51243
+ }
51244
+ break;
51245
+ }
51246
+ case 2 /* NoOverrideModifier */: {
51184
51247
  this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51185
- 335 /* DeclarationConflictsWithBaseTypeMember0 */,
51248
+ 336 /* DeclarationConflictsWithBaseTypeMember0AddOverrideModifier */,
51186
51249
  nodeForDiagnostic,
51187
51250
  [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51188
51251
  ));
51252
+ break;
51189
51253
  }
51190
- break;
51191
- }
51192
- case 2 /* NoOverrideModifier */: {
51193
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51194
- 336 /* DeclarationConflictsWithBaseTypeMember0AddOverrideModifier */,
51195
- nodeForDiagnostic,
51196
- [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51197
- ));
51198
- break;
51199
- }
51200
- case 4 /* TypeOrReturnTypeMismatch */: {
51201
- const diagnosticCode = entity.kind === 0 /* Variable */ ? 338 /* DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 */ : 339 /* DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 */;
51202
- const type = this._analyzer.overriddenMember.getMemberTypeOrReturnType(shadowedMember.value);
51203
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51204
- diagnosticCode,
51205
- nodeForDiagnostic,
51206
- [
51207
- this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value),
51208
- this._diagnosticArgumentFactory.createDisplayableType(type)
51209
- ]
51210
- ));
51211
- break;
51254
+ case 4 /* TypeOrReturnTypeMismatch */: {
51255
+ const diagnosticCode = entity.kind === 0 /* Variable */ ? 338 /* DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 */ : 339 /* DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 */;
51256
+ const type = this._analyzer.overriddenMember.getMemberTypeOrReturnType(shadowedMember.value);
51257
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51258
+ diagnosticCode,
51259
+ nodeForDiagnostic,
51260
+ [
51261
+ this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value),
51262
+ this._diagnosticArgumentFactory.createDisplayableType(type)
51263
+ ]
51264
+ ));
51265
+ break;
51266
+ }
51267
+ case 3 /* NoOverrideModifierAndTypeOrReturnTypeMismatch */:
51268
+ this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51269
+ 335 /* DeclarationConflictsWithBaseTypeMember0 */,
51270
+ nodeForDiagnostic,
51271
+ [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51272
+ ));
51273
+ break;
51274
+ default:
51275
+ Debug.never(shadowedMember.shadowReason);
51212
51276
  }
51213
- case 3 /* NoOverrideModifierAndTypeOrReturnTypeMismatch */:
51214
- this.addDiagnostic(this._analyzer.createNodeDiagnostic(
51215
- 335 /* DeclarationConflictsWithBaseTypeMember0 */,
51216
- nodeForDiagnostic,
51217
- [this._diagnosticArgumentFactory.createDisplayableTypeMember(shadowedMember.value)]
51218
- ));
51219
- break;
51220
- default:
51221
- Debug.never(shadowedMember.shadowReason);
51277
+ reportedSomeDiagnostics ||= true;
51222
51278
  }
51223
- reportedSomeDiagnostics ||= true;
51224
51279
  }
51225
51280
  if (!reportedSomeDiagnostics) {
51226
51281
  for (const overriddenMember of overriddenAndShadowedMembers.overriddenMembers) {
@@ -51510,11 +51565,11 @@ var LocalizedWellKnownDeclarations = class {
51510
51565
  }
51511
51566
  return this._yesNo;
51512
51567
  }
51513
- get none() {
51514
- if (this._none === void 0) {
51515
- this._none = this.getLocalizedStructuredType(this._analyzer.originalWellKnownDeclarations.none);
51568
+ get nullEntity() {
51569
+ if (this._null === void 0) {
51570
+ this._null = this.getLocalizedStructuredType(this._analyzer.originalWellKnownDeclarations.nullEntity);
51516
51571
  }
51517
- return this._none;
51572
+ return this._null;
51518
51573
  }
51519
51574
  get enumerable() {
51520
51575
  if (this._enumerable === void 0) {
@@ -51915,7 +51970,7 @@ var DefaultConstructorEntity = class {
51915
51970
  const orderedParametersForBaseConstructor = this.createOrderedParametersForBaseConstructor();
51916
51971
  const parametersForOwnFieldsInitialization = this._variablesToInitialize.length > 0 ? [] : void 0;
51917
51972
  const parametersForOwnVariables = this._variablesToInitialize.map((v) => {
51918
- const isOptionalParameter = v.hasInitializer || this._analyzer.isNoneAssignableToType(v.entity.getType());
51973
+ const isOptionalParameter = v.hasInitializer || this._analyzer.isNullAssignableToType(v.entity.getType());
51919
51974
  const parameter = new IntrinsicParameterVariableEntity(
51920
51975
  v.entity.getName(),
51921
51976
  v.entity.getType(),
@@ -52177,7 +52232,7 @@ var PackageFunctionDeclarationEntity = class {
52177
52232
  );
52178
52233
  }
52179
52234
  getReturnType() {
52180
- return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).none);
52235
+ return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).nullType);
52181
52236
  }
52182
52237
  getDefinition() {
52183
52238
  return { kind: 0 /* Source */, node: this._node };
@@ -52238,7 +52293,7 @@ var MethodDeclarationEntity = class {
52238
52293
  );
52239
52294
  }
52240
52295
  getReturnType() {
52241
- return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).none);
52296
+ return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).nullType);
52242
52297
  }
52243
52298
  getDefinition() {
52244
52299
  return { kind: 0 /* Source */, node: this._node };
@@ -52319,7 +52374,7 @@ var NestedFunctionDeclarationEntity = class {
52319
52374
  );
52320
52375
  }
52321
52376
  getReturnType() {
52322
- return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).none);
52377
+ return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).nullType);
52323
52378
  }
52324
52379
  getDefinition() {
52325
52380
  return { kind: 0 /* Source */, node: this._node };
@@ -52531,7 +52586,7 @@ var PackageFunctionTypeDeclarationEntity = class {
52531
52586
  );
52532
52587
  }
52533
52588
  getReturnType() {
52534
- return this._returnType.getOrInsertWith(() => this._node.body.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.body.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).none);
52589
+ return this._returnType.getOrInsertWith(() => this._node.body.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.body.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).nullType);
52535
52590
  }
52536
52591
  getMembers() {
52537
52592
  return this._members.getOrInsertWith(() => {
@@ -52598,7 +52653,7 @@ var AnonymousFunctionTypeDeclarationEntity = class {
52598
52653
  );
52599
52654
  }
52600
52655
  getReturnType() {
52601
- return this._returnType.getOrInsertWith(() => this._node.body.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.body.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).none);
52656
+ return this._returnType.getOrInsertWith(() => this._node.body.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.body.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).nullType);
52602
52657
  }
52603
52658
  getMembers() {
52604
52659
  return this._members.getOrInsertWith(() => {
@@ -53223,7 +53278,7 @@ var OperatorDeclarationEntity = class {
53223
53278
  return this._valueParameters.getOrInsertWith(() => this._node.parameterClause.parameterList.parameters.map((p) => this._analyzer.entity.ofParameterDeclaration(p)).toArray());
53224
53279
  }
53225
53280
  getReturnType() {
53226
- return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).none);
53281
+ return this._returnType.getOrInsertWith(() => this._node.returnTypeAnnotation !== void 0 ? this._analyzer.type.ofTypeSpecifier(this._node.returnTypeAnnotation.typeSpecifier) : this._analyzer.getLocalizedStandardTypes(this.getLocalization().locale).nullType);
53227
53282
  }
53228
53283
  getDefinition() {
53229
53284
  return { kind: 0 /* Source */, node: this._node };
@@ -54469,21 +54524,21 @@ var FunctionType = class {
54469
54524
 
54470
54525
  // source/types/ParameterType.ts
54471
54526
  var ParameterType = class {
54472
- constructor(_analyzer, _entity, isNoneExcluded) {
54527
+ constructor(_analyzer, _entity, isNullExcluded) {
54473
54528
  this._analyzer = _analyzer;
54474
54529
  this._entity = _entity;
54475
- this.isNoneExcluded = isNoneExcluded;
54530
+ this.isNullExcluded = isNullExcluded;
54476
54531
  this.kind = "parameter";
54477
54532
  this._constraint = new Cached();
54478
54533
  }
54479
54534
  /**
54480
- * Ограничение параметра типа с учётом флага {@link isNoneExcluded}.
54535
+ * Ограничение параметра типа с учётом флага {@link isNullExcluded}.
54481
54536
  */
54482
54537
  get constraint() {
54483
54538
  return this._constraint.getOrInsertWith(() => {
54484
54539
  let result = this._entity.getConstraint().cycleFree;
54485
- if (result !== void 0 && this.isNoneExcluded) {
54486
- result = this._analyzer.excludeNoneFromType(result);
54540
+ if (result !== void 0 && this.isNullExcluded) {
54541
+ result = this._analyzer.excludeNullFromType(result);
54487
54542
  }
54488
54543
  return result;
54489
54544
  });
@@ -54501,7 +54556,7 @@ var ParameterType = class {
54501
54556
  return map.get(this._entity.getOriginalEntity()) ?? this;
54502
54557
  }
54503
54558
  equals(other) {
54504
- return this === other || other.kind === "parameter" && this._entity.getOriginalEntity() === other.getEntity().getOriginalEntity() && this.isNoneExcluded === other.isNoneExcluded;
54559
+ return this === other || other.kind === "parameter" && this._entity.getOriginalEntity() === other.getEntity().getOriginalEntity() && this.isNullExcluded === other.isNullExcluded;
54505
54560
  }
54506
54561
  getBaseObjectTypeOrAliasedType() {
54507
54562
  return void 0;
@@ -54579,12 +54634,12 @@ var StandardTypes = class {
54579
54634
  }
54580
54635
  return this._yesNo;
54581
54636
  }
54582
- get none() {
54583
- if (this._none === void 0) {
54584
- const entity = this._wellKnownDeclarations.none;
54585
- this._none = this._analyzer.typeFactory.getStructuredType(entity, Substitutions.empty(this._analyzer));
54637
+ get nullType() {
54638
+ if (this._null === void 0) {
54639
+ const entity = this._wellKnownDeclarations.nullEntity;
54640
+ this._null = this._analyzer.typeFactory.getStructuredType(entity, Substitutions.empty(this._analyzer));
54586
54641
  }
54587
- return this._none;
54642
+ return this._null;
54588
54643
  }
54589
54644
  get measure() {
54590
54645
  if (this._measure === void 0) {
@@ -55656,6 +55711,7 @@ var FunctionEntityDetails = class {
55656
55711
  this.isAbstract = false;
55657
55712
  this.isStatic = false;
55658
55713
  this.originalFunctionEntityKind = 0 /* RegularFunction */;
55714
+ this.isJavaScriptIteratorMethod = false;
55659
55715
  }
55660
55716
  };
55661
55717
  var VariableEntityDetails = class {
@@ -56925,13 +56981,13 @@ var NestedFunctionDeclarationStatement3 = class _NestedFunctionDeclarationStatem
56925
56981
  return new _NestedFunctionDeclarationStatement(this.declaration.clone(), this.sourceLocation);
56926
56982
  }
56927
56983
  };
56928
- var NoneLiteral = class _NoneLiteral {
56984
+ var NullLiteral = class _NullLiteral {
56929
56985
  constructor(sourceLocation) {
56930
56986
  this.sourceLocation = sourceLocation;
56931
- this.kind = 16 /* NoneLiteral */;
56987
+ this.kind = 16 /* NullLiteral */;
56932
56988
  }
56933
56989
  clone() {
56934
- return new _NoneLiteral(this.sourceLocation);
56990
+ return new _NullLiteral(this.sourceLocation);
56935
56991
  }
56936
56992
  };
56937
56993
  var NumericLiteral = class _NumericLiteral {
@@ -57650,6 +57706,36 @@ var YieldStatement3 = class _YieldStatement {
57650
57706
  return new _YieldStatement(this.expression.clone(), this.sourceLocation);
57651
57707
  }
57652
57708
  };
57709
+ var TextTranslationDeclaration3 = class _TextTranslationDeclaration {
57710
+ constructor(key, sourceTextTemplate, translatedText, translationFunction, sourceLocation) {
57711
+ this.key = key;
57712
+ this.sourceTextTemplate = sourceTextTemplate;
57713
+ this.translatedText = translatedText;
57714
+ this.translationFunction = translationFunction;
57715
+ this.sourceLocation = sourceLocation;
57716
+ this.kind = 99 /* TextTranslationDeclaration */;
57717
+ }
57718
+ clone() {
57719
+ return new _TextTranslationDeclaration(
57720
+ this.key,
57721
+ this.sourceTextTemplate?.clone(),
57722
+ this.translatedText,
57723
+ this.translationFunction?.clone(),
57724
+ this.sourceLocation
57725
+ );
57726
+ }
57727
+ };
57728
+ var TextTemplateDeclaration3 = class _TextTemplateDeclaration {
57729
+ constructor(fragments, parameters, sourceLocation) {
57730
+ this.fragments = fragments;
57731
+ this.parameters = parameters;
57732
+ this.sourceLocation = sourceLocation;
57733
+ this.kind = 100 /* TextTemplateDeclaration */;
57734
+ }
57735
+ clone() {
57736
+ return new _TextTemplateDeclaration(this.fragments, this.parameters, this.sourceLocation);
57737
+ }
57738
+ };
57653
57739
 
57654
57740
  // source/emitter/ir/SourceLocation.ts
57655
57741
  var SourceLocation = class {
@@ -57774,8 +57860,8 @@ var TypeUtils2 = class {
57774
57860
  return expression.returnType;
57775
57861
  case 11 /* CharLiteral */:
57776
57862
  return this._ectx.standardTypes.char;
57777
- case 16 /* NoneLiteral */:
57778
- return this._ectx.standardTypes.none;
57863
+ case 16 /* NullLiteral */:
57864
+ return this._ectx.standardTypes.nullType;
57779
57865
  case 30 /* IndexedAccessExpression */:
57780
57866
  return this.getTypeOfComputedAccess(expression.access);
57781
57867
  case 31 /* IntegerLiteral */:
@@ -57785,13 +57871,13 @@ var TypeUtils2 = class {
57785
57871
  case 37 /* NumericLiteral */:
57786
57872
  return this._ectx.standardTypes.number;
57787
57873
  case 39 /* FunctionLiteral */:
57788
- return this._ectx.standardTypes.none;
57874
+ return this._ectx.standardTypes.nullType;
57789
57875
  case 40 /* PrefixUnaryExpression */:
57790
- return this._ectx.standardTypes.none;
57876
+ return this._ectx.standardTypes.nullType;
57791
57877
  case 41 /* MeasureLiteral */:
57792
- return this._ectx.standardTypes.none;
57878
+ return this._ectx.standardTypes.nullType;
57793
57879
  case 42 /* ReferenceExpression */:
57794
- return this._ectx.standardTypes.none;
57880
+ return this._ectx.standardTypes.nullType;
57795
57881
  case 46 /* TextLiteral */:
57796
57882
  return this._ectx.standardTypes.text;
57797
57883
  case 96 /* TextWithEntityName */:
@@ -57803,7 +57889,7 @@ var TypeUtils2 = class {
57803
57889
  case 58 /* ThisExpression */:
57804
57890
  return expression.type;
57805
57891
  case 90 /* BaseExpression */:
57806
- return this._ectx.standardTypes.none;
57892
+ return this._ectx.standardTypes.nullType;
57807
57893
  case 63 /* ArrayLiteral */:
57808
57894
  return this._ectx.standardTypes.array;
57809
57895
  case 64 /* TypeAccessExpression */:
@@ -57826,7 +57912,7 @@ var TypeUtils2 = class {
57826
57912
  if (expression.expressions.length > 0) {
57827
57913
  return this.ofExpression(expression.expressions[expression.expressions.length - 1]);
57828
57914
  }
57829
- return this._ectx.standardTypes.none;
57915
+ return this._ectx.standardTypes.nullType;
57830
57916
  case 75 /* BaseConstructorCallExpression */:
57831
57917
  return this._ectx.standardTypes.func;
57832
57918
  case 91 /* OwnConstructorCallExpression */:
@@ -57844,7 +57930,7 @@ var TypeUtils2 = class {
57844
57930
  case 87 /* JsInstanceOfExpression */:
57845
57931
  return this._ectx.standardTypes.yesNo;
57846
57932
  case 88 /* JsIdentifierExpression */:
57847
- return this._ectx.standardTypes.none;
57933
+ return this._ectx.standardTypes.nullType;
57848
57934
  case 89 /* DereferenceExpression */:
57849
57935
  return this.getTypeOfComputedAccess(expression.access);
57850
57936
  default:
@@ -57869,8 +57955,8 @@ var StandardTypes2 = class {
57869
57955
  this._analyzer = _analyzer;
57870
57956
  this._entityMap = _entityMap;
57871
57957
  }
57872
- get none() {
57873
- return this._none ??= this._entityMap.getType(this._analyzer.originalStandardTypes.none);
57958
+ get nullType() {
57959
+ return this._null ??= this._entityMap.getType(this._analyzer.originalStandardTypes.nullType);
57874
57960
  }
57875
57961
  get yesNo() {
57876
57962
  return this._yesNo ??= this._entityMap.getType(this._analyzer.originalStandardTypes.yesNo);
@@ -58007,6 +58093,9 @@ var EntityMap = class _EntityMap {
58007
58093
  result.details.ifBasicAliasTypeMethodThenRealMethod = this.getFunctionEntity(realBasicMethod);
58008
58094
  }
58009
58095
  }
58096
+ if (result.containingPackage.details.isJavaScriptPackage !== void 0 && this._analyzer.isEnumeratorMethodSignature(entity)) {
58097
+ result.details.isJavaScriptIteratorMethod = true;
58098
+ }
58010
58099
  }
58011
58100
  }
58012
58101
  }
@@ -58153,7 +58242,7 @@ var EntityMap = class _EntityMap {
58153
58242
  } else {
58154
58243
  result = new MappedFunctionEntity(entity, 1 /* GetterOrSetter */);
58155
58244
  this._functions.set(entity, result);
58156
- result.returnType = this.getType(this._analyzer.originalStandardTypes.none);
58245
+ result.returnType = this.getType(this._analyzer.originalStandardTypes.nullType);
58157
58246
  result.containingPackage = this.getContainingPackageAndAccumulateIfMember(entity, result);
58158
58247
  const owningEntity = entity.getOwningEntity();
58159
58248
  switch (owningEntity.kind) {
@@ -58424,12 +58513,19 @@ var EntityMap = class _EntityMap {
58424
58513
  return new UnionOrIntersectionType(type.originalTypes.map((t) => this.getType(t)), false);
58425
58514
  }
58426
58515
  case "unresolved": {
58427
- return this.getType(this._analyzer.originalStandardTypes.none);
58516
+ return this.getType(this._analyzer.originalStandardTypes.nullType);
58428
58517
  }
58429
58518
  default:
58430
58519
  Debug.never(type);
58431
58520
  }
58432
58521
  }
58522
+ enumerateAllPackageEntities() {
58523
+ const result = new Set(this._packages.values());
58524
+ for (const entity of this._linkedPackages.values()) {
58525
+ result.add(entity);
58526
+ }
58527
+ return result;
58528
+ }
58433
58529
  getPackageEntityInternal(entity, link) {
58434
58530
  entity = entity.getOriginalEntity();
58435
58531
  link &&= this._analyzer.linkedEntity.entityCanBeLinked(entity);
@@ -58953,6 +59049,9 @@ var Transformer = class {
58953
59049
  case 27 /* PackageVariableSetterDeclaration */:
58954
59050
  result = this.config.transformPackageVariableSetterDeclaration?.(declaration);
58955
59051
  break;
59052
+ case 99 /* TextTranslationDeclaration */:
59053
+ result = this.config.transformTextTranslationDeclaration?.(declaration);
59054
+ break;
58956
59055
  default:
58957
59056
  Debug.never(declaration);
58958
59057
  }
@@ -58987,6 +59086,9 @@ var Transformer = class {
58987
59086
  case 27 /* PackageVariableSetterDeclaration */:
58988
59087
  this.transformPackageVariableSetterDeclarationChildren(declaration2);
58989
59088
  break;
59089
+ case 99 /* TextTranslationDeclaration */:
59090
+ this.transformTextTranslationDeclarationChildren(declaration2);
59091
+ break;
58990
59092
  default:
58991
59093
  Debug.never(declaration2);
58992
59094
  }
@@ -59592,8 +59694,8 @@ var Transformer = class {
59592
59694
  case 11 /* CharLiteral */:
59593
59695
  result = this.config.transformCharLiteral?.(transformedExpression);
59594
59696
  break;
59595
- case 16 /* NoneLiteral */:
59596
- result = this.config.transformNoneLiteral?.(transformedExpression);
59697
+ case 16 /* NullLiteral */:
59698
+ result = this.config.transformNullLiteral?.(transformedExpression);
59597
59699
  break;
59598
59700
  case 30 /* IndexedAccessExpression */:
59599
59701
  result = this.config.transformIndexedAccessExpression?.(transformedExpression);
@@ -59734,8 +59836,8 @@ var Transformer = class {
59734
59836
  case 11 /* CharLiteral */:
59735
59837
  this.transformCharLiteralChildren(transformedExpression);
59736
59838
  break;
59737
- case 16 /* NoneLiteral */:
59738
- this.transformNoneLiteralChildren(transformedExpression);
59839
+ case 16 /* NullLiteral */:
59840
+ this.transformNullLiteralChildren(transformedExpression);
59739
59841
  break;
59740
59842
  case 30 /* IndexedAccessExpression */:
59741
59843
  this.transformIndexedAccessExpressionChildren(transformedExpression);
@@ -59882,7 +59984,7 @@ var Transformer = class {
59882
59984
  }
59883
59985
  transformCharLiteralChildren(_expression) {
59884
59986
  }
59885
- transformNoneLiteralChildren(_expression) {
59987
+ transformNullLiteralChildren(_expression) {
59886
59988
  }
59887
59989
  transformIndexedAccessExpressionChildren(expression) {
59888
59990
  expression.expression = this.transformExpression(expression.expression);
@@ -60059,6 +60161,14 @@ var Transformer = class {
60059
60161
  }
60060
60162
  return transformedNode;
60061
60163
  }
60164
+ transformTextTranslationDeclarationChildren(declaration) {
60165
+ const saveTransformedDeclaration = this._transformedDeclaration;
60166
+ this._transformedDeclaration = declaration;
60167
+ if (declaration.translationFunction !== void 0) {
60168
+ this.transformFunctionLiteralChildren(declaration.translationFunction);
60169
+ }
60170
+ this._transformedDeclaration = saveTransformedDeclaration;
60171
+ }
60062
60172
  transformStatementsAndAddHoistedLocalVariables(statements) {
60063
60173
  const saveHoistedLocalVariables = this._hoistedLocalVariables;
60064
60174
  this._hoistedLocalVariables = [];
@@ -60212,7 +60322,7 @@ var GeneralLowering = class {
60212
60322
  affectsDeclaration: true,
60213
60323
  affectsDerivedMembers: true
60214
60324
  };
60215
- MiscLowering.resolveComputedNames(state);
60325
+ MiscLowering.resolveComputedNames(this._ectx, state);
60216
60326
  UsagesLowering.lowerAllPackages(loweringContext, state);
60217
60327
  }
60218
60328
  };
@@ -60429,7 +60539,7 @@ var GeneralLoweringContext = class {
60429
60539
  if (a !== void 0) {
60430
60540
  return a;
60431
60541
  }
60432
- return new NoneLiteral(void 0);
60542
+ return new NullLiteral(void 0);
60433
60543
  });
60434
60544
  let isLastArgumentSpreading = isArgumentForLastParameterPassed;
60435
60545
  if (isLastArgumentSpreading) {
@@ -60486,7 +60596,7 @@ var GeneralLoweringContext = class {
60486
60596
  false,
60487
60597
  new OrderedArguments([object, keyExpression, descriptorArgument], false),
60488
60598
  false,
60489
- this.ectx.standardTypes.none,
60599
+ this.ectx.standardTypes.nullType,
60490
60600
  void 0
60491
60601
  );
60492
60602
  }
@@ -60614,7 +60724,7 @@ var GeneralLoweringContext = class {
60614
60724
  const isEmptyExpression = new BinaryExpression3(
60615
60725
  tempVariableAssignment ?? tempVariableAccess,
60616
60726
  5 /* Equals */,
60617
- new NoneLiteral(void 0),
60727
+ new NullLiteral(void 0),
60618
60728
  this.ectx.standardTypes.yesNo,
60619
60729
  void 0,
60620
60730
  void 0
@@ -60622,7 +60732,7 @@ var GeneralLoweringContext = class {
60622
60732
  const memberAccessType = this.ectx.type.ofExpression(substitutionMemberAccess);
60623
60733
  result = new TernaryExpression(
60624
60734
  isEmptyExpression,
60625
- new NoneLiteral(void 0),
60735
+ new NullLiteral(void 0),
60626
60736
  substitutionMemberAccess,
60627
60737
  memberAccessType,
60628
60738
  void 0
@@ -60845,7 +60955,7 @@ var ImplicitImplementationLowering = class {
60845
60955
  1 /* GetterOrSetter */,
60846
60956
  targetFieldEntity.name,
60847
60957
  [parameterEntity],
60848
- this._ctx.ectx.standardTypes.none,
60958
+ this._ctx.ectx.standardTypes.nullType,
60849
60959
  targetFieldEntity.containingPackage
60850
60960
  );
60851
60961
  const variableAccess = FieldAccessExpression.set(
@@ -60875,15 +60985,17 @@ var CompoundDeclarationsAndOperatorsLowering = class {
60875
60985
  lower(state) {
60876
60986
  for (const pkg of state.packages) {
60877
60987
  const memberEntities = new Set(pkg.entity.members);
60878
- pkg.ir.declarations = pkg.ir.declarations.map((d) => {
60988
+ const declarations = [];
60989
+ pkg.ir.declarations.forEach((d) => {
60879
60990
  if (d.kind === 24 /* PackageTypeDeclaration */) {
60880
60991
  this.lowerPackageTypeDeclaration(d);
60881
- return d;
60992
+ declarations.push(d);
60882
60993
  } else if (d.kind === 26 /* PackageVariableGetterDeclaration */) {
60883
60994
  memberEntities.delete(d.variableEntity);
60884
60995
  memberEntities.add(d.entity);
60885
60996
  d.entity.functionEntityKind = 0 /* RegularFunction */;
60886
- return new PackageFunctionDeclaration3(new Modifiers(), [], d.body, d.entity, false, d.sourceLocation);
60997
+ d = new PackageFunctionDeclaration3(new Modifiers(), [], d.body, d.entity, false, d.sourceLocation);
60998
+ declarations.push(d);
60887
60999
  } else if (d.kind === 27 /* PackageVariableSetterDeclaration */) {
60888
61000
  memberEntities.delete(d.variableEntity);
60889
61001
  memberEntities.add(d.entity);
@@ -60894,7 +61006,7 @@ var CompoundDeclarationsAndOperatorsLowering = class {
60894
61006
  false,
60895
61007
  void 0
60896
61008
  )];
60897
- return new PackageFunctionDeclaration3(
61009
+ d = new PackageFunctionDeclaration3(
60898
61010
  new Modifiers(),
60899
61011
  valueParameters,
60900
61012
  d.body,
@@ -60902,10 +61014,13 @@ var CompoundDeclarationsAndOperatorsLowering = class {
60902
61014
  false,
60903
61015
  d.sourceLocation
60904
61016
  );
61017
+ declarations.push(d);
61018
+ } else if (d.kind === 99 /* TextTranslationDeclaration */) {
60905
61019
  } else {
60906
- return d;
61020
+ declarations.push(d);
60907
61021
  }
60908
61022
  });
61023
+ pkg.ir.declarations = declarations;
60909
61024
  pkg.entity.members = Array.from(memberEntities);
60910
61025
  }
60911
61026
  }
@@ -61314,7 +61429,7 @@ var AspectsLowering = class {
61314
61429
  1 /* GetterOrSetter */,
61315
61430
  targetVariableEntity.name,
61316
61431
  [parameterEntity],
61317
- this._ctx.ectx.standardTypes.none,
61432
+ this._ctx.ectx.standardTypes.nullType,
61318
61433
  targetVariableEntity.containingPackage
61319
61434
  );
61320
61435
  const variableAccess = FieldAccessExpression.set(
@@ -61813,7 +61928,7 @@ var AliasTypeAndExtensionMembersAccessLowering = class extends ExecutableCodeLow
61813
61928
  setter,
61814
61929
  receiver,
61815
61930
  args,
61816
- this._ctx.ectx.standardTypes.none
61931
+ this._ctx.ectx.standardTypes.nullType
61817
61932
  );
61818
61933
  return new ExpressionStatement3(callExpression2, left.sourceLocation);
61819
61934
  }
@@ -61844,7 +61959,7 @@ var AliasTypeAndExtensionMembersAccessLowering = class extends ExecutableCodeLow
61844
61959
  setter,
61845
61960
  receiverTempAssignment ?? receiverTempAccess,
61846
61961
  args,
61847
- this._ctx.ectx.standardTypes.none
61962
+ this._ctx.ectx.standardTypes.nullType
61848
61963
  );
61849
61964
  const statement = new ExpressionStatement3(callExpression2, left.sourceLocation);
61850
61965
  return { statement, tempVariables };
@@ -62043,7 +62158,7 @@ var OverloadedConstructorsLowering = class {
62043
62158
  const isEmptyCheck = new BinaryExpression3(
62044
62159
  VariableAccessExpression.get(parameter.entity),
62045
62160
  5 /* Equals */,
62046
- new NoneLiteral(void 0),
62161
+ new NullLiteral(void 0),
62047
62162
  this._ctx.ectx.standardTypes.yesNo,
62048
62163
  void 0,
62049
62164
  void 0
@@ -62239,13 +62354,24 @@ var MiscLowering = class {
62239
62354
  }
62240
62355
  }
62241
62356
  }
62242
- static resolveComputedNames(state) {
62357
+ static resolveComputedNames(ectx, state) {
62358
+ const sourcePackageEntities = /* @__PURE__ */ new Set();
62243
62359
  for (const pkg of state.packages) {
62244
62360
  for (const packageMember of pkg.entity.members) {
62245
62361
  if (packageMember.kind === "type-or-extension") {
62246
62362
  this.resolveComputedNamesOfTypeMembers(packageMember);
62247
62363
  }
62248
62364
  }
62365
+ sourcePackageEntities.add(pkg.entity);
62366
+ }
62367
+ for (const packageEntity of ectx.entityMap.enumerateAllPackageEntities()) {
62368
+ if (!sourcePackageEntities.has(packageEntity)) {
62369
+ for (const packageMember of packageEntity.members) {
62370
+ if (packageMember.kind === "type-or-extension") {
62371
+ this.resolveComputedNamesOfTypeMembers(packageMember);
62372
+ }
62373
+ }
62374
+ }
62249
62375
  }
62250
62376
  }
62251
62377
  static resolveComputedNamesOfTypeMembers(type) {
@@ -62717,15 +62843,15 @@ var FunctionObjectLowering = class _FunctionObjectLowering extends ExecutableCod
62717
62843
  }
62718
62844
  let resultExpression;
62719
62845
  if (this._ctx.isOptionalChaining(node)) {
62720
- const noneCheck = new BinaryExpression3(
62846
+ const nullCheck = new BinaryExpression3(
62721
62847
  receiverTempGetAccess,
62722
62848
  5 /* Equals */,
62723
- new NoneLiteral(void 0),
62849
+ new NullLiteral(void 0),
62724
62850
  this._ctx.ectx.standardTypes.yesNo,
62725
62851
  void 0,
62726
62852
  void 0
62727
62853
  );
62728
- const firstExpression = new NoneLiteral(void 0);
62854
+ const firstExpression = new NullLiteral(void 0);
62729
62855
  const expressions = new Array();
62730
62856
  if (boundMethodTempAssignment !== void 0) {
62731
62857
  expressions.push(boundMethodTempAssignment);
@@ -62736,7 +62862,7 @@ var FunctionObjectLowering = class _FunctionObjectLowering extends ExecutableCod
62736
62862
  expressions.push(boundMethodTempGetAccess);
62737
62863
  const secondExpression = new CommaExpression(expressions, void 0);
62738
62864
  const ternaryExpression = new TernaryExpression(
62739
- noneCheck,
62865
+ nullCheck,
62740
62866
  firstExpression,
62741
62867
  secondExpression,
62742
62868
  this._ctx.ectx.type.ofExpression(node),
@@ -62858,6 +62984,9 @@ var UsagesLowering = class _UsagesLowering extends ExecutableCodeLowering {
62858
62984
  return preserveExpression();
62859
62985
  },
62860
62986
  transformMethodAccessExpression: (node) => {
62987
+ if (node.method.entity.details.isJavaScriptIteratorMethod && node.ifComputedThenKey === void 0) {
62988
+ node.ifComputedThenKey = this._ctx.createKeyForComputedNameWithSymbolKey(this._ctx.iteratorSymbolField);
62989
+ }
62861
62990
  const result = this._functionObjectLowering.tryLowerMethodAccessExpression(node);
62862
62991
  if (result !== void 0) {
62863
62992
  return result;
@@ -63552,7 +63681,7 @@ var ProxiedVariableAccessLowering = class extends ExecutableCodeLowering {
63552
63681
  }).toString();
63553
63682
  result = new TextLiteral(locationText, void 0);
63554
63683
  } else {
63555
- result = new NoneLiteral(void 0);
63684
+ result = new NullLiteral(void 0);
63556
63685
  }
63557
63686
  return result;
63558
63687
  }
@@ -63675,14 +63804,14 @@ var ReferenceExpressionLowering = class extends ExecutableCodeLowering {
63675
63804
  void 0,
63676
63805
  void 0
63677
63806
  );
63678
- return this.createSingleStatementFunctionLiteral([valueParameter], assignment, this._ctx.ectx.standardTypes.none);
63807
+ return this.createSingleStatementFunctionLiteral([valueParameter], assignment, this._ctx.ectx.standardTypes.nullType);
63679
63808
  }
63680
63809
  createSingleStatementFunctionLiteral(parameters, statement, returnType) {
63681
63810
  const functionBody = new BlockStatement([statement], void 0);
63682
63811
  return new FunctionLiteral3(parameters, functionBody, false, returnType, void 0);
63683
63812
  }
63684
63813
  createReference(reader, writer, sourceLocation) {
63685
- const args = new OrderedArguments([reader, writer ?? new NoneLiteral(void 0)], false);
63814
+ const args = new OrderedArguments([reader, writer ?? new NullLiteral(void 0)], false);
63686
63815
  const typeAccess = new TypeAccessExpression(this._ctx.referenceType, void 0);
63687
63816
  return new ConstructorCallExpression(
63688
63817
  this._ctx.referenceConstructor,
@@ -63754,7 +63883,7 @@ var VariableInitializersLowering = class {
63754
63883
  0 /* RegularFunction */,
63755
63884
  EmitPhaseName.ofPackageConstructor(pkg.entity.locale),
63756
63885
  [],
63757
- this._ctx.ectx.standardTypes.none,
63886
+ this._ctx.ectx.standardTypes.nullType,
63758
63887
  pkg.entity
63759
63888
  );
63760
63889
  entity.details.isPackageConstructor = true;
@@ -63857,7 +63986,7 @@ var IsExpressionLowering = class extends ExecutableCodeLowering {
63857
63986
  if (type.equals(this._ctx.ectx.standardTypes.text)) {
63858
63987
  return { expression: this.createTypeOfCheck(expression.expression, "string", expression.sourceLocation) };
63859
63988
  }
63860
- if (type.equals(this._ctx.ectx.standardTypes.none)) {
63989
+ if (type.equals(this._ctx.ectx.standardTypes.nullType)) {
63861
63990
  return { expression: this.createTypeOfCheck(expression.expression, "undefined", expression.sourceLocation) };
63862
63991
  }
63863
63992
  if (type.equals(this._ctx.ectx.standardTypes.func)) {
@@ -63889,7 +64018,7 @@ var IsExpressionLowering = class extends ExecutableCodeLowering {
63889
64018
  return { expression: new BooleanLiteral(false, void 0) };
63890
64019
  }
63891
64020
  canCheckType(type) {
63892
- if (type.equals(this._ctx.ectx.standardTypes.integer) || type.equals(this._ctx.ectx.standardTypes.number) || type.equals(this._ctx.ectx.standardTypes.yesNo) || type.equals(this._ctx.ectx.standardTypes.text) || type.equals(this._ctx.ectx.standardTypes.none) || type.equals(this._ctx.ectx.standardTypes.func)) {
64021
+ if (type.equals(this._ctx.ectx.standardTypes.integer) || type.equals(this._ctx.ectx.standardTypes.number) || type.equals(this._ctx.ectx.standardTypes.yesNo) || type.equals(this._ctx.ectx.standardTypes.text) || type.equals(this._ctx.ectx.standardTypes.nullType) || type.equals(this._ctx.ectx.standardTypes.func)) {
63893
64022
  return true;
63894
64023
  }
63895
64024
  type = this._ctx.ectx.unaliasType(type);
@@ -64078,13 +64207,13 @@ var IrBuilder = class {
64078
64207
  }
64079
64208
  build() {
64080
64209
  Debug.assert(this._typesCreatedFromAnonymousTypes.length === 0);
64081
- const sourceFileMembers = this._analyzer.getSourceFileMembers(this._sourceFile.getSyntaxNode());
64082
- const declarations = this.buildPackageMemberDeclarationList(
64083
- this._sourceFile.getSyntaxNode().declarationList,
64084
- sourceFileMembers
64085
- );
64210
+ const sourceFileNode = this._sourceFile.getSyntaxNode();
64211
+ const sourceFileMembers = this._analyzer.getSourceFileMembers(sourceFileNode);
64212
+ const declarations = this.buildPackageMemberDeclarationList(sourceFileNode.declarationList, sourceFileMembers);
64086
64213
  declarations.push(...this._typesCreatedFromAnonymousTypes);
64087
64214
  this._typesCreatedFromAnonymousTypes.length = 0;
64215
+ const translations = this.buildTextTranslationDeclarationList(sourceFileNode.declarationList);
64216
+ declarations.push(...translations);
64088
64217
  return declarations;
64089
64218
  }
64090
64219
  buildPackageMemberDeclarationList(declarationList, sourceFileMembers) {
@@ -64092,8 +64221,9 @@ var IrBuilder = class {
64092
64221
  const packageConstructorsAndEntryPoints = new Array();
64093
64222
  for (const declaration of flattenPackageMemberDeclarationList(declarationList)) {
64094
64223
  switch (declaration.kind) {
64095
- case 122 /* TranslationsDeclaration */:
64096
- continue;
64224
+ case 122 /* TranslationsDeclaration */: {
64225
+ break;
64226
+ }
64097
64227
  case 20 /* PackageAliasTypeDeclaration */: {
64098
64228
  const irDeclaration = this.buildPackageAliasTypeDeclaration(declaration);
64099
64229
  if (irDeclaration !== void 0) {
@@ -64121,7 +64251,7 @@ var IrBuilder = class {
64121
64251
  break;
64122
64252
  }
64123
64253
  case 26 /* PackageFunctionTypeDeclaration */:
64124
- continue;
64254
+ break;
64125
64255
  case 31 /* PackageStructuredTypeDeclaration */: {
64126
64256
  const irDeclaration = this.buildPackageStructuredTypeDeclaration(declaration);
64127
64257
  if (irDeclaration !== void 0) {
@@ -64186,7 +64316,7 @@ var IrBuilder = class {
64186
64316
  0 /* RegularFunction */,
64187
64317
  EmitPhaseName.ofPackageConstructor(containingPackage.locale),
64188
64318
  [],
64189
- this._entityMap.getType(this._analyzer.originalStandardTypes.none),
64319
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType),
64190
64320
  containingPackage
64191
64321
  );
64192
64322
  entity.details.isAsync = this._analyzer.checkBlockInvokesAsyncMethods(declaration.block);
@@ -64361,7 +64491,7 @@ var IrBuilder = class {
64361
64491
  0 /* RegularFunction */,
64362
64492
  EmitPhaseName.ofPackageRunFunction(containingPackage.locale),
64363
64493
  [],
64364
- this._entityMap.getType(this._analyzer.originalStandardTypes.none),
64494
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType),
64365
64495
  containingPackage
64366
64496
  );
64367
64497
  entity.details.isAsync = this._analyzer.checkBlockInvokesAsyncMethods(declaration.block);
@@ -64671,7 +64801,7 @@ var IrBuilder = class {
64671
64801
  createDefaultStructuredTypeConstructor(entity, info) {
64672
64802
  const valueParameters = entity.getValueParameters().map((p) => {
64673
64803
  const entity2 = this._entityMap.getVariableEntity(p);
64674
- const defaultValue = p.subkind === "parameter" && p.isOptional() ? new NoneLiteral(void 0) : void 0;
64804
+ const defaultValue = p.subkind === "parameter" && p.isOptional() ? new NullLiteral(void 0) : void 0;
64675
64805
  return new ValueParameterDeclaration(entity2, defaultValue, false, void 0);
64676
64806
  });
64677
64807
  const statements = [];
@@ -64714,8 +64844,8 @@ var IrBuilder = class {
64714
64844
  const notEmptyCheck = new BinaryExpression3(
64715
64845
  parameterAccess.clone(),
64716
64846
  6 /* NotEquals */,
64717
- new NoneLiteral(void 0),
64718
- this._entityMap.getType(this._analyzer.originalStandardTypes.none),
64847
+ new NullLiteral(void 0),
64848
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType),
64719
64849
  void 0,
64720
64850
  void 0
64721
64851
  );
@@ -65187,9 +65317,6 @@ var IrBuilder = class {
65187
65317
  case 64 /* BinaryExpression */:
65188
65318
  result = this.buildBinaryExpression(expression);
65189
65319
  break;
65190
- case 66 /* FunctionBlockLiteral */:
65191
- result = this.buildFunctionBlockLiteral(expression);
65192
- break;
65193
65320
  case 68 /* CallExpression */:
65194
65321
  result = this.buildCallExpression(expression);
65195
65322
  break;
@@ -65209,6 +65336,9 @@ var IrBuilder = class {
65209
65336
  case 65 /* FunctionLiteral */:
65210
65337
  result = this.buildFunctionLiteral(expression);
65211
65338
  break;
65339
+ case 66 /* FunctionBlockLiteral */:
65340
+ result = this.buildFunctionBlockLiteral(expression);
65341
+ break;
65212
65342
  case 73 /* ParenthesizedExpression */:
65213
65343
  result = this.buildParenthesizedExpression(expression);
65214
65344
  break;
@@ -65264,7 +65394,7 @@ var IrBuilder = class {
65264
65394
  }
65265
65395
  let targetType = this._analyzer.getTargetTypeOfExpression(expression);
65266
65396
  if (targetType !== void 0) {
65267
- targetType = unaliasType(this._analyzer.excludeNoneFromType(targetType));
65397
+ targetType = unaliasType(this._analyzer.excludeNullFromType(targetType));
65268
65398
  }
65269
65399
  if (targetType !== void 0) {
65270
65400
  const expressionType = this._analyzer.type.ofExpression(expression);
@@ -65444,22 +65574,6 @@ var IrBuilder = class {
65444
65574
  }
65445
65575
  return new BinaryExpression3(left, operatorKind, right, type, operator, this.getSourceLocation(expression));
65446
65576
  }
65447
- buildFunctionBlockLiteral(expression) {
65448
- const valueParameters = this._analyzer.getFunctionBlockLiteralValueParameters(expression).map((p) => new ValueParameterDeclaration(
65449
- this._entityMap.getVariableEntity(p),
65450
- void 0,
65451
- false,
65452
- void 0
65453
- ));
65454
- const body = this.buildFunctionBlockOfFunction(
65455
- expression.block,
65456
- this._analyzer.resultLocalVariableEntity.ofFunctionBlockLiteral(expression)
65457
- );
65458
- const type = this._analyzer.type.ofFunctionBlockLiteral(expression);
65459
- const isAsync = type.isAsync();
65460
- const returnType = this._entityMap.getType(type.getReturnType());
65461
- return new FunctionLiteral3(valueParameters, body, isAsync, returnType, this.getSourceLocation(expression));
65462
- }
65463
65577
  buildCallExpression(expression) {
65464
65578
  const meaning = this._analyzer.getCallExpressionMeaning(expression);
65465
65579
  switch (meaning.kind) {
@@ -65678,6 +65792,22 @@ var IrBuilder = class {
65678
65792
  this.buildAndSaveTypeIfIsAnonymousTypeSpecifier(expression.returnTypeAnnotation?.typeSpecifier);
65679
65793
  return new FunctionLiteral3(valueParameters, body, isAsync, returnType, this.getSourceLocation(expression));
65680
65794
  }
65795
+ buildFunctionBlockLiteral(expression) {
65796
+ const valueParameters = this._analyzer.getFunctionBlockLiteralValueParameters(expression).map((p) => new ValueParameterDeclaration(
65797
+ this._entityMap.getVariableEntity(p),
65798
+ void 0,
65799
+ false,
65800
+ void 0
65801
+ ));
65802
+ const body = this.buildFunctionBlockOfFunction(
65803
+ expression.block,
65804
+ this._analyzer.resultLocalVariableEntity.ofFunctionBlockLiteral(expression)
65805
+ );
65806
+ const type = this._analyzer.type.ofFunctionBlockLiteral(expression);
65807
+ const isAsync = type.isAsync();
65808
+ const returnType = this._entityMap.getType(type.getReturnType());
65809
+ return new FunctionLiteral3(valueParameters, body, isAsync, returnType, this.getSourceLocation(expression));
65810
+ }
65681
65811
  buildParenthesizedExpression(expression) {
65682
65812
  return this.buildExpression(expression.expression);
65683
65813
  }
@@ -65874,7 +66004,7 @@ var IrBuilder = class {
65874
66004
  Debug.assertNotNull(originalSetter);
65875
66005
  const setAccessor = new AccessedFunction5(
65876
66006
  this._entityMap.getSetterEntity(originalSetter),
65877
- this._entityMap.getType(this._analyzer.originalStandardTypes.none)
66007
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType)
65878
66008
  );
65879
66009
  return { kind: 1 /* Set */, setAccessor };
65880
66010
  }
@@ -65885,7 +66015,7 @@ var IrBuilder = class {
65885
66015
  Debug.assertNotNull(originalSetter);
65886
66016
  const getAccessor = new AccessedFunction5(
65887
66017
  this._entityMap.getGetterEntity(originalGetter),
65888
- this._entityMap.getType(this._analyzer.originalStandardTypes.none)
66018
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType)
65889
66019
  );
65890
66020
  const setAccessor = new AccessedFunction5(
65891
66021
  this._entityMap.getSetterEntity(originalSetter),
@@ -65913,7 +66043,7 @@ var IrBuilder = class {
65913
66043
  Debug.assertNotNull(originalSetter);
65914
66044
  const setAccessor = new AccessedFunction5(
65915
66045
  this._entityMap.getSetterEntity(originalSetter),
65916
- this._entityMap.getType(this._analyzer.originalStandardTypes.none)
66046
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType)
65917
66047
  );
65918
66048
  return { kind: 1 /* Set */, setAccessor };
65919
66049
  }
@@ -65924,7 +66054,7 @@ var IrBuilder = class {
65924
66054
  Debug.assertNotNull(originalSetter);
65925
66055
  const getAccessor = new AccessedFunction5(
65926
66056
  this._entityMap.getGetterEntity(originalGetter),
65927
- this._entityMap.getType(this._analyzer.originalStandardTypes.none)
66057
+ this._entityMap.getType(this._analyzer.originalStandardTypes.nullType)
65928
66058
  );
65929
66059
  const setAccessor = new AccessedFunction5(
65930
66060
  this._entityMap.getSetterEntity(originalSetter),
@@ -65946,7 +66076,7 @@ var IrBuilder = class {
65946
66076
  if (expression.secondExpression !== void 0) {
65947
66077
  secondExpression = this.buildExpression(expression.secondExpression);
65948
66078
  } else {
65949
- secondExpression = new NoneLiteral(void 0);
66079
+ secondExpression = new NullLiteral(void 0);
65950
66080
  }
65951
66081
  const type = this._entityMap.getType(this._analyzer.type.ofExpression(expression));
65952
66082
  return new TernaryExpression(
@@ -65992,8 +66122,8 @@ var IrBuilder = class {
65992
66122
  return new BooleanLiteral(true, this.getSourceLocation(expression));
65993
66123
  case 53 /* No */:
65994
66124
  return new BooleanLiteral(false, this.getSourceLocation(expression));
65995
- case 57 /* None */:
65996
- return new NoneLiteral(this.getSourceLocation(expression));
66125
+ case 57 /* Null */:
66126
+ return new NullLiteral(this.getSourceLocation(expression));
65997
66127
  default:
65998
66128
  Debug.never(expression.keyword);
65999
66129
  }
@@ -66323,6 +66453,70 @@ var IrBuilder = class {
66323
66453
  generateLoopLabel() {
66324
66454
  return `lb${this._id++}`;
66325
66455
  }
66456
+ buildTextTranslationDeclarationList(declarationList) {
66457
+ const result = [];
66458
+ for (const group of declarationList.elements) {
66459
+ if (group.kind === 122 /* TranslationsDeclaration */) {
66460
+ for (const element of group.translationList.elements) {
66461
+ if (element.kind === 140 /* TextTranslationDeclaration */) {
66462
+ const declaration = this.buildTextTranslationDeclaration(element);
66463
+ result.push(declaration);
66464
+ }
66465
+ }
66466
+ }
66467
+ }
66468
+ return result;
66469
+ }
66470
+ buildTextTranslationDeclaration(translation) {
66471
+ let sourceText;
66472
+ if (translation.sourceText.kind === 0 /* Token */ && translation.sourceText.tokenKind === 6 /* TextLiteral */) {
66473
+ sourceText = unescapeText(withoutQuotes(translation.sourceText.value));
66474
+ }
66475
+ let translatedText;
66476
+ if (translation.translatedTextOrTranslationFunction.kind === 0 /* Token */ && translation.translatedTextOrTranslationFunction.tokenKind === 6 /* TextLiteral */) {
66477
+ translatedText = unescapeText(withoutQuotes(translation.translatedTextOrTranslationFunction.value));
66478
+ }
66479
+ if (sourceText !== void 0 && translatedText !== void 0) {
66480
+ return new TextTranslationDeclaration3(
66481
+ sourceText,
66482
+ void 0,
66483
+ translatedText,
66484
+ void 0,
66485
+ this.getSourceLocation(translation)
66486
+ );
66487
+ }
66488
+ const textTemplateDeclaration = this.createTextTemplateDeclaration(translation.sourceText);
66489
+ let translationFunction;
66490
+ if (translation.translatedTextOrTranslationFunction.kind === 65 /* FunctionLiteral */) {
66491
+ translationFunction = this.buildFunctionLiteral(translation.translatedTextOrTranslationFunction);
66492
+ } else if (translation.translatedTextOrTranslationFunction.kind === 66 /* FunctionBlockLiteral */) {
66493
+ translationFunction = this.buildFunctionBlockLiteral(translation.translatedTextOrTranslationFunction);
66494
+ } else {
66495
+ }
66496
+ return new TextTranslationDeclaration3(
66497
+ textTemplateDeclaration.fragments.join("_"),
66498
+ textTemplateDeclaration,
66499
+ void 0,
66500
+ translationFunction,
66501
+ this.getSourceLocation(translation)
66502
+ );
66503
+ }
66504
+ createTextTemplateDeclaration(sourceText) {
66505
+ const fragments = [];
66506
+ const parameters = [];
66507
+ if (sourceText.kind === 141 /* TextTemplateDeclaration */) {
66508
+ fragments.push(unescapeText(withoutTemplateQuotes(sourceText.head.value)));
66509
+ sourceText.spanList.spans.forEach((e) => {
66510
+ fragments.push(unescapeText(withoutTemplateQuotes(e.text.value)));
66511
+ const originalEntity = this._analyzer.entity.ofTranslationTextTemplateParameterDeclaration(e.parameter);
66512
+ const entity = this._entityMap.getVariableEntity(originalEntity);
66513
+ parameters.push(entity);
66514
+ });
66515
+ } else {
66516
+ fragments.push(unescapeText(withoutQuotes(sourceText.value)));
66517
+ }
66518
+ return new TextTemplateDeclaration3(fragments, parameters, this.getSourceLocation(sourceText));
66519
+ }
66326
66520
  getSourceLocation(node) {
66327
66521
  const range = node.rangeWithoutTrivia;
66328
66522
  const start = this._sourceFile.getPositionAt(range.start);
@@ -66378,6 +66572,7 @@ var _IrToJs = class _IrToJs {
66378
66572
  return this.convertPackageVariantTypeDeclaration(declaration);
66379
66573
  case 26 /* PackageVariableGetterDeclaration */:
66380
66574
  case 27 /* PackageVariableSetterDeclaration */:
66575
+ case 99 /* TextTranslationDeclaration */:
66381
66576
  throw new EmitterError("Unexpected declaration.", declaration);
66382
66577
  default:
66383
66578
  Debug.never(declaration);
@@ -66711,8 +66906,8 @@ var _IrToJs = class _IrToJs {
66711
66906
  return this.convertCallExpression(expression);
66712
66907
  case 11 /* CharLiteral */:
66713
66908
  return this.convertCharLiteral(expression);
66714
- case 16 /* NoneLiteral */:
66715
- return this.convertNoneLiteral(expression);
66909
+ case 16 /* NullLiteral */:
66910
+ return this.convertNullLiteral(expression);
66716
66911
  case 30 /* IndexedAccessExpression */:
66717
66912
  return this.convertIndexedAccessExpression(expression);
66718
66913
  case 31 /* IntegerLiteral */:
@@ -66823,7 +67018,7 @@ var _IrToJs = class _IrToJs {
66823
67018
  this.addNodeLocation(result, expression);
66824
67019
  return result;
66825
67020
  }
66826
- convertNoneLiteral(expression) {
67021
+ convertNullLiteral(expression) {
66827
67022
  const result = js.identifier("undefined");
66828
67023
  this.addNodeLocation(result, expression);
66829
67024
  return result;
@@ -67557,7 +67752,7 @@ __decorateClass([
67557
67752
  ], _IrToJs.prototype, "convertCharLiteral", 1);
67558
67753
  __decorateClass([
67559
67754
  debugStack()
67560
- ], _IrToJs.prototype, "convertNoneLiteral", 1);
67755
+ ], _IrToJs.prototype, "convertNullLiteral", 1);
67561
67756
  __decorateClass([
67562
67757
  debugStack()
67563
67758
  ], _IrToJs.prototype, "convertIndexedAccessExpression", 1);
@@ -67829,7 +68024,13 @@ var Emitter = class _Emitter {
67829
68024
  }).flatMap((d) => d);
67830
68025
  const irPackage = new Package([], declarationsOfSourceFiles, [], void 0);
67831
68026
  const entity = this._entityMap.getPackageEntity(this._analyzer.entity.ofPackage(pkg));
67832
- entity.members = Array.from(new Set(Array.from(entity.members).concat(irPackage.declarations.map((d) => d.entity))));
68027
+ const entities = [];
68028
+ irPackage.declarations.forEach((d) => {
68029
+ if (d.kind !== 99 /* TextTranslationDeclaration */) {
68030
+ entities.push(d.entity);
68031
+ }
68032
+ });
68033
+ entity.members = Array.from(new Set(Array.from(entity.members).concat(entities)));
67833
68034
  return new EmitterPackage(irPackage, entity);
67834
68035
  }
67835
68036
  enumerateEmittingSourcePackages() {
@@ -67852,7 +68053,7 @@ var Emitter = class _Emitter {
67852
68053
  false,
67853
68054
  new OrderedArguments([], false),
67854
68055
  o.modifiers.isAsync(),
67855
- this._ectx.standardTypes.none,
68056
+ this._ectx.standardTypes.nullType,
67856
68057
  void 0
67857
68058
  );
67858
68059
  return new ExpressionStatement3(expression, void 0);
@@ -67864,7 +68065,7 @@ var Emitter = class _Emitter {
67864
68065
  0 /* RegularFunction */,
67865
68066
  mainFunctionName,
67866
68067
  [],
67867
- this._ectx.standardTypes.none,
68068
+ this._ectx.standardTypes.nullType,
67868
68069
  containingPackage
67869
68070
  );
67870
68071
  entity.details.isAsync = isAsyncFunction;
@@ -67938,6 +68139,7 @@ var Emitter = class _Emitter {
67938
68139
  break;
67939
68140
  case 26 /* PackageVariableGetterDeclaration */:
67940
68141
  case 27 /* PackageVariableSetterDeclaration */:
68142
+ case 99 /* TextTranslationDeclaration */:
67941
68143
  break;
67942
68144
  default:
67943
68145
  Debug.never(declaration);
@@ -68098,6 +68300,7 @@ var PackageMembersSorter = class {
68098
68300
  break;
68099
68301
  case 26 /* PackageVariableGetterDeclaration */:
68100
68302
  case 27 /* PackageVariableSetterDeclaration */:
68303
+ case 99 /* TextTranslationDeclaration */:
68101
68304
  otherDeclarations.push(declaration);
68102
68305
  break;
68103
68306
  default:
@@ -68139,7 +68342,9 @@ var DeclarationRenamer = class _DeclarationRenamer {
68139
68342
  makePackageMemberNamesUnique(pkg, reservedPackageLevelNames) {
68140
68343
  const names = new Set(reservedPackageLevelNames);
68141
68344
  for (const declaration of pkg.declarations) {
68142
- this.makeEntityNameUniqueAndAccumulate(declaration.entity, names);
68345
+ if (declaration.kind !== 99 /* TextTranslationDeclaration */) {
68346
+ this.makeEntityNameUniqueAndAccumulate(declaration.entity, names);
68347
+ }
68143
68348
  }
68144
68349
  this.renameDeclarationsInTopLevelStatements(pkg.leadingStatements, names);
68145
68350
  this.renameDeclarationsInTopLevelStatements(pkg.trailingStatements, names);
@@ -68164,6 +68369,7 @@ var DeclarationRenamer = class _DeclarationRenamer {
68164
68369
  break;
68165
68370
  case 26 /* PackageVariableGetterDeclaration */:
68166
68371
  case 27 /* PackageVariableSetterDeclaration */:
68372
+ case 99 /* TextTranslationDeclaration */:
68167
68373
  break;
68168
68374
  default:
68169
68375
  Debug.never(declaration);
@@ -69125,7 +69331,7 @@ export {
69125
69331
  SourceFileMembers,
69126
69332
  TargetTypeHint,
69127
69333
  semantic_context_exports,
69128
- Analyzer,
69334
+ Analyzer12 as Analyzer,
69129
69335
  TsInteropInputs,
69130
69336
  SyntacticAccessKind,
69131
69337
  ExpressionCanBeUsedInForLoopCheckResult,