@artel/artc 0.6.26020 → 0.6.26022
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +2 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +5 -7
- package/build/{chunk-PPQK5MBM.js → chunk-KCEJTV3Q.js} +235 -101
- package/build/{chunk-BVAJ2ZQZ.js → chunk-PCY52KYM.js} +1 -1
- package/build/{chunk-TRWZ4MA5.js → chunk-WXKN3LZG.js} +2 -2
- package/build/types/analysis/Analyzer.d.ts +9 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +5 -3
- package/build/types/analysis/a/ReservedNameDictionary.d.ts +5 -9
- package/build/types/analysis/a/SourceFileAnalyzer.d.ts +1 -0
- package/build/types/analysis/a/semantic-context/SemanticContextBase.d.ts +2 -2
- package/build/types/diagnostic/DiagnosticCode.d.ts +1 -0
- package/build/types/emitter/Entities.d.ts +1 -1
- package/build/types/entities/Entity.d.ts +1 -1
- package/build/types/entities/interfaces/FunctionEntity.d.ts +0 -5
- package/build/types/entities/interfaces/VariableEntity.d.ts +2 -2
- package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +2 -2
- package/build/types/tree/a/BaseNode.d.ts +1 -2
- package/build/types/tree/a/Nodes.d.ts +2 -4
- package/package.json +2 -2
package/build/Cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CommandLineCompiler
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-WXKN3LZG.js";
|
|
5
|
+
import "./chunk-PCY52KYM.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KCEJTV3Q.js";
|
|
9
9
|
|
|
10
10
|
// source/Cli.ts
|
|
11
11
|
function main() {
|
package/build/api/Api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PCY52KYM.js";
|
|
4
4
|
import {
|
|
5
5
|
AccessKind,
|
|
6
6
|
AccessedFunction_entity,
|
|
@@ -281,7 +281,7 @@ import {
|
|
|
281
281
|
withoutQuotes,
|
|
282
282
|
withoutTemplateQuotes,
|
|
283
283
|
yieldTask
|
|
284
|
-
} from "../chunk-
|
|
284
|
+
} from "../chunk-KCEJTV3Q.js";
|
|
285
285
|
export {
|
|
286
286
|
AccessKind,
|
|
287
287
|
AccessedFunction_entity,
|
package/build/api/ApiNodeJS.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
PhysicalFileSystem,
|
|
7
7
|
PhysicalTypeScriptLibrariesProvider,
|
|
8
8
|
PrintingDiagnosticAcceptor
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-WXKN3LZG.js";
|
|
10
|
+
import "../chunk-PCY52KYM.js";
|
|
11
|
+
import "../chunk-KCEJTV3Q.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
sortModifiers,
|
|
111
111
|
traverseTreeAsync,
|
|
112
112
|
yieldTask
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-KCEJTV3Q.js";
|
|
114
114
|
|
|
115
115
|
// source/services/CustomRequests.ts
|
|
116
116
|
import * as ls from "vscode-languageserver";
|
|
@@ -10848,12 +10848,10 @@ var EntityFinder = class {
|
|
|
10848
10848
|
}
|
|
10849
10849
|
} else if (entity.subkind === "parameter") {
|
|
10850
10850
|
const originalContainingEntity = entity.getContainingEntity();
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
return this.ifEntityWithParametersThenParameters(containingEntity)?.[index];
|
|
10856
|
-
}
|
|
10851
|
+
const index = originalContainingEntity.getParameters().indexOf(entity);
|
|
10852
|
+
const containingEntity = this.findEntity(originalContainingEntity);
|
|
10853
|
+
if (containingEntity !== void 0 && index >= 0) {
|
|
10854
|
+
return this.ifEntityWithParametersThenParameters(containingEntity)?.[index];
|
|
10857
10855
|
}
|
|
10858
10856
|
}
|
|
10859
10857
|
return void 0;
|
|
@@ -70,17 +70,17 @@ var __yieldStar = (value) => {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// source/common/PackageDialect.ts
|
|
73
|
-
var PackageDialect = /* @__PURE__ */ ((
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return
|
|
73
|
+
var PackageDialect = /* @__PURE__ */ ((PackageDialect27) => {
|
|
74
|
+
PackageDialect27[PackageDialect27["ArtelA"] = 0] = "ArtelA";
|
|
75
|
+
PackageDialect27[PackageDialect27["ArtelM"] = 1] = "ArtelM";
|
|
76
|
+
return PackageDialect27;
|
|
77
77
|
})(PackageDialect || {});
|
|
78
78
|
|
|
79
79
|
// source/common/PackageLocale.ts
|
|
80
|
-
var PackageLocale = /* @__PURE__ */ ((
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return
|
|
80
|
+
var PackageLocale = /* @__PURE__ */ ((PackageLocale56) => {
|
|
81
|
+
PackageLocale56[PackageLocale56["En"] = 0] = "En";
|
|
82
|
+
PackageLocale56[PackageLocale56["Ru"] = 1] = "Ru";
|
|
83
|
+
return PackageLocale56;
|
|
84
84
|
})(PackageLocale || {});
|
|
85
85
|
var locales = [
|
|
86
86
|
{ locale: 0 /* En */, code: "en", names: ["english", "\u0430\u043D\u0433\u043B\u0438\u0439\u0441\u043A\u0438\u0439"] },
|
|
@@ -764,7 +764,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
|
764
764
|
};
|
|
765
765
|
|
|
766
766
|
// source/common/Constants.ts
|
|
767
|
-
var ArtelVersion = true ? "0.6.
|
|
767
|
+
var ArtelVersion = true ? "0.6.26022" : "";
|
|
768
768
|
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel", ".\u0430\u0440\u0442\u043C", ".\u0430\u0440\u0442\u0435\u043B\u044C\u043C", ".artm", ".artelm"];
|
|
769
769
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
|
770
770
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
|
@@ -2709,21 +2709,21 @@ var ReservedNameKind = /* @__PURE__ */ ((ReservedNameKind3) => {
|
|
|
2709
2709
|
ReservedNameKind3[ReservedNameKind3["Value"] = 1] = "Value";
|
|
2710
2710
|
return ReservedNameKind3;
|
|
2711
2711
|
})(ReservedNameKind || {});
|
|
2712
|
-
var reservedNamedRu =
|
|
2712
|
+
var reservedNamedRu = {
|
|
2713
2713
|
[0 /* Result */]: new Name("\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442"),
|
|
2714
2714
|
[1 /* Value */]: new Name("\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435")
|
|
2715
|
-
}
|
|
2716
|
-
var reservedNamesEn =
|
|
2715
|
+
};
|
|
2716
|
+
var reservedNamesEn = {
|
|
2717
2717
|
[0 /* Result */]: new Name("result"),
|
|
2718
2718
|
[1 /* Value */]: new Name("value")
|
|
2719
|
-
}
|
|
2720
|
-
var reservedNamesByLocale =
|
|
2721
|
-
[1 /* Ru */]: reservedNamedRu
|
|
2722
|
-
[0 /* En */]: reservedNamesEn
|
|
2723
|
-
}
|
|
2724
|
-
var reservedNameKindByNameKey =
|
|
2719
|
+
};
|
|
2720
|
+
var reservedNamesByLocale = {
|
|
2721
|
+
[1 /* Ru */]: reservedNamedRu,
|
|
2722
|
+
[0 /* En */]: reservedNamesEn
|
|
2723
|
+
};
|
|
2724
|
+
var reservedNameKindByNameKey = Object.fromEntries(
|
|
2725
2725
|
Query.from(Object.entries(reservedNamesByLocale)).map((e) => [e[0], new Map(Object.entries(e[1]).map((e2) => [e2[1], parseInt(e2[0])]))])
|
|
2726
|
-
)
|
|
2726
|
+
);
|
|
2727
2727
|
|
|
2728
2728
|
// source/tree/a/KeywordKind.ts
|
|
2729
2729
|
var KeywordKind = /* @__PURE__ */ ((KeywordKind2) => {
|
|
@@ -3475,7 +3475,7 @@ var LocalizationHelperA = class extends LocalizationHelper {
|
|
|
3475
3475
|
return "";
|
|
3476
3476
|
}
|
|
3477
3477
|
static localizeReservedName(kind, locale) {
|
|
3478
|
-
return reservedNamesByLocale
|
|
3478
|
+
return reservedNamesByLocale[locale][kind].unescapedOriginal;
|
|
3479
3479
|
}
|
|
3480
3480
|
static localizeOperatorKind(kind, locale, dialect) {
|
|
3481
3481
|
if (isOperatorDefinedByToken2(kind)) {
|
|
@@ -4482,7 +4482,7 @@ function isEntityWithTypeParameters(entity) {
|
|
|
4482
4482
|
return false;
|
|
4483
4483
|
}
|
|
4484
4484
|
function isEntityWithParameters(entity) {
|
|
4485
|
-
if (entity.kind === 1 /* Function */ || entity.kind === 2 /* Type */ && entity.typeEntityKind === 0 /* Function */ || entity.kind === 7 /* Constructor */ || entity.kind === 8 /* Destructor */ || entity.kind === 5 /* Indexer */) {
|
|
4485
|
+
if (entity.kind === 1 /* Function */ || entity.kind === 2 /* Type */ && entity.typeEntityKind === 0 /* Function */ || entity.kind === 7 /* Constructor */ || entity.kind === 8 /* Destructor */ || entity.kind === 5 /* Indexer */ || entity.kind === 13 /* TextTranslation */) {
|
|
4486
4486
|
return true;
|
|
4487
4487
|
}
|
|
4488
4488
|
Debug.typeIsAssignableTo();
|
|
@@ -5001,9 +5001,6 @@ var BaseNode = class {
|
|
|
5001
5001
|
get locale() {
|
|
5002
5002
|
return this.sourceFile.locale;
|
|
5003
5003
|
}
|
|
5004
|
-
get dialect() {
|
|
5005
|
-
return this.sourceFile.dialect;
|
|
5006
|
-
}
|
|
5007
5004
|
get rangeWithTrivia() {
|
|
5008
5005
|
if (this.rangeWithTrivia_ === void 0) {
|
|
5009
5006
|
const rangeStart = this.getStartWithTrivia();
|
|
@@ -5684,11 +5681,10 @@ function isAnonymousStructuredTypeDeclaration(node) {
|
|
|
5684
5681
|
|
|
5685
5682
|
// source/tree/a/Nodes.ts
|
|
5686
5683
|
var SourceFile = class extends BaseNode {
|
|
5687
|
-
constructor(packageImportDirectiveList, declarationList, endOfFileToken, locale,
|
|
5684
|
+
constructor(packageImportDirectiveList, declarationList, endOfFileToken, locale, diagnostics, rangeWithTrivia) {
|
|
5688
5685
|
super(rangeWithTrivia);
|
|
5689
5686
|
this.kind = 1 /* SourceFile */;
|
|
5690
5687
|
this.locale_ = locale;
|
|
5691
|
-
this.dialect_ = dialect;
|
|
5692
5688
|
this.diagnostics = diagnostics;
|
|
5693
5689
|
this.children = [packageImportDirectiveList, declarationList, endOfFileToken];
|
|
5694
5690
|
this.setParentForChildren();
|
|
@@ -5698,9 +5694,6 @@ var SourceFile = class extends BaseNode {
|
|
|
5698
5694
|
get locale() {
|
|
5699
5695
|
return this.locale_;
|
|
5700
5696
|
}
|
|
5701
|
-
get dialect() {
|
|
5702
|
-
return this.dialect_;
|
|
5703
|
-
}
|
|
5704
5697
|
get parent() {
|
|
5705
5698
|
return void 0;
|
|
5706
5699
|
}
|
|
@@ -9957,7 +9950,6 @@ var SyntaxFactory = class {
|
|
|
9957
9950
|
declarationList,
|
|
9958
9951
|
endOfFileToken,
|
|
9959
9952
|
DefaultLocale,
|
|
9960
|
-
DefaultDialect,
|
|
9961
9953
|
[],
|
|
9962
9954
|
void 0
|
|
9963
9955
|
);
|
|
@@ -12445,6 +12437,7 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
|
|
|
12445
12437
|
DiagnosticCode2[DiagnosticCode2["OperatorCannotBeAsync"] = 2228] = "OperatorCannotBeAsync";
|
|
12446
12438
|
DiagnosticCode2[DiagnosticCode2["OperatorCannotContainTypeParameterDeclarations"] = 2229] = "OperatorCannotContainTypeParameterDeclarations";
|
|
12447
12439
|
DiagnosticCode2[DiagnosticCode2["TypeNameExpectedAtLastQualifier"] = 2230] = "TypeNameExpectedAtLastQualifier";
|
|
12440
|
+
DiagnosticCode2[DiagnosticCode2["ExpressionsWithTypes0And1CannotBeCompared"] = 2231] = "ExpressionsWithTypes0And1CannotBeCompared";
|
|
12448
12441
|
DiagnosticCode2[DiagnosticCode2["CannotFindTsLibDirectoryBaseSearchPaths0"] = 3e3] = "CannotFindTsLibDirectoryBaseSearchPaths0";
|
|
12449
12442
|
DiagnosticCode2[DiagnosticCode2["SourceFile0IsNotPartOfThePackageAndWontBeLoaded"] = 3001] = "SourceFile0IsNotPartOfThePackageAndWontBeLoaded";
|
|
12450
12443
|
DiagnosticCode2[DiagnosticCode2["ProgramWithoutMainPackageCannotBeCompiled"] = 3002] = "ProgramWithoutMainPackageCannotBeCompiled";
|
|
@@ -12779,6 +12772,7 @@ var englishErrorMessages = {
|
|
|
12779
12772
|
[2228 /* OperatorCannotBeAsync */]: "Operator cannot be async.",
|
|
12780
12773
|
[2229 /* OperatorCannotContainTypeParameterDeclarations */]: "Operator cannot contain type parameter declarations.",
|
|
12781
12774
|
[2230 /* TypeNameExpectedAtLastQualifier */]: "Type name expected.",
|
|
12775
|
+
[2231 /* ExpressionsWithTypes0And1CannotBeCompared */]: "Expressions with types '{0}' and '{1}' cannot be compared.",
|
|
12782
12776
|
[3e3 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "Can not find directory with TypeScript library. Base search paths: {0}.",
|
|
12783
12777
|
[3001 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "Source file '{0}' is not part of the package and won't be loaded.",
|
|
12784
12778
|
[3002 /* ProgramWithoutMainPackageCannotBeCompiled */]: "Program without main package cannot be compiled.",
|
|
@@ -13067,6 +13061,7 @@ var russianErrorMessages = {
|
|
|
13067
13061
|
[2228 /* OperatorCannotBeAsync */]: "\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0430\u0441\u0438\u043D\u0445\u0440\u043E\u043D\u043D\u043E\u0439.",
|
|
13068
13062
|
[2229 /* OperatorCannotContainTypeParameterDeclarations */]: "\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0442\u0438\u043F\u0430.",
|
|
13069
13063
|
[2230 /* TypeNameExpectedAtLastQualifier */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u043C\u044F \u0442\u0438\u043F\u0430.",
|
|
13064
|
+
[2231 /* ExpressionsWithTypes0And1CannotBeCompared */]: "\u041D\u0435\u043B\u044C\u0437\u044F \u0441\u0440\u0430\u0432\u043D\u0438\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0441 \u0442\u0438\u043F\u0430\u043C\u0438 '{0}' \u0438 '{1}'.",
|
|
13070
13065
|
[3e3 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043D\u0430\u0439\u0442\u0438 \u043F\u0430\u043F\u043A\u0443 \u0441\u043E \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u043E\u0439 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u043E\u0439 TypeScript. \u041F\u0443\u0442\u0438, \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043B\u044F\u043B\u0441\u044F \u043F\u043E\u0438\u0441\u043A: {0}.",
|
|
13071
13066
|
[3001 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B '{0}' \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0447\u0430\u0441\u0442\u044C\u044E \u043F\u0430\u043A\u0435\u0442\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D.",
|
|
13072
13067
|
[3002 /* ProgramWithoutMainPackageCannotBeCompiled */]: "\u041F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0430 \u0431\u0435\u0437 \u0433\u043B\u0430\u0432\u043D\u043E\u0433\u043E \u043F\u0430\u043A\u0435\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0430.",
|
|
@@ -13469,7 +13464,6 @@ var TextParser = class {
|
|
|
13469
13464
|
declarationList,
|
|
13470
13465
|
endOfFileToken,
|
|
13471
13466
|
this.locale,
|
|
13472
|
-
this.dialect,
|
|
13473
13467
|
this.diagnostics,
|
|
13474
13468
|
this.rangeFrom(sourceFileStart)
|
|
13475
13469
|
);
|
|
@@ -18926,7 +18920,7 @@ var DisplayServiceA = class extends BaseDisplayService {
|
|
|
18926
18920
|
const asyncKeyword = func.isAsync() ? `${this.displayKeyword(44 /* Async */)} ` : "";
|
|
18927
18921
|
const keyword = this.displayKeyword(16 /* Function */);
|
|
18928
18922
|
const operatorKind = func.getOperatorKind();
|
|
18929
|
-
const name = operatorKind === void 0 ? this.common.displayEntityName(func.getEntity()) : this.displayOperatorKind(operatorKind)
|
|
18923
|
+
const name = operatorKind === void 0 ? this.common.displayEntityName(func.getEntity()) : `'${this.displayOperatorKind(operatorKind)}'`;
|
|
18930
18924
|
const typeParameters = func.getTypeParameterValues().map((t) => this.displayTypeParameterValue(t));
|
|
18931
18925
|
const typeParametersStart = typeParameters.length > 0 ? "<" : "";
|
|
18932
18926
|
const typeParametersEnd = typeParameters.length > 0 ? ">" : "";
|
|
@@ -20284,7 +20278,7 @@ var IntrinsicPackageVariableEntity = class {
|
|
|
20284
20278
|
return this.name;
|
|
20285
20279
|
}
|
|
20286
20280
|
getType() {
|
|
20287
|
-
return
|
|
20281
|
+
return MaybeLazy.getValue(this.type);
|
|
20288
20282
|
}
|
|
20289
20283
|
getDefinition() {
|
|
20290
20284
|
return { kind: 1 /* Intrinsic */ };
|
|
@@ -21509,8 +21503,9 @@ var EntityLocalizationContext = class {
|
|
|
21509
21503
|
const localizedDestructor = this.getLocalizedDestructorEntity(containingEntity);
|
|
21510
21504
|
return localizedDestructor.getParameters().find((p) => p.getOriginalEntity() === entity) ?? entity;
|
|
21511
21505
|
}
|
|
21512
|
-
case
|
|
21506
|
+
case 13 /* TextTranslation */: {
|
|
21513
21507
|
return entity;
|
|
21508
|
+
}
|
|
21514
21509
|
default:
|
|
21515
21510
|
Debug.never(containingEntity);
|
|
21516
21511
|
}
|
|
@@ -26008,7 +26003,7 @@ var FunctionEntityDetails = class {
|
|
|
26008
26003
|
this.isTypeExtensionMemberAddedToPrototype = false;
|
|
26009
26004
|
this.isAbstract = false;
|
|
26010
26005
|
this.isStatic = false;
|
|
26011
|
-
this.originalFunctionEntityKind = 0 /*
|
|
26006
|
+
this.originalFunctionEntityKind = 0 /* Ordinary */;
|
|
26012
26007
|
this.isJavaScriptIteratorMethod = false;
|
|
26013
26008
|
this.hasObjectParameter = false;
|
|
26014
26009
|
}
|
|
@@ -28855,7 +28850,7 @@ var EntityMap = class _EntityMap {
|
|
|
28855
28850
|
}
|
|
28856
28851
|
if (result === void 0) {
|
|
28857
28852
|
const operatorKind = entity.subkind === "method" ? entity.getOperatorKind() : void 0;
|
|
28858
|
-
const functionEntityKind = operatorKind !== void 0 ? 4 /* Operator */ : 0 /*
|
|
28853
|
+
const functionEntityKind = operatorKind !== void 0 ? 4 /* Operator */ : 0 /* Ordinary */;
|
|
28859
28854
|
result = new MappedFunctionEntity(entity, functionEntityKind);
|
|
28860
28855
|
this.functions.set(entity, result);
|
|
28861
28856
|
result.name = this.getEntityNameText(entity);
|
|
@@ -29639,7 +29634,7 @@ var MappedVariableEntity = class {
|
|
|
29639
29634
|
var MappedFunctionEntity = class {
|
|
29640
29635
|
constructor(originalEntity, functionEntityKind) {
|
|
29641
29636
|
this.kind = "method";
|
|
29642
|
-
this.functionEntityKind = 0 /*
|
|
29637
|
+
this.functionEntityKind = 0 /* Ordinary */;
|
|
29643
29638
|
this.name = "";
|
|
29644
29639
|
this.parameters = [];
|
|
29645
29640
|
this.ifTypeMemberThenContainingType = void 0;
|
|
@@ -30341,7 +30336,7 @@ function fieldAccessorEntity(name, parameters, returnType, containingPackage, ov
|
|
|
30341
30336
|
}
|
|
30342
30337
|
function packageFunctionEntity(name, parameters, returnType, containingPackage, isAsync, isPackageConstructor, isPackageEntryPoint, isIntrinsic, hasObjectParameter) {
|
|
30343
30338
|
const result = new IntrinsicFunctionEntity(
|
|
30344
|
-
0 /*
|
|
30339
|
+
0 /* Ordinary */,
|
|
30345
30340
|
name,
|
|
30346
30341
|
parameters,
|
|
30347
30342
|
returnType,
|
|
@@ -32739,7 +32734,7 @@ var ImplicitImplementationLowering = class {
|
|
|
32739
32734
|
));
|
|
32740
32735
|
const computedNameInfo = implementingMethod.details.hasComputedName !== void 0 ? { ...implementingMethod.details.hasComputedName } : void 0;
|
|
32741
32736
|
const methodEntity = typeMemberFunctionEntity(
|
|
32742
|
-
0 /*
|
|
32737
|
+
0 /* Ordinary */,
|
|
32743
32738
|
implementingMethod.name,
|
|
32744
32739
|
parameterEntities,
|
|
32745
32740
|
implementingMethod.returnType,
|
|
@@ -32857,13 +32852,13 @@ var CompoundDeclarationsAndOperatorsLowering = class {
|
|
|
32857
32852
|
} else if (d.kind === 25 /* PackageVariableGetterDeclaration */) {
|
|
32858
32853
|
memberEntities.delete(d.variableEntity);
|
|
32859
32854
|
memberEntities.add(d.entity);
|
|
32860
|
-
d.entity.functionEntityKind = 0 /*
|
|
32855
|
+
d.entity.functionEntityKind = 0 /* Ordinary */;
|
|
32861
32856
|
d = packageFunctionDeclaration(d.entity, [], d.body, false, d.sourceLocation);
|
|
32862
32857
|
return d;
|
|
32863
32858
|
} else if (d.kind === 26 /* PackageVariableSetterDeclaration */) {
|
|
32864
32859
|
memberEntities.delete(d.variableEntity);
|
|
32865
32860
|
memberEntities.add(d.entity);
|
|
32866
|
-
d.entity.functionEntityKind = 0 /*
|
|
32861
|
+
d.entity.functionEntityKind = 0 /* Ordinary */;
|
|
32867
32862
|
const parameters = [parameterDeclaration(d.valueLocalVariableEntity, void 0, false)];
|
|
32868
32863
|
d = packageFunctionDeclaration(d.entity, parameters, d.body, false, d.sourceLocation);
|
|
32869
32864
|
return d;
|
|
@@ -32877,11 +32872,11 @@ var CompoundDeclarationsAndOperatorsLowering = class {
|
|
|
32877
32872
|
lowerPackageTypeDeclaration(declaration) {
|
|
32878
32873
|
declaration.members = declaration.members.map((m) => {
|
|
32879
32874
|
if (m.kind === 52 /* IndexedElementGetterDeclaration */) {
|
|
32880
|
-
m.entity.functionEntityKind = 0 /*
|
|
32875
|
+
m.entity.functionEntityKind = 0 /* Ordinary */;
|
|
32881
32876
|
const method = methodDeclaration(m.entity, m.parameters, m.body, false, m.sourceLocation).withDecorators(m.decorators);
|
|
32882
32877
|
return method;
|
|
32883
32878
|
} else if (m.kind === 53 /* IndexedElementSetterDeclaration */) {
|
|
32884
|
-
m.entity.functionEntityKind = 0 /*
|
|
32879
|
+
m.entity.functionEntityKind = 0 /* Ordinary */;
|
|
32885
32880
|
m.entity.parameters = m.entity.parameters.concat(m.valueLocalVariableEntity);
|
|
32886
32881
|
const parameters = Array.from(m.parameters);
|
|
32887
32882
|
parameters.push(parameterDeclaration(m.valueLocalVariableEntity, void 0, false));
|
|
@@ -32889,11 +32884,11 @@ var CompoundDeclarationsAndOperatorsLowering = class {
|
|
|
32889
32884
|
return method;
|
|
32890
32885
|
}
|
|
32891
32886
|
if (m.kind === 93 /* DereferencedVariableGetterDeclaration */) {
|
|
32892
|
-
m.entity.functionEntityKind = 0 /*
|
|
32887
|
+
m.entity.functionEntityKind = 0 /* Ordinary */;
|
|
32893
32888
|
const method = methodDeclaration(m.entity, [], m.body, false, m.sourceLocation).withDecorators(m.decorators);
|
|
32894
32889
|
return method;
|
|
32895
32890
|
} else if (m.kind === 94 /* DereferencedVariableSetterDeclaration */) {
|
|
32896
|
-
m.entity.functionEntityKind = 0 /*
|
|
32891
|
+
m.entity.functionEntityKind = 0 /* Ordinary */;
|
|
32897
32892
|
m.entity.parameters = [m.valueLocalVariableEntity];
|
|
32898
32893
|
const parameters = [parameterDeclaration(m.valueLocalVariableEntity, void 0, false)];
|
|
32899
32894
|
const method = methodDeclaration(m.entity, parameters, m.body, false, m.sourceLocation).withDecorators(m.decorators);
|
|
@@ -33129,7 +33124,7 @@ var AspectsLowering = class {
|
|
|
33129
33124
|
affectsDerivedMembers: false
|
|
33130
33125
|
};
|
|
33131
33126
|
const functionEntity = typeMemberFunctionEntity(
|
|
33132
|
-
0 /*
|
|
33127
|
+
0 /* Ordinary */,
|
|
33133
33128
|
targetFunctionEntity.name,
|
|
33134
33129
|
parameterEntities,
|
|
33135
33130
|
targetFunctionEntity.returnType,
|
|
@@ -33381,7 +33376,7 @@ var AliasTypeAndExtensionLowering = class {
|
|
|
33381
33376
|
Debug.assertNotNull(containingType);
|
|
33382
33377
|
const targetParameterEntity = this.createTargetParameter(containingType, node.entity.containingPackage);
|
|
33383
33378
|
node.entity.parameters = [targetParameterEntity, ...node.entity.parameters];
|
|
33384
|
-
node.entity.functionEntityKind = 0 /*
|
|
33379
|
+
node.entity.functionEntityKind = 0 /* Ordinary */;
|
|
33385
33380
|
node.entity.details.isStatic = true;
|
|
33386
33381
|
node.entity.details.isAliasTypeOrExtensionMemberThatRequiresLowering = true;
|
|
33387
33382
|
const modifiers = node.modifiers;
|
|
@@ -33406,7 +33401,7 @@ var AliasTypeAndExtensionLowering = class {
|
|
|
33406
33401
|
node.entity.details.isStatic = true;
|
|
33407
33402
|
const targetParameterEntity = this.createTargetParameter(containingType, node.entity.containingPackage);
|
|
33408
33403
|
node.entity.parameters = [targetParameterEntity];
|
|
33409
|
-
node.entity.functionEntityKind = 0 /*
|
|
33404
|
+
node.entity.functionEntityKind = 0 /* Ordinary */;
|
|
33410
33405
|
node.entity.details.isAliasTypeOrExtensionMemberThatRequiresLowering = true;
|
|
33411
33406
|
const parameterDeclarations = [parameterDeclaration(targetParameterEntity, void 0, false)];
|
|
33412
33407
|
this.lowerSubprogramBody(node.body, targetParameterEntity);
|
|
@@ -33419,7 +33414,7 @@ var AliasTypeAndExtensionLowering = class {
|
|
|
33419
33414
|
node.entity.details.isStatic = true;
|
|
33420
33415
|
const targetParameterEntity = this.createTargetParameter(containingType, node.entity.containingPackage);
|
|
33421
33416
|
node.entity.parameters = [targetParameterEntity, node.valueLocalVariableEntity];
|
|
33422
|
-
node.entity.functionEntityKind = 0 /*
|
|
33417
|
+
node.entity.functionEntityKind = 0 /* Ordinary */;
|
|
33423
33418
|
node.entity.details.isAliasTypeOrExtensionMemberThatRequiresLowering = true;
|
|
33424
33419
|
const parameterDeclarations = [
|
|
33425
33420
|
parameterDeclaration(targetParameterEntity, void 0, false),
|
|
@@ -33429,7 +33424,7 @@ var AliasTypeAndExtensionLowering = class {
|
|
|
33429
33424
|
return methodDeclaration(node.entity, parameterDeclarations, node.body, false, node.sourceLocation).withDecorators(node.decorators);
|
|
33430
33425
|
}
|
|
33431
33426
|
lowerConstructorDeclaration(node) {
|
|
33432
|
-
node.entity.functionEntityKind = 0 /*
|
|
33427
|
+
node.entity.functionEntityKind = 0 /* Ordinary */;
|
|
33433
33428
|
node.entity.details.isStatic = true;
|
|
33434
33429
|
this.lowerConstructorBody(node.body, node.entity);
|
|
33435
33430
|
return methodDeclaration(node.entity, node.parameters, node.body, false, node.sourceLocation).withDecorators(node.decorators);
|
|
@@ -33689,7 +33684,7 @@ var StructureConstructorsLowering = class {
|
|
|
33689
33684
|
lowerConstructorDeclaration(node, defaultConstructor) {
|
|
33690
33685
|
const containingType = node.entity.ifTypeMemberThenContainingType;
|
|
33691
33686
|
Debug.assertNotNull(containingType);
|
|
33692
|
-
node.entity.functionEntityKind = 0 /*
|
|
33687
|
+
node.entity.functionEntityKind = 0 /* Ordinary */;
|
|
33693
33688
|
node.entity.details.isStatic = true;
|
|
33694
33689
|
const newThisVariable = localVariableEntity(
|
|
33695
33690
|
EmitPhaseName.ofStructureMethodNewThisVariable(node.entity.containingPackage.locale),
|
|
@@ -40190,7 +40185,7 @@ var TypeMemberRenamer = class {
|
|
|
40190
40185
|
} else if (entity.kind === "method") {
|
|
40191
40186
|
const functionEntityKind = entity.functionEntityKind;
|
|
40192
40187
|
switch (functionEntityKind) {
|
|
40193
|
-
case 0 /*
|
|
40188
|
+
case 0 /* Ordinary */:
|
|
40194
40189
|
case 1 /* GetterOrSetter */:
|
|
40195
40190
|
case 3 /* Destructor */:
|
|
40196
40191
|
case 4 /* Operator */:
|
|
@@ -47780,7 +47775,7 @@ var PackageAliasTypeDeclarationEntity = class {
|
|
|
47780
47775
|
return this.node.locale;
|
|
47781
47776
|
}
|
|
47782
47777
|
getDialect() {
|
|
47783
|
-
return
|
|
47778
|
+
return 0 /* ArtelA */;
|
|
47784
47779
|
}
|
|
47785
47780
|
getOriginalEntity() {
|
|
47786
47781
|
return this;
|
|
@@ -47858,7 +47853,7 @@ var ConstructorDeclarationEntity = class {
|
|
|
47858
47853
|
return this.node.locale;
|
|
47859
47854
|
}
|
|
47860
47855
|
getDialect() {
|
|
47861
|
-
return
|
|
47856
|
+
return 0 /* ArtelA */;
|
|
47862
47857
|
}
|
|
47863
47858
|
getOriginalEntity() {
|
|
47864
47859
|
return this;
|
|
@@ -48836,7 +48831,7 @@ var DereferenceOperatorDeclarationEntity = class {
|
|
|
48836
48831
|
return this.getterOrSetterDeclaration.locale;
|
|
48837
48832
|
}
|
|
48838
48833
|
getDialect() {
|
|
48839
|
-
return
|
|
48834
|
+
return 0 /* ArtelA */;
|
|
48840
48835
|
}
|
|
48841
48836
|
getOriginalEntity() {
|
|
48842
48837
|
return this;
|
|
@@ -48930,7 +48925,7 @@ var DestructorDeclarationEntity = class {
|
|
|
48930
48925
|
return this.node.locale;
|
|
48931
48926
|
}
|
|
48932
48927
|
getDialect() {
|
|
48933
|
-
return
|
|
48928
|
+
return 0 /* ArtelA */;
|
|
48934
48929
|
}
|
|
48935
48930
|
getOriginalEntity() {
|
|
48936
48931
|
return this;
|
|
@@ -50394,7 +50389,7 @@ var PackageFunctionDeclarationEntity = class {
|
|
|
50394
50389
|
return this.node.locale;
|
|
50395
50390
|
}
|
|
50396
50391
|
getDialect() {
|
|
50397
|
-
return
|
|
50392
|
+
return 0 /* ArtelA */;
|
|
50398
50393
|
}
|
|
50399
50394
|
getOriginalEntity() {
|
|
50400
50395
|
return this;
|
|
@@ -50515,7 +50510,7 @@ var MethodDeclarationEntity = class {
|
|
|
50515
50510
|
return this.node.locale;
|
|
50516
50511
|
}
|
|
50517
50512
|
getDialect() {
|
|
50518
|
-
return
|
|
50513
|
+
return 0 /* ArtelA */;
|
|
50519
50514
|
}
|
|
50520
50515
|
getOperatorKind() {
|
|
50521
50516
|
return this.operatorKind;
|
|
@@ -50632,7 +50627,7 @@ var NestedFunctionDeclarationEntity = class {
|
|
|
50632
50627
|
return this.node.locale;
|
|
50633
50628
|
}
|
|
50634
50629
|
getDialect() {
|
|
50635
|
-
return
|
|
50630
|
+
return 0 /* ArtelA */;
|
|
50636
50631
|
}
|
|
50637
50632
|
getOriginalEntity() {
|
|
50638
50633
|
return this;
|
|
@@ -50735,7 +50730,7 @@ var FunctionLiteralEntity = class {
|
|
|
50735
50730
|
return this.node.locale;
|
|
50736
50731
|
}
|
|
50737
50732
|
getDialect() {
|
|
50738
|
-
return
|
|
50733
|
+
return 0 /* ArtelA */;
|
|
50739
50734
|
}
|
|
50740
50735
|
getOriginalEntity() {
|
|
50741
50736
|
return this;
|
|
@@ -50871,7 +50866,7 @@ var FunctionBlockLiteralEntity = class {
|
|
|
50871
50866
|
return this.node.locale;
|
|
50872
50867
|
}
|
|
50873
50868
|
getDialect() {
|
|
50874
|
-
return
|
|
50869
|
+
return 0 /* ArtelA */;
|
|
50875
50870
|
}
|
|
50876
50871
|
getOriginalEntity() {
|
|
50877
50872
|
return this;
|
|
@@ -50898,7 +50893,7 @@ var FunctionBlockLiteralEntity = class {
|
|
|
50898
50893
|
return targetType?.getParameters().map((p) => new IntrinsicParameterEntity(
|
|
50899
50894
|
p.getEntity().getName(),
|
|
50900
50895
|
p.getType(),
|
|
50901
|
-
this
|
|
50896
|
+
this,
|
|
50902
50897
|
p.isOptional(),
|
|
50903
50898
|
p.isVariadic(),
|
|
50904
50899
|
p.isObjectParameter(),
|
|
@@ -50973,7 +50968,7 @@ var AnonymousFunctionTypeDeclarationEntity = class {
|
|
|
50973
50968
|
return this.node.locale;
|
|
50974
50969
|
}
|
|
50975
50970
|
getDialect() {
|
|
50976
|
-
return
|
|
50971
|
+
return 0 /* ArtelA */;
|
|
50977
50972
|
}
|
|
50978
50973
|
getOriginalEntity() {
|
|
50979
50974
|
return this;
|
|
@@ -51023,7 +51018,7 @@ var PackageVariableGetterDeclarationEntity = class {
|
|
|
51023
51018
|
return this.node.locale;
|
|
51024
51019
|
}
|
|
51025
51020
|
getDialect() {
|
|
51026
|
-
return
|
|
51021
|
+
return 0 /* ArtelA */;
|
|
51027
51022
|
}
|
|
51028
51023
|
getOriginalEntity() {
|
|
51029
51024
|
return this;
|
|
@@ -51071,7 +51066,7 @@ var FieldGetterDeclarationEntity = class {
|
|
|
51071
51066
|
return this.node.locale;
|
|
51072
51067
|
}
|
|
51073
51068
|
getDialect() {
|
|
51074
|
-
return
|
|
51069
|
+
return 0 /* ArtelA */;
|
|
51075
51070
|
}
|
|
51076
51071
|
getOriginalEntity() {
|
|
51077
51072
|
return this;
|
|
@@ -51119,7 +51114,7 @@ var IndexedElementGetterDeclarationEntity = class {
|
|
|
51119
51114
|
return this.node.locale;
|
|
51120
51115
|
}
|
|
51121
51116
|
getDialect() {
|
|
51122
|
-
return
|
|
51117
|
+
return 0 /* ArtelA */;
|
|
51123
51118
|
}
|
|
51124
51119
|
getOriginalEntity() {
|
|
51125
51120
|
return this;
|
|
@@ -51167,7 +51162,7 @@ var DereferencedVariableGetterDeclarationEntity = class {
|
|
|
51167
51162
|
return this.node.locale;
|
|
51168
51163
|
}
|
|
51169
51164
|
getDialect() {
|
|
51170
|
-
return
|
|
51165
|
+
return 0 /* ArtelA */;
|
|
51171
51166
|
}
|
|
51172
51167
|
getOriginalEntity() {
|
|
51173
51168
|
return this;
|
|
@@ -51282,7 +51277,7 @@ var IndexerDeclarationEntity = class {
|
|
|
51282
51277
|
return this.getterOrSetterDeclaration.locale;
|
|
51283
51278
|
}
|
|
51284
51279
|
getDialect() {
|
|
51285
|
-
return
|
|
51280
|
+
return 0 /* ArtelA */;
|
|
51286
51281
|
}
|
|
51287
51282
|
getOriginalEntity() {
|
|
51288
51283
|
return this;
|
|
@@ -51342,7 +51337,7 @@ var AliasedPackageImportEntity = class {
|
|
|
51342
51337
|
return this.node.locale;
|
|
51343
51338
|
}
|
|
51344
51339
|
getDialect() {
|
|
51345
|
-
return
|
|
51340
|
+
return 0 /* ArtelA */;
|
|
51346
51341
|
}
|
|
51347
51342
|
getOriginalEntity() {
|
|
51348
51343
|
return this;
|
|
@@ -51372,7 +51367,7 @@ var SourcePackageEntity = class {
|
|
|
51372
51367
|
return this.package_.configuration.locale;
|
|
51373
51368
|
}
|
|
51374
51369
|
getDialect() {
|
|
51375
|
-
return
|
|
51370
|
+
return 0 /* ArtelA */;
|
|
51376
51371
|
}
|
|
51377
51372
|
getMembers() {
|
|
51378
51373
|
return this.members.getOrInsertWith(() => this.createPackageMembers());
|
|
@@ -51706,7 +51701,7 @@ var PackageReducedTypeDeclarationEntity = class {
|
|
|
51706
51701
|
return this.node.locale;
|
|
51707
51702
|
}
|
|
51708
51703
|
getDialect() {
|
|
51709
|
-
return
|
|
51704
|
+
return 0 /* ArtelA */;
|
|
51710
51705
|
}
|
|
51711
51706
|
getOriginalEntity() {
|
|
51712
51707
|
return this;
|
|
@@ -51839,7 +51834,7 @@ var PackageVariableSetterDeclarationEntity = class {
|
|
|
51839
51834
|
return this.node.locale;
|
|
51840
51835
|
}
|
|
51841
51836
|
getDialect() {
|
|
51842
|
-
return
|
|
51837
|
+
return 0 /* ArtelA */;
|
|
51843
51838
|
}
|
|
51844
51839
|
getOriginalEntity() {
|
|
51845
51840
|
return this;
|
|
@@ -51884,7 +51879,7 @@ var FieldSetterDeclarationEntity = class {
|
|
|
51884
51879
|
return this.node.locale;
|
|
51885
51880
|
}
|
|
51886
51881
|
getDialect() {
|
|
51887
|
-
return
|
|
51882
|
+
return 0 /* ArtelA */;
|
|
51888
51883
|
}
|
|
51889
51884
|
getOriginalEntity() {
|
|
51890
51885
|
return this;
|
|
@@ -51929,7 +51924,7 @@ var IndexedElementSetterDeclarationEntity = class {
|
|
|
51929
51924
|
return this.node.locale;
|
|
51930
51925
|
}
|
|
51931
51926
|
getDialect() {
|
|
51932
|
-
return
|
|
51927
|
+
return 0 /* ArtelA */;
|
|
51933
51928
|
}
|
|
51934
51929
|
getOriginalEntity() {
|
|
51935
51930
|
return this;
|
|
@@ -51974,7 +51969,7 @@ var DereferencedVariableSetterDeclarationEntity = class {
|
|
|
51974
51969
|
return this.node.locale;
|
|
51975
51970
|
}
|
|
51976
51971
|
getDialect() {
|
|
51977
|
-
return
|
|
51972
|
+
return 0 /* ArtelA */;
|
|
51978
51973
|
}
|
|
51979
51974
|
getOriginalEntity() {
|
|
51980
51975
|
return this;
|
|
@@ -52046,7 +52041,7 @@ var PackageStructuredTypeDeclarationEntity = class {
|
|
|
52046
52041
|
return this.node.locale;
|
|
52047
52042
|
}
|
|
52048
52043
|
getDialect() {
|
|
52049
|
-
return
|
|
52044
|
+
return 0 /* ArtelA */;
|
|
52050
52045
|
}
|
|
52051
52046
|
getOriginalEntity() {
|
|
52052
52047
|
return this;
|
|
@@ -52113,7 +52108,7 @@ var AnonymousStructuredTypeDeclarationEntity = class {
|
|
|
52113
52108
|
return this.node.locale;
|
|
52114
52109
|
}
|
|
52115
52110
|
getDialect() {
|
|
52116
|
-
return
|
|
52111
|
+
return 0 /* ArtelA */;
|
|
52117
52112
|
}
|
|
52118
52113
|
getOriginalEntity() {
|
|
52119
52114
|
return this;
|
|
@@ -52480,7 +52475,7 @@ var TextTranslationDeclarationEntity = class {
|
|
|
52480
52475
|
return this.node.locale;
|
|
52481
52476
|
}
|
|
52482
52477
|
getDialect() {
|
|
52483
|
-
return
|
|
52478
|
+
return 0 /* ArtelA */;
|
|
52484
52479
|
}
|
|
52485
52480
|
isHidden() {
|
|
52486
52481
|
return void 0;
|
|
@@ -52770,7 +52765,7 @@ var SourceTypeExtensionEntity = class {
|
|
|
52770
52765
|
return this.node.locale;
|
|
52771
52766
|
}
|
|
52772
52767
|
getDialect() {
|
|
52773
|
-
return
|
|
52768
|
+
return 0 /* ArtelA */;
|
|
52774
52769
|
}
|
|
52775
52770
|
getOriginalEntity() {
|
|
52776
52771
|
return this;
|
|
@@ -52940,7 +52935,7 @@ var SourceTypeParameterEntity = class {
|
|
|
52940
52935
|
return this.node.locale;
|
|
52941
52936
|
}
|
|
52942
52937
|
getDialect() {
|
|
52943
|
-
return
|
|
52938
|
+
return 0 /* ArtelA */;
|
|
52944
52939
|
}
|
|
52945
52940
|
getOriginalEntity() {
|
|
52946
52941
|
return this;
|
|
@@ -53061,7 +53056,7 @@ var PackageVariableDeclarationEntity = class {
|
|
|
53061
53056
|
return this.node.locale;
|
|
53062
53057
|
}
|
|
53063
53058
|
getDialect() {
|
|
53064
|
-
return
|
|
53059
|
+
return 0 /* ArtelA */;
|
|
53065
53060
|
}
|
|
53066
53061
|
getOriginalEntity() {
|
|
53067
53062
|
return this;
|
|
@@ -53142,7 +53137,7 @@ var ComputedPackageVariableDeclarationEntity = class {
|
|
|
53142
53137
|
return this.getterOrSetterDeclaration.locale;
|
|
53143
53138
|
}
|
|
53144
53139
|
getDialect() {
|
|
53145
|
-
return
|
|
53140
|
+
return 0 /* ArtelA */;
|
|
53146
53141
|
}
|
|
53147
53142
|
getOriginalEntity() {
|
|
53148
53143
|
return this;
|
|
@@ -53273,7 +53268,7 @@ var FieldDeclarationEntity = class {
|
|
|
53273
53268
|
return this.node.locale;
|
|
53274
53269
|
}
|
|
53275
53270
|
getDialect() {
|
|
53276
|
-
return
|
|
53271
|
+
return 0 /* ArtelA */;
|
|
53277
53272
|
}
|
|
53278
53273
|
getOriginalEntity() {
|
|
53279
53274
|
return this;
|
|
@@ -53412,7 +53407,7 @@ var ComputedFieldDeclarationEntity = class {
|
|
|
53412
53407
|
return this.getterOrSetterDeclaration.locale;
|
|
53413
53408
|
}
|
|
53414
53409
|
getDialect() {
|
|
53415
|
-
return
|
|
53410
|
+
return 0 /* ArtelA */;
|
|
53416
53411
|
}
|
|
53417
53412
|
getOriginalEntity() {
|
|
53418
53413
|
return this;
|
|
@@ -53533,7 +53528,7 @@ var VariantValueDeclarationEntity = class {
|
|
|
53533
53528
|
return this.node.locale;
|
|
53534
53529
|
}
|
|
53535
53530
|
getDialect() {
|
|
53536
|
-
return
|
|
53531
|
+
return 0 /* ArtelA */;
|
|
53537
53532
|
}
|
|
53538
53533
|
getOriginalEntity() {
|
|
53539
53534
|
return this;
|
|
@@ -53600,7 +53595,7 @@ var LocalVariableDeclarationEntity = class {
|
|
|
53600
53595
|
return this.node.locale;
|
|
53601
53596
|
}
|
|
53602
53597
|
getDialect() {
|
|
53603
|
-
return
|
|
53598
|
+
return 0 /* ArtelA */;
|
|
53604
53599
|
}
|
|
53605
53600
|
getOriginalEntity() {
|
|
53606
53601
|
return this;
|
|
@@ -53677,7 +53672,7 @@ var ForStatementElementVariableDeclarationEntity = class {
|
|
|
53677
53672
|
return this.node.locale;
|
|
53678
53673
|
}
|
|
53679
53674
|
getDialect() {
|
|
53680
|
-
return
|
|
53675
|
+
return 0 /* ArtelA */;
|
|
53681
53676
|
}
|
|
53682
53677
|
getOriginalEntity() {
|
|
53683
53678
|
return this;
|
|
@@ -53748,7 +53743,7 @@ var ForStatementIndexVariableDeclarationEntity = class {
|
|
|
53748
53743
|
return this.node.locale;
|
|
53749
53744
|
}
|
|
53750
53745
|
getDialect() {
|
|
53751
|
-
return
|
|
53746
|
+
return 0 /* ArtelA */;
|
|
53752
53747
|
}
|
|
53753
53748
|
getOriginalEntity() {
|
|
53754
53749
|
return this;
|
|
@@ -53806,7 +53801,7 @@ var ErrorVariableDeclarationEntity = class {
|
|
|
53806
53801
|
return this.node.locale;
|
|
53807
53802
|
}
|
|
53808
53803
|
getDialect() {
|
|
53809
|
-
return
|
|
53804
|
+
return 0 /* ArtelA */;
|
|
53810
53805
|
}
|
|
53811
53806
|
getOriginalEntity() {
|
|
53812
53807
|
return this;
|
|
@@ -53900,7 +53895,7 @@ var ParameterDeclarationEntity = class {
|
|
|
53900
53895
|
return this.node.locale;
|
|
53901
53896
|
}
|
|
53902
53897
|
getDialect() {
|
|
53903
|
-
return
|
|
53898
|
+
return 0 /* ArtelA */;
|
|
53904
53899
|
}
|
|
53905
53900
|
isObjectParameter() {
|
|
53906
53901
|
let result = (this.node.name.flags & 2048 /* ObjectParameterName */) !== 0;
|
|
@@ -54011,7 +54006,7 @@ var IndexParameterDeclarationEntity = class {
|
|
|
54011
54006
|
return this.getterOrSetterParameterDeclaration.locale;
|
|
54012
54007
|
}
|
|
54013
54008
|
getDialect() {
|
|
54014
|
-
return
|
|
54009
|
+
return 0 /* ArtelA */;
|
|
54015
54010
|
}
|
|
54016
54011
|
isObjectParameter() {
|
|
54017
54012
|
let result = (this.getterOrSetterParameterDeclaration.name.flags & 2048 /* ObjectParameterName */) !== 0;
|
|
@@ -54113,7 +54108,7 @@ var FunctionLiteralParameterDeclarationEntity = class {
|
|
|
54113
54108
|
return this.node.locale;
|
|
54114
54109
|
}
|
|
54115
54110
|
getDialect() {
|
|
54116
|
-
return
|
|
54111
|
+
return 0 /* ArtelA */;
|
|
54117
54112
|
}
|
|
54118
54113
|
getOriginalEntity() {
|
|
54119
54114
|
return this;
|
|
@@ -54137,7 +54132,7 @@ var TranslationTextTemplateParameterEntity = class {
|
|
|
54137
54132
|
this.name = analyzer.createNameFromIdentifier(node.name);
|
|
54138
54133
|
}
|
|
54139
54134
|
getContainingEntity() {
|
|
54140
|
-
return
|
|
54135
|
+
return this.analyzer.entity.ofTextTranslationDeclaration(this.node.parent.parent.parent);
|
|
54141
54136
|
}
|
|
54142
54137
|
getName() {
|
|
54143
54138
|
return this.name;
|
|
@@ -54190,7 +54185,7 @@ var TranslationTextTemplateParameterEntity = class {
|
|
|
54190
54185
|
return this.node.locale;
|
|
54191
54186
|
}
|
|
54192
54187
|
getDialect() {
|
|
54193
|
-
return
|
|
54188
|
+
return 0 /* ArtelA */;
|
|
54194
54189
|
}
|
|
54195
54190
|
isObjectParameter() {
|
|
54196
54191
|
return false;
|
|
@@ -54283,7 +54278,7 @@ var PackageVariantDeclarationEntity = class {
|
|
|
54283
54278
|
return this.node.locale;
|
|
54284
54279
|
}
|
|
54285
54280
|
getDialect() {
|
|
54286
|
-
return
|
|
54281
|
+
return 0 /* ArtelA */;
|
|
54287
54282
|
}
|
|
54288
54283
|
getOriginalEntity() {
|
|
54289
54284
|
return this;
|
|
@@ -58519,10 +58514,7 @@ var SourceFileAnalyzer = class {
|
|
|
58519
58514
|
break;
|
|
58520
58515
|
}
|
|
58521
58516
|
case 61 /* BinaryExpression */: {
|
|
58522
|
-
|
|
58523
|
-
if (classificationResult.kind === "user-definable") {
|
|
58524
|
-
this.analyzer.resolveBinaryExpressionUserDefinableOperator(node, classificationResult.operatorKind);
|
|
58525
|
-
}
|
|
58517
|
+
this.checkBinaryExpression(node);
|
|
58526
58518
|
break;
|
|
58527
58519
|
}
|
|
58528
58520
|
case 90 /* AssignmentStatement */: {
|
|
@@ -58772,6 +58764,34 @@ var SourceFileAnalyzer = class {
|
|
|
58772
58764
|
}
|
|
58773
58765
|
return void 0;
|
|
58774
58766
|
}
|
|
58767
|
+
checkBinaryExpression(node) {
|
|
58768
|
+
const classificationResult = this.analyzer.classifyBinaryExpressionOperator(node.operator);
|
|
58769
|
+
switch (classificationResult.kind) {
|
|
58770
|
+
case "user-definable":
|
|
58771
|
+
this.analyzer.resolveBinaryExpressionUserDefinableOperator(node, classificationResult.operatorKind);
|
|
58772
|
+
break;
|
|
58773
|
+
case "equals":
|
|
58774
|
+
case "not-equals": {
|
|
58775
|
+
const leftType = this.analyzer.type.ofExpression(node.left);
|
|
58776
|
+
const rightType = this.analyzer.type.ofExpression(node.right);
|
|
58777
|
+
if (!this.analyzer.typeUtils.areTypesComparable(leftType, rightType)) {
|
|
58778
|
+
this.createAndAddDiagnostic(
|
|
58779
|
+
2231 /* ExpressionsWithTypes0And1CannotBeCompared */,
|
|
58780
|
+
node.operator,
|
|
58781
|
+
[
|
|
58782
|
+
this.diagnosticArgumentFactory.createDisplayableType(leftType),
|
|
58783
|
+
this.diagnosticArgumentFactory.createDisplayableType(rightType)
|
|
58784
|
+
]
|
|
58785
|
+
);
|
|
58786
|
+
}
|
|
58787
|
+
break;
|
|
58788
|
+
}
|
|
58789
|
+
case "question-question":
|
|
58790
|
+
break;
|
|
58791
|
+
default:
|
|
58792
|
+
Debug.never(classificationResult);
|
|
58793
|
+
}
|
|
58794
|
+
}
|
|
58775
58795
|
checkPackageVariantDeclaration(node) {
|
|
58776
58796
|
if (node.typeParameterClause !== void 0) {
|
|
58777
58797
|
this.analyzer.semanticContext.ofTypeDeclarationTypeParameters(node, node.typeParameterClause).validateNameConflicts(this.diagnosticAcceptor);
|
|
@@ -61763,6 +61783,9 @@ var Analyzer = class {
|
|
|
61763
61783
|
get typeAssignabilityCheck() {
|
|
61764
61784
|
return this.state.typeAssignabilityCheck;
|
|
61765
61785
|
}
|
|
61786
|
+
get typeComparabilityCheck() {
|
|
61787
|
+
return this.state.typeComparabilityCheck;
|
|
61788
|
+
}
|
|
61766
61789
|
get overriddenMember() {
|
|
61767
61790
|
return this.state.overriddenMember;
|
|
61768
61791
|
}
|
|
@@ -61864,6 +61887,9 @@ var Analyzer = class {
|
|
|
61864
61887
|
getTypeAssignabilityFlags(source, target) {
|
|
61865
61888
|
return this.typeAssignabilityCheck.getAssignabilityFlags(source, target);
|
|
61866
61889
|
}
|
|
61890
|
+
isTypeComparableTo(source, target) {
|
|
61891
|
+
return this.typeComparabilityCheck.isTypeComparableTo(source, target);
|
|
61892
|
+
}
|
|
61867
61893
|
getUnambiguousTargetFunctionType(targetType) {
|
|
61868
61894
|
if (targetType !== void 0) {
|
|
61869
61895
|
const unaliasedType = targetType.unalias();
|
|
@@ -62924,6 +62950,7 @@ var CommonAnalyzerState = class {
|
|
|
62924
62950
|
initialize(analyzer) {
|
|
62925
62951
|
this.typeFactory = new TypeFactory(analyzer);
|
|
62926
62952
|
this.typeAssignabilityCheck = new TypeAssignabilityCheck(analyzer);
|
|
62953
|
+
this.typeComparabilityCheck = new TypeComparabilityCheck(analyzer);
|
|
62927
62954
|
this.implementation = new ImplementationEntity(analyzer);
|
|
62928
62955
|
this.typeUtils = new TypeUtils2(analyzer);
|
|
62929
62956
|
this.signatureComparer = new SignatureComparer(analyzer);
|
|
@@ -64005,6 +64032,98 @@ var TypeAssignabilityCheck = class {
|
|
|
64005
64032
|
return result;
|
|
64006
64033
|
}
|
|
64007
64034
|
};
|
|
64035
|
+
var TypeComparabilityCheck = class {
|
|
64036
|
+
constructor(analyzer) {
|
|
64037
|
+
this.analyzer = analyzer;
|
|
64038
|
+
}
|
|
64039
|
+
isTypeComparableTo(source, target) {
|
|
64040
|
+
source = source.unaliasAndGetReductionSource();
|
|
64041
|
+
target = target.unaliasAndGetReductionSource();
|
|
64042
|
+
if (source.kind === "unresolved" || target.kind === "unresolved") {
|
|
64043
|
+
return true;
|
|
64044
|
+
}
|
|
64045
|
+
if (source.isNullType) {
|
|
64046
|
+
return this.analyzer.canTypeBeNull(target);
|
|
64047
|
+
} else if (target.isNullType) {
|
|
64048
|
+
return this.analyzer.canTypeBeNull(source);
|
|
64049
|
+
}
|
|
64050
|
+
source = this.analyzer.excludeNullFromType(source).unaliasAndGetReductionSource();
|
|
64051
|
+
target = this.analyzer.excludeNullFromType(target).unaliasAndGetReductionSource();
|
|
64052
|
+
const objectType = this.analyzer.originalStandardTypes.object;
|
|
64053
|
+
if (source.equals(objectType) || target.equals(objectType)) {
|
|
64054
|
+
return true;
|
|
64055
|
+
}
|
|
64056
|
+
if (source.equals(target)) {
|
|
64057
|
+
return true;
|
|
64058
|
+
}
|
|
64059
|
+
if (source.kind === "parameter" && target.kind === "parameter") {
|
|
64060
|
+
const sourceConstraint = source.constraint;
|
|
64061
|
+
const targetConstraint = target.constraint;
|
|
64062
|
+
if (sourceConstraint !== void 0 && targetConstraint !== void 0) {
|
|
64063
|
+
const result = this.isTypeComparableTo(sourceConstraint, targetConstraint);
|
|
64064
|
+
if (result) {
|
|
64065
|
+
return true;
|
|
64066
|
+
}
|
|
64067
|
+
}
|
|
64068
|
+
return source.getEntity().getOriginalEntity() === target.getEntity().getOriginalEntity();
|
|
64069
|
+
} else if (source.kind === "parameter") {
|
|
64070
|
+
const sourceConstraint = source.constraint;
|
|
64071
|
+
if (sourceConstraint !== void 0) {
|
|
64072
|
+
const result = this.isTypeComparableTo(sourceConstraint, target);
|
|
64073
|
+
if (result) {
|
|
64074
|
+
return true;
|
|
64075
|
+
}
|
|
64076
|
+
}
|
|
64077
|
+
} else if (target.kind === "parameter") {
|
|
64078
|
+
const targetConstraint = target.constraint;
|
|
64079
|
+
if (targetConstraint !== void 0) {
|
|
64080
|
+
const result = this.isTypeComparableTo(source, targetConstraint);
|
|
64081
|
+
if (result) {
|
|
64082
|
+
return true;
|
|
64083
|
+
}
|
|
64084
|
+
}
|
|
64085
|
+
}
|
|
64086
|
+
if (source.kind === "union") {
|
|
64087
|
+
const sourceConstituentTypes = source.unaliasedFlattenedTypes;
|
|
64088
|
+
return sourceConstituentTypes.some((s) => this.isTypeComparableTo(s, target));
|
|
64089
|
+
}
|
|
64090
|
+
if (target.kind === "union") {
|
|
64091
|
+
const targetConstituentTypes = target.unaliasedFlattenedTypes;
|
|
64092
|
+
return targetConstituentTypes.some((t) => this.isTypeComparableTo(source, t));
|
|
64093
|
+
}
|
|
64094
|
+
if (source.kind === "intersection") {
|
|
64095
|
+
const sourceConstituentTypes = source.unaliasedFlattenedTypes;
|
|
64096
|
+
return sourceConstituentTypes.some((s) => this.isTypeComparableTo(s, target));
|
|
64097
|
+
}
|
|
64098
|
+
if (target.kind === "intersection") {
|
|
64099
|
+
const targetConstituentTypes = target.unaliasedFlattenedTypes;
|
|
64100
|
+
return targetConstituentTypes.some((t) => this.isTypeComparableTo(source, t));
|
|
64101
|
+
}
|
|
64102
|
+
if (source.kind === "variant") {
|
|
64103
|
+
const result = this.isTypeComparableTo(source.getUnderlyingType(), target);
|
|
64104
|
+
if (result) {
|
|
64105
|
+
return true;
|
|
64106
|
+
}
|
|
64107
|
+
} else if (target.kind === "variant") {
|
|
64108
|
+
const result = this.isTypeComparableTo(source, target.getUnderlyingType());
|
|
64109
|
+
if (result) {
|
|
64110
|
+
return true;
|
|
64111
|
+
}
|
|
64112
|
+
}
|
|
64113
|
+
const integerType = this.analyzer.originalStandardTypes.integer;
|
|
64114
|
+
const numberType = this.analyzer.originalStandardTypes.number;
|
|
64115
|
+
if (source.equals(integerType) && target.equals(numberType) || source.equals(numberType) && target.equals(integerType)) {
|
|
64116
|
+
return true;
|
|
64117
|
+
}
|
|
64118
|
+
if (source.kind === "function" && target.kind === "function") {
|
|
64119
|
+
return source.equals(target);
|
|
64120
|
+
}
|
|
64121
|
+
if (source.kind === "structured" && target.kind === "structured") {
|
|
64122
|
+
return this.analyzer.typeUtils.isTypeDerivedFromOrEqualsTo(source, target) || this.analyzer.typeUtils.isTypeDerivedFromOrEqualsTo(target, source);
|
|
64123
|
+
}
|
|
64124
|
+
return false;
|
|
64125
|
+
}
|
|
64126
|
+
};
|
|
64008
64127
|
var TypeUtils2 = class {
|
|
64009
64128
|
constructor(analyzer) {
|
|
64010
64129
|
this.analyzer = analyzer;
|
|
@@ -64294,6 +64413,9 @@ var TypeUtils2 = class {
|
|
|
64294
64413
|
}
|
|
64295
64414
|
return Query.any(this.allAspectsOfType(type), (a) => a.getEntity().getOriginalEntity() === aspectEntity.getOriginalEntity());
|
|
64296
64415
|
}
|
|
64416
|
+
areTypesComparable(type1, type2) {
|
|
64417
|
+
return type1.isNullType || type2.isNullType || this.analyzer.isTypeComparableTo(type1, type2);
|
|
64418
|
+
}
|
|
64297
64419
|
collectBaseAndAliasedTypesRecursively(type, result) {
|
|
64298
64420
|
switch (type.kind) {
|
|
64299
64421
|
case "function": {
|
|
@@ -71725,6 +71847,12 @@ var UserDefinableBinaryOperatorResolver = class {
|
|
|
71725
71847
|
const semanticContext = this.analyzer.semanticContext.containing(this.left);
|
|
71726
71848
|
const typeMemberLookupContext = semanticContext.getTypeMemberLookupContext();
|
|
71727
71849
|
const nonNullableLeftType = this.analyzer.excludeNullFromType(leftType);
|
|
71850
|
+
if (!nonNullableLeftType.equals(leftType)) {
|
|
71851
|
+
this.diagnostics?.addDiagnostic(this.analyzer.createDiagnostic(
|
|
71852
|
+
2105 /* ExpressionCanBeNull */,
|
|
71853
|
+
this.left
|
|
71854
|
+
));
|
|
71855
|
+
}
|
|
71728
71856
|
const leftTypeMemberLookup = TypeMemberLookup.ofType(this.analyzer, nonNullableLeftType);
|
|
71729
71857
|
const operators = leftTypeMemberLookup.getNamedMembersByName(name, typeMemberLookupContext, 1 /* OnlyInstanceMembers */).filter((o) => o.kind === "method" && o.getParameters().length === 1);
|
|
71730
71858
|
if (operators.length > 0) {
|
|
@@ -71860,6 +71988,12 @@ var UserDefinableUnaryOperatorResolver = class {
|
|
|
71860
71988
|
const semanticContext = this.analyzer.semanticContext.containing(this.node.operand);
|
|
71861
71989
|
const typeMemberLookupContext = semanticContext.getTypeMemberLookupContext();
|
|
71862
71990
|
const nonNullableOperandType = this.analyzer.excludeNullFromType(operandType);
|
|
71991
|
+
if (!nonNullableOperandType.equals(operandType)) {
|
|
71992
|
+
this.diagnostics?.addDiagnostic(this.analyzer.createDiagnostic(
|
|
71993
|
+
2105 /* ExpressionCanBeNull */,
|
|
71994
|
+
this.node.operand
|
|
71995
|
+
));
|
|
71996
|
+
}
|
|
71863
71997
|
const typeMemberLookup = TypeMemberLookup.ofType(this.analyzer, nonNullableOperandType);
|
|
71864
71998
|
const operators = typeMemberLookup.getNamedMembersByName(name, typeMemberLookupContext, 1 /* OnlyInstanceMembers */).filter((o) => o.kind === "method" && o.getParameters().length === 0);
|
|
71865
71999
|
if (operators.length === 1) {
|
|
@@ -72406,10 +72540,10 @@ var Analyzer3 = class extends Analyzer {
|
|
|
72406
72540
|
return result;
|
|
72407
72541
|
}
|
|
72408
72542
|
checkIdentifierNameIsReserved(name, locale) {
|
|
72409
|
-
return reservedNameKindByNameKey
|
|
72543
|
+
return reservedNameKindByNameKey[locale].get(name.key);
|
|
72410
72544
|
}
|
|
72411
72545
|
getReservedName(reservedNameKind, locale) {
|
|
72412
|
-
return reservedNamesByLocale
|
|
72546
|
+
return reservedNamesByLocale[locale][reservedNameKind];
|
|
72413
72547
|
}
|
|
72414
72548
|
createNameFromIdentifier(node) {
|
|
72415
72549
|
let result = this.nameByIdentifierText.get(node.value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PCY52KYM.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__async,
|
|
16
16
|
performanceMeasurementStageNames,
|
|
17
17
|
performanceMeasurementStages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KCEJTV3Q.js";
|
|
19
19
|
|
|
20
20
|
// source/executor/FileSystemUri.ts
|
|
21
21
|
import { platform } from "os";
|
|
@@ -56,6 +56,7 @@ export declare abstract class Analyzer {
|
|
|
56
56
|
get signatureComparer(): SignatureComparer;
|
|
57
57
|
get conflictsCheck(): ConflictsCheck;
|
|
58
58
|
get typeAssignabilityCheck(): TypeAssignabilityCheck;
|
|
59
|
+
get typeComparabilityCheck(): TypeComparabilityCheck;
|
|
59
60
|
get overriddenMember(): OverriddenMember;
|
|
60
61
|
get tsInterop(): TsInteropContext;
|
|
61
62
|
constructor(state: CommonAnalyzerState);
|
|
@@ -69,6 +70,7 @@ export declare abstract class Analyzer {
|
|
|
69
70
|
ifTypeReferenceThenReferencedType(type: types.Type): types.Type | undefined;
|
|
70
71
|
isTypeAssignableTo(source: types.Type, target: types.Type): boolean;
|
|
71
72
|
getTypeAssignabilityFlags(source: types.Type, target: types.Type): TypeAssignabilityFlags;
|
|
73
|
+
isTypeComparableTo(source: types.Type, target: types.Type): boolean;
|
|
72
74
|
getUnambiguousTargetFunctionType(targetType: types.Type | undefined): types.FunctionType | undefined;
|
|
73
75
|
getUnambiguousTargetArrayType(targetType: types.Type | undefined): types.Type | undefined;
|
|
74
76
|
getUnambiguousTargetReferenceType(targetType: types.Type | undefined): types.Type | undefined;
|
|
@@ -179,6 +181,7 @@ export declare class CommonAnalyzerState {
|
|
|
179
181
|
signatureComparer: SignatureComparer;
|
|
180
182
|
conflictsCheck: ConflictsCheck;
|
|
181
183
|
typeAssignabilityCheck: TypeAssignabilityCheck;
|
|
184
|
+
typeComparabilityCheck: TypeComparabilityCheck;
|
|
182
185
|
overriddenMember: OverriddenMember;
|
|
183
186
|
readonly tsInteropInputs: TsInteropInputs;
|
|
184
187
|
readonly tsInterop: Cached<TsInteropContext>;
|
|
@@ -286,6 +289,11 @@ declare class TypeAssignabilityCheck {
|
|
|
286
289
|
private areNewFlagsBetter;
|
|
287
290
|
private getFlagCount;
|
|
288
291
|
}
|
|
292
|
+
declare class TypeComparabilityCheck {
|
|
293
|
+
private readonly analyzer;
|
|
294
|
+
constructor(analyzer: Analyzer);
|
|
295
|
+
isTypeComparableTo(source: types.Type, target: types.Type): boolean;
|
|
296
|
+
}
|
|
289
297
|
declare class TypeUtils {
|
|
290
298
|
private readonly analyzer;
|
|
291
299
|
constructor(analyzer: Analyzer);
|
|
@@ -302,6 +310,7 @@ declare class TypeUtils {
|
|
|
302
310
|
compareSubstitutionsWithSimpleTypeComparer(substitutions1: types.Substitutions, substitutions2: types.Substitutions, comparer: SimpleTypeComparer): boolean;
|
|
303
311
|
allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
|
|
304
312
|
checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
|
|
313
|
+
areTypesComparable(type1: types.Type, type2: types.Type): boolean;
|
|
305
314
|
private collectBaseAndAliasedTypesRecursively;
|
|
306
315
|
private getBaseTypesForCommonTypesSearch;
|
|
307
316
|
private addTypeAndCollectAllBaseTypes;
|
|
@@ -3,7 +3,6 @@ import { PackageEntity, TypeEntity, TypeExtensionEntity, TypeOrExtensionEntity }
|
|
|
3
3
|
import { SourceFile } from '../project/SourceFile.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
5
5
|
import { Analyzer } from './Analyzer.js';
|
|
6
|
-
import { SemanticContext } from './a/semantic-context/SemanticContext.js';
|
|
7
6
|
export declare class TypeMemberLookup {
|
|
8
7
|
private readonly analyzer;
|
|
9
8
|
private readonly typeOrExtension;
|
|
@@ -39,10 +38,13 @@ export declare class TypeMemberLookupContext {
|
|
|
39
38
|
readonly sourceFile: SourceFile | undefined;
|
|
40
39
|
readonly packageEntity: PackageEntity | undefined;
|
|
41
40
|
readonly locale: PackageLocale | undefined;
|
|
42
|
-
readonly typeExtensionLookup:
|
|
43
|
-
constructor(typeOrExtensionEntity: TypeOrExtensionEntity | undefined, sourceFile: SourceFile | undefined, packageEntity: PackageEntity | undefined, locale: PackageLocale | undefined, typeExtensionLookup:
|
|
41
|
+
readonly typeExtensionLookup: TypeExtensionLookup | undefined;
|
|
42
|
+
constructor(typeOrExtensionEntity: TypeOrExtensionEntity | undefined, sourceFile: SourceFile | undefined, packageEntity: PackageEntity | undefined, locale: PackageLocale | undefined, typeExtensionLookup: TypeExtensionLookup | undefined);
|
|
44
43
|
affectsAccessibility(): boolean;
|
|
45
44
|
}
|
|
45
|
+
export interface TypeExtensionLookup {
|
|
46
|
+
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
|
47
|
+
}
|
|
46
48
|
export declare enum TypeMemberLookupOptions {
|
|
47
49
|
None = 0,
|
|
48
50
|
OnlyInstanceMembers = 1,
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { Lazy } from '../../common/Lazy.js';
|
|
2
1
|
import { Name } from '../../common/Name.js';
|
|
3
2
|
import { PackageLocale } from '../../common/PackageLocale.js';
|
|
4
3
|
export declare const enum ReservedNameKind {
|
|
5
4
|
Result = 0,
|
|
6
5
|
Value = 1
|
|
7
6
|
}
|
|
8
|
-
export declare const reservedNamesByLocale:
|
|
9
|
-
[T in PackageLocale]: {
|
|
10
|
-
[T in ReservedNameKind]: Name;
|
|
7
|
+
export declare const reservedNamesByLocale: {
|
|
8
|
+
readonly [T in PackageLocale]: {
|
|
9
|
+
readonly [T in ReservedNameKind]: Name;
|
|
11
10
|
};
|
|
12
|
-
}
|
|
13
|
-
export declare const reservedNameKindByNameKey:
|
|
14
|
-
0: ReadonlyMap<string, ReservedNameKind>;
|
|
15
|
-
1: ReadonlyMap<string, ReservedNameKind>;
|
|
16
|
-
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const reservedNameKindByNameKey: { readonly [T in PackageLocale]: ReadonlyMap<string, ReservedNameKind>; };
|
|
@@ -20,6 +20,7 @@ export declare class SourceFileAnalyzer {
|
|
|
20
20
|
constructor(analyzer: Analyzer, sourceFile: project.SourceFileA);
|
|
21
21
|
analyze(taskController: TaskController): Promise<Diagnostic[]>;
|
|
22
22
|
private analyzeNode;
|
|
23
|
+
private checkBinaryExpression;
|
|
23
24
|
private checkPackageVariantDeclaration;
|
|
24
25
|
private checkTypeMemberDeclarationBlock;
|
|
25
26
|
private checkAssumptionExpression;
|
|
@@ -5,11 +5,11 @@ import * as tree from '../../../tree/a/index.js';
|
|
|
5
5
|
import * as types from '../../../types/index.js';
|
|
6
6
|
import { DiagnosticArgumentFactory } from '../../DiagnosticArgumentFactory.js';
|
|
7
7
|
import { PackageMemberLookupContext } from '../../PackageMemberLookup.js';
|
|
8
|
-
import { TypeMemberLookupContext } from '../../TypeMemberLookup.js';
|
|
8
|
+
import { TypeExtensionLookup, TypeMemberLookupContext } from '../../TypeMemberLookup.js';
|
|
9
9
|
import { Analyzer } from '../Analyzer.js';
|
|
10
10
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
11
11
|
import { SemanticContext } from './SemanticContext.js';
|
|
12
|
-
export declare abstract class SemanticContextBase {
|
|
12
|
+
export declare abstract class SemanticContextBase implements TypeExtensionLookup {
|
|
13
13
|
static readonly emptyTypesOrContainersWithTypes: readonly TypeOrContainerWithTypes[];
|
|
14
14
|
static readonly emptyNamedDeclarations: readonly NamedDeclaration[];
|
|
15
15
|
static readonly emptyTypeExtensions: readonly TypeExtensionEntity[];
|
|
@@ -267,6 +267,7 @@ export declare enum DiagnosticCode {
|
|
|
267
267
|
OperatorCannotBeAsync = 2228,
|
|
268
268
|
OperatorCannotContainTypeParameterDeclarations = 2229,
|
|
269
269
|
TypeNameExpectedAtLastQualifier = 2230,
|
|
270
|
+
ExpressionsWithTypes0And1CannotBeCompared = 2231,
|
|
270
271
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 3000,
|
|
271
272
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 3001,
|
|
272
273
|
ProgramWithoutMainPackageCannotBeCompiled = 3002,
|
|
@@ -50,7 +50,7 @@ export type AccessorEntity = GetterEntity | SetterEntity;
|
|
|
50
50
|
export declare function isAccessorEntity(entity: Entity): entity is AccessorEntity;
|
|
51
51
|
export type EntityWithTypeParameters = EntityContainingTypeParameter;
|
|
52
52
|
export declare function isEntityWithTypeParameters(entity: Entity): entity is EntityWithTypeParameters;
|
|
53
|
-
export type EntityWithParameters =
|
|
53
|
+
export type EntityWithParameters = EntityContainingParameter;
|
|
54
54
|
export declare function isEntityWithParameters(entity: Entity): entity is EntityWithParameters;
|
|
55
55
|
export type NamedFunctionEntity = PackageFunctionEntity | MethodEntity | NestedFunctionEntity;
|
|
56
56
|
export declare function isNamedFunctionEntity(entity: Entity): entity is NamedFunctionEntity;
|
|
@@ -42,11 +42,6 @@ export interface NestedFunctionEntity extends IFunctionEntity {
|
|
|
42
42
|
getName(): Name;
|
|
43
43
|
getOriginalEntity(): NestedFunctionEntity;
|
|
44
44
|
}
|
|
45
|
-
export interface NestedFunctionEntity extends IFunctionEntity {
|
|
46
|
-
readonly subkind: 'nested';
|
|
47
|
-
getName(): Name;
|
|
48
|
-
getOriginalEntity(): NestedFunctionEntity;
|
|
49
|
-
}
|
|
50
45
|
export interface AnonymousFunctionEntity extends IFunctionEntity {
|
|
51
46
|
readonly subkind: 'anonymous';
|
|
52
47
|
getOriginalEntity(): AnonymousFunctionEntity;
|
|
@@ -2,7 +2,7 @@ import { Name } from '../../common/index.js';
|
|
|
2
2
|
import * as treeA from '../../tree/a/index.js';
|
|
3
3
|
import * as types from '../../types/index.js';
|
|
4
4
|
import { IEntity } from '../IEntity.js';
|
|
5
|
-
import { AnonymousFunctionEntity, ConstructorEntity, DefinitionKind, DestructorEntity, EntityHidingLevel, EntityKind, FunctionEntity, FunctionTypeEntity, GetterEntity, IndexerEntity,
|
|
5
|
+
import { AnonymousFunctionEntity, ConstructorEntity, DefinitionKind, DestructorEntity, EntityHidingLevel, EntityKind, FunctionEntity, FunctionTypeEntity, GetterEntity, IndexerEntity, PreservedReducedTypeEntityMemberInfo, SetterEntity, TextTranslationEntity, TypeWithMembersOrExtensionEntity } from '../index.js';
|
|
6
6
|
export type VariableEntity = PackageVariableEntity | FieldEntity | ParameterEntity | LocalVariableEntity;
|
|
7
7
|
interface IVariableEntity extends IEntity {
|
|
8
8
|
readonly kind: EntityKind.Variable;
|
|
@@ -50,7 +50,7 @@ export declare enum LocalVariableKind {
|
|
|
50
50
|
Enumeration = 1,
|
|
51
51
|
Error = 2
|
|
52
52
|
}
|
|
53
|
-
export type EntityContainingParameter = FunctionEntity | IndexerEntity | ConstructorEntity | DestructorEntity | FunctionTypeEntity |
|
|
53
|
+
export type EntityContainingParameter = FunctionEntity | IndexerEntity | ConstructorEntity | DestructorEntity | FunctionTypeEntity | TextTranslationEntity;
|
|
54
54
|
export type VariableEntityDefinition = {
|
|
55
55
|
kind: DefinitionKind.Source;
|
|
56
56
|
value: SourceVariableEntityDefinition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MaybeLazy, Name, PackageDialect, PackageLocale } from '../../common/index.js';
|
|
2
2
|
import * as types from '../../types/index.js';
|
|
3
3
|
import { TypeWithMembersOrExtensionEntity } from '../Entity.js';
|
|
4
4
|
import { EntityHidingLevel } from '../EntityHiding.js';
|
|
@@ -16,7 +16,7 @@ export declare class IntrinsicPackageVariableEntity implements PackageVariableEn
|
|
|
16
16
|
private readonly setter;
|
|
17
17
|
readonly kind = EntityKind.Variable;
|
|
18
18
|
readonly subkind = "package";
|
|
19
|
-
constructor(name: Name, type:
|
|
19
|
+
constructor(name: Name, type: MaybeLazy<types.Type>, containingPackage: PackageEntity, isSpecial_: SpecialVariableEntityInfo | undefined, isHidden_: EntityHidingLevel | undefined, getter: GetterEntity | undefined, setter: SetterEntity | undefined);
|
|
20
20
|
getName(): Name;
|
|
21
21
|
getType(): types.Type;
|
|
22
22
|
getDefinition(): VariableEntityDefinition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackageLocale, Range } from '../../common/index.js';
|
|
2
2
|
import { Node, SourceFile } from './Nodes.js';
|
|
3
3
|
import { Token } from './Token.js';
|
|
4
4
|
export declare abstract class BaseNode {
|
|
@@ -13,7 +13,6 @@ export declare abstract class BaseNode {
|
|
|
13
13
|
get parent(): Node | undefined;
|
|
14
14
|
get sourceFile(): SourceFile;
|
|
15
15
|
get locale(): PackageLocale;
|
|
16
|
-
get dialect(): PackageDialect;
|
|
17
16
|
get rangeWithTrivia(): Range;
|
|
18
17
|
get rangeWithoutTrivia(): Range;
|
|
19
18
|
get debuggerDisplay(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackageLocale, Query, Range } from '../../common/index.js';
|
|
2
2
|
import { ParserDiagnostic } from '../../parser/ParserDiagnostic.js';
|
|
3
3
|
import { BaseNode } from './BaseNode.js';
|
|
4
4
|
import { KeywordFlags } from './KeywordFlags.js';
|
|
@@ -22,15 +22,13 @@ export declare class SourceFile extends BaseNode {
|
|
|
22
22
|
];
|
|
23
23
|
readonly diagnostics: readonly ParserDiagnostic[];
|
|
24
24
|
private readonly locale_;
|
|
25
|
-
private readonly dialect_;
|
|
26
25
|
get locale(): PackageLocale;
|
|
27
|
-
get dialect(): PackageDialect;
|
|
28
26
|
get parent(): undefined;
|
|
29
27
|
get packageImportDirectiveList(): PackageImportDirectiveList;
|
|
30
28
|
get declarationList(): PackageMemberDeclarationList;
|
|
31
29
|
get endOfFileToken(): Token<TokenKind.EndOfFile>;
|
|
32
30
|
protected get thisAsNode(): Node;
|
|
33
|
-
constructor(packageImportDirectiveList: PackageImportDirectiveList, declarationList: PackageMemberDeclarationList, endOfFileToken: Token<TokenKind.EndOfFile>, locale: PackageLocale,
|
|
31
|
+
constructor(packageImportDirectiveList: PackageImportDirectiveList, declarationList: PackageMemberDeclarationList, endOfFileToken: Token<TokenKind.EndOfFile>, locale: PackageLocale, diagnostics: readonly ParserDiagnostic[], rangeWithTrivia: Range | undefined);
|
|
34
32
|
}
|
|
35
33
|
export declare class Keyword<TKind extends KeywordKind = KeywordKind> extends BaseNode {
|
|
36
34
|
readonly kind = NodeKind.Keyword;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artel/artc",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.26022",
|
|
4
4
|
"description": "Артель Компилятор | Artel Compiler",
|
|
5
5
|
"author": "Nezaboodka Team <contact@nezaboodka.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/types": "7.27.3",
|
|
45
45
|
"@vscode/l10n": "0.0.18",
|
|
46
46
|
"jsonc-parser": "3.3.1",
|
|
47
|
-
"reactronic": "^0.96.
|
|
47
|
+
"reactronic": "^0.96.26015",
|
|
48
48
|
"typescript": "5.9.3",
|
|
49
49
|
"vscode-json-languageservice": "5.4.2",
|
|
50
50
|
"vscode-languageserver": "9.0.1",
|