@artel/artc 0.9.26061-pre-release → 0.9.26062
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 +17 -14
- package/build/{chunk-ZYVAYG57.js → chunk-GFFPHR5G.js} +1 -1
- package/build/{chunk-53U5PFPM.js → chunk-JHXUTWHI.js} +614 -659
- package/build/{chunk-6UH5JW67.js → chunk-RUKQMGYY.js} +2 -2
- package/build/types/analysis/Analyzer.d.ts +6 -1
- package/build/types/analysis/NodeOrDiagnosticLocation.d.ts +2 -0
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +1 -0
- package/build/types/diagnostic/Diagnostic.d.ts +2 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +34 -33
- package/build/types/entities/EntityLocalizationContext.d.ts +6 -4
- package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +1 -2
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -3
- package/build/types/entities/source/a/SourceFunctionTypeEntity.d.ts +1 -2
- package/build/types/entities/source/a/SourcePackageEntity.d.ts +1 -5
- package/build/types/entities/source/m/SourceFunctionTypeEntity.d.ts +1 -2
- package/build/types/entities/source/m/SourcePackageEntity.d.ts +1 -5
- package/build/types/entities/translated/BaseTranslatedTypeMemberAccessorEntity.d.ts +3 -2
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedExtensionTypeEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +3 -4
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +4 -4
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedPackageMemberAccessorEntity.d.ts +3 -2
- package/build/types/entities/translated/TranslatedParameterEntity.d.ts +3 -3
- package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +6 -6
- package/build/types/entities/translated/TranslatedTypeMemberAccessorEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +5 -5
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +3 -3
- package/build/types/entities/translated/source/m/SourceTranslatedIndexerEntity.d.ts +2 -2
- package/build/types/services/common/node-semantic-info/NodeSemanticInfoService.d.ts +2 -2
- package/build/types/ts-interop/TypeEntities.d.ts +0 -1
- package/package.json +1 -1
|
@@ -782,7 +782,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
|
782
782
|
};
|
|
783
783
|
|
|
784
784
|
// source/common/Constants.ts
|
|
785
|
-
var ArtelVersion = true ? "0.9.
|
|
785
|
+
var ArtelVersion = true ? "0.9.26062" : "";
|
|
786
786
|
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"];
|
|
787
787
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
|
788
788
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
|
@@ -5481,7 +5481,7 @@ var StructuredTypeKind = /* @__PURE__ */ ((StructuredTypeKind5) => {
|
|
|
5481
5481
|
|
|
5482
5482
|
// source/entities/TypeEntity.ts
|
|
5483
5483
|
var TypeEntity;
|
|
5484
|
-
((
|
|
5484
|
+
((TypeEntity20) => {
|
|
5485
5485
|
function isAbstract(entity) {
|
|
5486
5486
|
switch (entity.typeEntityKind) {
|
|
5487
5487
|
case 1 /* Structured */:
|
|
@@ -5497,7 +5497,7 @@ var TypeEntity;
|
|
|
5497
5497
|
Debug.never(entity);
|
|
5498
5498
|
}
|
|
5499
5499
|
}
|
|
5500
|
-
|
|
5500
|
+
TypeEntity20.isAbstract = isAbstract;
|
|
5501
5501
|
function isAbstractOrAliasedAbstract(entity) {
|
|
5502
5502
|
switch (entity.typeEntityKind) {
|
|
5503
5503
|
case 1 /* Structured */:
|
|
@@ -5516,7 +5516,7 @@ var TypeEntity;
|
|
|
5516
5516
|
Debug.never(entity);
|
|
5517
5517
|
}
|
|
5518
5518
|
}
|
|
5519
|
-
|
|
5519
|
+
TypeEntity20.isAbstractOrAliasedAbstract = isAbstractOrAliasedAbstract;
|
|
5520
5520
|
function isBase(entity) {
|
|
5521
5521
|
switch (entity.typeEntityKind) {
|
|
5522
5522
|
case 1 /* Structured */:
|
|
@@ -5532,7 +5532,7 @@ var TypeEntity;
|
|
|
5532
5532
|
Debug.never(entity);
|
|
5533
5533
|
}
|
|
5534
5534
|
}
|
|
5535
|
-
|
|
5535
|
+
TypeEntity20.isBase = isBase;
|
|
5536
5536
|
function isBaseOrAliasedBase(entity) {
|
|
5537
5537
|
switch (entity.typeEntityKind) {
|
|
5538
5538
|
case 1 /* Structured */:
|
|
@@ -5551,15 +5551,15 @@ var TypeEntity;
|
|
|
5551
5551
|
Debug.never(entity);
|
|
5552
5552
|
}
|
|
5553
5553
|
}
|
|
5554
|
-
|
|
5554
|
+
TypeEntity20.isBaseOrAliasedBase = isBaseOrAliasedBase;
|
|
5555
5555
|
function isWrapperType(entity) {
|
|
5556
5556
|
return entity.typeEntityKind === 1 /* Structured */ && entity.getWrapperSource() !== void 0;
|
|
5557
5557
|
}
|
|
5558
|
-
|
|
5558
|
+
TypeEntity20.isWrapperType = isWrapperType;
|
|
5559
5559
|
function isWrapperTypeNoCast(entity) {
|
|
5560
5560
|
return isWrapperType(entity);
|
|
5561
5561
|
}
|
|
5562
|
-
|
|
5562
|
+
TypeEntity20.isWrapperTypeNoCast = isWrapperTypeNoCast;
|
|
5563
5563
|
})(TypeEntity || (TypeEntity = {}));
|
|
5564
5564
|
var TypeEntityKind = /* @__PURE__ */ ((TypeEntityKind3) => {
|
|
5565
5565
|
TypeEntityKind3[TypeEntityKind3["Function"] = 0] = "Function";
|
|
@@ -21399,39 +21399,40 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
|
|
|
21399
21399
|
DiagnosticCode2[DiagnosticCode2["Type0MustMeImplementedAsReducedType"] = 2280] = "Type0MustMeImplementedAsReducedType";
|
|
21400
21400
|
DiagnosticCode2[DiagnosticCode2["TypeExtension0MustMeImplementedAsTypeExtension"] = 2281] = "TypeExtension0MustMeImplementedAsTypeExtension";
|
|
21401
21401
|
DiagnosticCode2[DiagnosticCode2["Type0MustMeImplementedAsAlias"] = 2282] = "Type0MustMeImplementedAsAlias";
|
|
21402
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21403
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21404
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21405
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21406
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21407
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21408
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21409
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21410
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21411
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21412
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21413
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21414
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21415
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21416
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21417
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21418
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21419
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21420
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21421
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21422
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21423
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21424
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21425
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21426
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21427
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21428
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21429
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21430
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21431
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21432
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21433
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21434
|
-
DiagnosticCode2[DiagnosticCode2["
|
|
21402
|
+
DiagnosticCode2[DiagnosticCode2["ToMatchTypeDeclaredInInterfacePackageRightTypeOfAliasTypeMustBe0"] = 2283] = "ToMatchTypeDeclaredInInterfacePackageRightTypeOfAliasTypeMustBe0";
|
|
21403
|
+
DiagnosticCode2[DiagnosticCode2["WrapperTypeCannotBeMarkedWithAbstract0Modifier"] = 2284] = "WrapperTypeCannotBeMarkedWithAbstract0Modifier";
|
|
21404
|
+
DiagnosticCode2[DiagnosticCode2["WrapperTypeMarkedWith0ModifierMustBeBasedOnBaseType"] = 2285] = "WrapperTypeMarkedWith0ModifierMustBeBasedOnBaseType";
|
|
21405
|
+
DiagnosticCode2[DiagnosticCode2["RedundantArgument"] = 2286] = "RedundantArgument";
|
|
21406
|
+
DiagnosticCode2[DiagnosticCode2["AbstractTypeMembersMustHaveEmptyBody"] = 2287] = "AbstractTypeMembersMustHaveEmptyBody";
|
|
21407
|
+
DiagnosticCode2[DiagnosticCode2["BitFlagCannotBeHidden"] = 2288] = "BitFlagCannotBeHidden";
|
|
21408
|
+
DiagnosticCode2[DiagnosticCode2["BitFlagsTypesCannotContainConstructorDeclarations"] = 2289] = "BitFlagsTypesCannotContainConstructorDeclarations";
|
|
21409
|
+
DiagnosticCode2[DiagnosticCode2["BitFlagsTypeFieldsMustHaveType0"] = 2290] = "BitFlagsTypeFieldsMustHaveType0";
|
|
21410
|
+
DiagnosticCode2[DiagnosticCode2["BitFlagsTypeFieldsMustNotHaveInitializers"] = 2291] = "BitFlagsTypeFieldsMustNotHaveInitializers";
|
|
21411
|
+
DiagnosticCode2[DiagnosticCode2["ConstructorCannotBeCalledOnThisInstance"] = 2292] = "ConstructorCannotBeCalledOnThisInstance";
|
|
21412
|
+
DiagnosticCode2[DiagnosticCode2["ConstructorMustNotBeReferenced"] = 2293] = "ConstructorMustNotBeReferenced";
|
|
21413
|
+
DiagnosticCode2[DiagnosticCode2["ConstructorsAndDestructorsMustNotHaveReturnType"] = 2294] = "ConstructorsAndDestructorsMustNotHaveReturnType";
|
|
21414
|
+
DiagnosticCode2[DiagnosticCode2["ConstructorsAndDestructorsMustNotHaveTypeParameters"] = 2295] = "ConstructorsAndDestructorsMustNotHaveTypeParameters";
|
|
21415
|
+
DiagnosticCode2[DiagnosticCode2["DeclarationsMarkedWithBuiltIntoPlatformTagMustHaveEmptyBody"] = 2296] = "DeclarationsMarkedWithBuiltIntoPlatformTagMustHaveEmptyBody";
|
|
21416
|
+
DiagnosticCode2[DiagnosticCode2["ExpressionResultMustBeUsed"] = 2297] = "ExpressionResultMustBeUsed";
|
|
21417
|
+
DiagnosticCode2[DiagnosticCode2["ExtensionTypeMustBeBasedOnAnotherType"] = 2298] = "ExtensionTypeMustBeBasedOnAnotherType";
|
|
21418
|
+
DiagnosticCode2[DiagnosticCode2["FunctionMustNotBeTranslatedAsAnOperator"] = 2299] = "FunctionMustNotBeTranslatedAsAnOperator";
|
|
21419
|
+
DiagnosticCode2[DiagnosticCode2["IndexParametersOfIndexedElementAccessorsMustBeTranslatedTheSameWay"] = 2300] = "IndexParametersOfIndexedElementAccessorsMustBeTranslatedTheSameWay";
|
|
21420
|
+
DiagnosticCode2[DiagnosticCode2["OperatorMustNotBeTranslatedAsAFunction"] = 2301] = "OperatorMustNotBeTranslatedAsAFunction";
|
|
21421
|
+
DiagnosticCode2[DiagnosticCode2["OwnOrBaseConstructorExpected"] = 2302] = "OwnOrBaseConstructorExpected";
|
|
21422
|
+
DiagnosticCode2[DiagnosticCode2["ReadFunctionMustHaveNoParameters"] = 2303] = "ReadFunctionMustHaveNoParameters";
|
|
21423
|
+
DiagnosticCode2[DiagnosticCode2["ReducedTypeMembersMustHaveEmptyBody"] = 2304] = "ReducedTypeMembersMustHaveEmptyBody";
|
|
21424
|
+
DiagnosticCode2[DiagnosticCode2["SwitchStatementMustHaveOnlyOneDefaultMatchExpression"] = 2305] = "SwitchStatementMustHaveOnlyOneDefaultMatchExpression";
|
|
21425
|
+
DiagnosticCode2[DiagnosticCode2["TranslatedConstructorMustBeNamed0"] = 2306] = "TranslatedConstructorMustBeNamed0";
|
|
21426
|
+
DiagnosticCode2[DiagnosticCode2["TranslatedDestructorMustBeNamed0"] = 2307] = "TranslatedDestructorMustBeNamed0";
|
|
21427
|
+
DiagnosticCode2[DiagnosticCode2["VariantTypesCannotContainConstructorDeclarations"] = 2308] = "VariantTypesCannotContainConstructorDeclarations";
|
|
21428
|
+
DiagnosticCode2[DiagnosticCode2["VariantValueWithName0NotFound"] = 2309] = "VariantValueWithName0NotFound";
|
|
21429
|
+
DiagnosticCode2[DiagnosticCode2["WellKnownTagMustBeNamed0AndUsedWithoutAlias"] = 2310] = "WellKnownTagMustBeNamed0AndUsedWithoutAlias";
|
|
21430
|
+
DiagnosticCode2[DiagnosticCode2["WrapperTypeMustBeBasedOnAnotherType"] = 2311] = "WrapperTypeMustBeBasedOnAnotherType";
|
|
21431
|
+
DiagnosticCode2[DiagnosticCode2["WriteFunctionMustHaveOneParameter"] = 2312] = "WriteFunctionMustHaveOneParameter";
|
|
21432
|
+
DiagnosticCode2[DiagnosticCode2["WrongTypeParameterCount"] = 2313] = "WrongTypeParameterCount";
|
|
21433
|
+
DiagnosticCode2[DiagnosticCode2["WrongTypeParameterName"] = 2314] = "WrongTypeParameterName";
|
|
21434
|
+
DiagnosticCode2[DiagnosticCode2["AllTypeParametersOfTypeDerivedFromClosedHierarchyRootMustBeUsedTypeParameter0IsUnused"] = 2315] = "AllTypeParametersOfTypeDerivedFromClosedHierarchyRootMustBeUsedTypeParameter0IsUnused";
|
|
21435
|
+
DiagnosticCode2[DiagnosticCode2["DeclarationsMarkedWithClosedHierarchy0ModifierMustBeAlsoMarkedWithAbstract1Modifier"] = 2316] = "DeclarationsMarkedWithClosedHierarchy0ModifierMustBeAlsoMarkedWithAbstract1Modifier";
|
|
21435
21436
|
DiagnosticCode2[DiagnosticCode2["CannotFindTsLibDirectoryBaseSearchPaths0"] = 3e3] = "CannotFindTsLibDirectoryBaseSearchPaths0";
|
|
21436
21437
|
DiagnosticCode2[DiagnosticCode2["SourceFile0IsNotPartOfThePackageAndWontBeLoaded"] = 3001] = "SourceFile0IsNotPartOfThePackageAndWontBeLoaded";
|
|
21437
21438
|
DiagnosticCode2[DiagnosticCode2["ProgramWithoutMainPackageCannotBeCompiled"] = 3002] = "ProgramWithoutMainPackageCannotBeCompiled";
|
|
@@ -21824,40 +21825,41 @@ var englishErrorMessages = {
|
|
|
21824
21825
|
[2280 /* Type0MustMeImplementedAsReducedType */]: "Type '{0}' must me implemented as reduced type.",
|
|
21825
21826
|
[2281 /* TypeExtension0MustMeImplementedAsTypeExtension */]: "Type extension '{0}' must me implemented as type extension.",
|
|
21826
21827
|
[2282 /* Type0MustMeImplementedAsAlias */]: "Type '{0}' must me implemented as alias.",
|
|
21827
|
-
[2283 /*
|
|
21828
|
-
[2284 /*
|
|
21829
|
-
[2285 /*
|
|
21830
|
-
[
|
|
21828
|
+
[2283 /* ToMatchTypeDeclaredInInterfacePackageRightTypeOfAliasTypeMustBe0 */]: "To match type declared in interface package, right type of alias type must be '{0}'.",
|
|
21829
|
+
[2284 /* WrapperTypeCannotBeMarkedWithAbstract0Modifier */]: "Wrapper type cannot be marked with '{0}' modifier.",
|
|
21830
|
+
[2285 /* WrapperTypeMarkedWith0ModifierMustBeBasedOnBaseType */]: "Wrapper type marked with '{0}' modifier must be based on base type.",
|
|
21831
|
+
[2286 /* RedundantArgument */]: "Redundant argument.",
|
|
21832
|
+
[2315 /* AllTypeParametersOfTypeDerivedFromClosedHierarchyRootMustBeUsedTypeParameter0IsUnused */]: "All type parameters of type derived from closed hierarchy root must be used in base type specifier. Type parameter '{0}' is unused.",
|
|
21831
21833
|
// Ошибки семантического анализа (Артель-М)
|
|
21832
|
-
[
|
|
21833
|
-
[
|
|
21834
|
-
[
|
|
21835
|
-
[
|
|
21836
|
-
[
|
|
21837
|
-
[
|
|
21838
|
-
[
|
|
21839
|
-
[
|
|
21840
|
-
[
|
|
21841
|
-
[
|
|
21842
|
-
[
|
|
21843
|
-
[
|
|
21844
|
-
[
|
|
21845
|
-
[
|
|
21846
|
-
[
|
|
21847
|
-
[
|
|
21848
|
-
[
|
|
21849
|
-
[
|
|
21850
|
-
[
|
|
21851
|
-
[
|
|
21852
|
-
[
|
|
21853
|
-
[
|
|
21854
|
-
[
|
|
21855
|
-
[
|
|
21856
|
-
[
|
|
21857
|
-
[
|
|
21858
|
-
[
|
|
21859
|
-
[
|
|
21860
|
-
[
|
|
21834
|
+
[2287 /* AbstractTypeMembersMustHaveEmptyBody */]: "Abstract type members must have empty body.",
|
|
21835
|
+
[2288 /* BitFlagCannotBeHidden */]: "Bit flag cannot be hidden.",
|
|
21836
|
+
[2289 /* BitFlagsTypesCannotContainConstructorDeclarations */]: "Bit flags types cannot contain constructor declarations.",
|
|
21837
|
+
[2290 /* BitFlagsTypeFieldsMustHaveType0 */]: "Bit flags type fields must have type '{0}'.",
|
|
21838
|
+
[2291 /* BitFlagsTypeFieldsMustNotHaveInitializers */]: "Bit flags type fields must not have initializers.",
|
|
21839
|
+
[2292 /* ConstructorCannotBeCalledOnThisInstance */]: "Constructor cannot be called on this instance.",
|
|
21840
|
+
[2293 /* ConstructorMustNotBeReferenced */]: "Constructor must not be referenced.",
|
|
21841
|
+
[2294 /* ConstructorsAndDestructorsMustNotHaveReturnType */]: "Constructors and destructors must not have return type.",
|
|
21842
|
+
[2295 /* ConstructorsAndDestructorsMustNotHaveTypeParameters */]: "Constructors and destructors must not have type parameters.",
|
|
21843
|
+
[2296 /* DeclarationsMarkedWithBuiltIntoPlatformTagMustHaveEmptyBody */]: "Declarations marked with '{0}' tag must have empty body.",
|
|
21844
|
+
[2297 /* ExpressionResultMustBeUsed */]: "Expression result must be used.",
|
|
21845
|
+
[2298 /* ExtensionTypeMustBeBasedOnAnotherType */]: "Extension type must be based on another type.",
|
|
21846
|
+
[2299 /* FunctionMustNotBeTranslatedAsAnOperator */]: "Function must not be translated as an operator.",
|
|
21847
|
+
[2300 /* IndexParametersOfIndexedElementAccessorsMustBeTranslatedTheSameWay */]: "Index parameters of indexed element accessors must be translated the same way.",
|
|
21848
|
+
[2301 /* OperatorMustNotBeTranslatedAsAFunction */]: "Operator must not be translated as a function.",
|
|
21849
|
+
[2302 /* OwnOrBaseConstructorExpected */]: "Own or base constructor expected.",
|
|
21850
|
+
[2303 /* ReadFunctionMustHaveNoParameters */]: "Read function must have no parameters.",
|
|
21851
|
+
[2304 /* ReducedTypeMembersMustHaveEmptyBody */]: "Reduced type members must have empty body.",
|
|
21852
|
+
[2305 /* SwitchStatementMustHaveOnlyOneDefaultMatchExpression */]: "Switch statement must have only one default match expression.",
|
|
21853
|
+
[2306 /* TranslatedConstructorMustBeNamed0 */]: "Translated constructor must be named '{0}'.",
|
|
21854
|
+
[2307 /* TranslatedDestructorMustBeNamed0 */]: "Translated destructor must be named '{0}'.",
|
|
21855
|
+
[2308 /* VariantTypesCannotContainConstructorDeclarations */]: "Variant types cannot contain constructor declarations.",
|
|
21856
|
+
[2309 /* VariantValueWithName0NotFound */]: "Variant value with name '{0}' not found.",
|
|
21857
|
+
[2310 /* WellKnownTagMustBeNamed0AndUsedWithoutAlias */]: "Well known tag must be named '{0}' and used without alias.",
|
|
21858
|
+
[2311 /* WrapperTypeMustBeBasedOnAnotherType */]: "Wrapper type must be based on another type.",
|
|
21859
|
+
[2312 /* WriteFunctionMustHaveOneParameter */]: "Write function must have one parameter.",
|
|
21860
|
+
[2313 /* WrongTypeParameterCount */]: "Wrong type parameter count.",
|
|
21861
|
+
[2314 /* WrongTypeParameterName */]: "Wrong type parameter name.",
|
|
21862
|
+
[2316 /* DeclarationsMarkedWithClosedHierarchy0ModifierMustBeAlsoMarkedWithAbstract1Modifier */]: "Declarations marked with '{0}' modifier must be also marked with '{1}' modifier.",
|
|
21861
21863
|
// Ошибки загрузки пакета
|
|
21862
21864
|
[3e3 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "Can not find directory with TypeScript library. Base search paths: {0}.",
|
|
21863
21865
|
[3001 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "Source file '{0}' is not part of the package and won't be loaded.",
|
|
@@ -22205,40 +22207,41 @@ var russianErrorMessages = {
|
|
|
22205
22207
|
[2280 /* Type0MustMeImplementedAsReducedType */]: "\u0422\u0438\u043F '{0}' \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0440\u0435\u0430\u043B\u0438\u0437\u043E\u0432\u0430\u043D \u043A\u0430\u043A \u0441\u043E\u043A\u0440\u0430\u0449\u0451\u043D\u043D\u044B\u0439 \u0442\u0438\u043F.",
|
|
22206
22208
|
[2281 /* TypeExtension0MustMeImplementedAsTypeExtension */]: "\u0414\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 '{0}' \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u0440\u0435\u0430\u043B\u0438\u0437\u043E\u0432\u0430\u043D\u043E \u043A\u0430\u043A \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435.",
|
|
22207
22209
|
[2282 /* Type0MustMeImplementedAsAlias */]: "\u0422\u0438\u043F '{0}' \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0440\u0435\u0430\u043B\u0438\u0437\u043E\u0432\u0430\u043D \u043A\u0430\u043A \u043F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C.",
|
|
22208
|
-
[2283 /*
|
|
22209
|
-
[2284 /*
|
|
22210
|
-
[2285 /*
|
|
22211
|
-
[
|
|
22210
|
+
[2283 /* ToMatchTypeDeclaredInInterfacePackageRightTypeOfAliasTypeMustBe0 */]: "\u0427\u0442\u043E\u0431\u044B \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043D\u043E\u043C\u0443 \u043F\u0430\u043A\u0435\u0442\u0443, \u0432 \u043F\u0440\u0430\u0432\u043E\u0439 \u0447\u0430\u0441\u0442\u0438 \u043F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0443\u043A\u0430\u0437\u0430\u043D \u0442\u0438\u043F '{0}'.",
|
|
22211
|
+
[2284 /* WrapperTypeCannotBeMarkedWithAbstract0Modifier */]: "\u0422\u0438\u043F-\u043E\u0431\u0451\u0440\u0442\u043A\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u043E\u043C\u0435\u0447\u0435\u043D \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u043C '{0}'.",
|
|
22212
|
+
[2285 /* WrapperTypeMarkedWith0ModifierMustBeBasedOnBaseType */]: "\u0422\u0438\u043F-\u043E\u0431\u0451\u0440\u0442\u043A\u0430, \u043F\u043E\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0439 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u043C '{0}', \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u0430\u043D \u043D\u0430 \u0431\u0430\u0437\u043E\u0432\u043E\u043C \u0442\u0438\u043F\u0435.",
|
|
22213
|
+
[2286 /* RedundantArgument */]: "\u041B\u0438\u0448\u043D\u0438\u0439 \u0430\u0440\u0433\u0443\u043C\u0435\u043D\u0442.",
|
|
22214
|
+
[2316 /* DeclarationsMarkedWithClosedHierarchy0ModifierMustBeAlsoMarkedWithAbstract1Modifier */]: "\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F, \u043F\u043E\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u043C '{0}', \u0442\u0430\u043A\u0436\u0435 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u043F\u043E\u043C\u0435\u0447\u0435\u043D\u044B \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u043C '{1}'.",
|
|
22212
22215
|
// Ошибки семантического анализа (Артель-М)
|
|
22213
|
-
[
|
|
22214
|
-
[
|
|
22215
|
-
[
|
|
22216
|
-
[
|
|
22217
|
-
[
|
|
22218
|
-
[
|
|
22219
|
-
[
|
|
22220
|
-
[
|
|
22221
|
-
[
|
|
22222
|
-
[
|
|
22223
|
-
[
|
|
22224
|
-
[
|
|
22225
|
-
[
|
|
22226
|
-
[
|
|
22227
|
-
[
|
|
22228
|
-
[
|
|
22229
|
-
[
|
|
22230
|
-
[
|
|
22231
|
-
[
|
|
22232
|
-
[
|
|
22233
|
-
[
|
|
22234
|
-
[
|
|
22235
|
-
[
|
|
22236
|
-
[
|
|
22237
|
-
[
|
|
22238
|
-
[
|
|
22239
|
-
[
|
|
22240
|
-
[
|
|
22241
|
-
[
|
|
22216
|
+
[2287 /* AbstractTypeMembersMustHaveEmptyBody */]: "\u0410\u0431\u0441\u0442\u0440\u0430\u043A\u0442\u043D\u044B\u0435 \u0447\u043B\u0435\u043D\u044B \u0442\u0438\u043F\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043F\u0443\u0441\u0442\u043E\u0435 \u0442\u0435\u043B\u043E.",
|
|
22217
|
+
[2288 /* BitFlagCannotBeHidden */]: "\u0411\u0438\u0442\u043E\u0432\u044B\u0439 \u0444\u043B\u0430\u0433 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u043A\u0440\u044B\u0442.",
|
|
22218
|
+
[2289 /* BitFlagsTypesCannotContainConstructorDeclarations */]: "\u0422\u0438\u043F\u044B \u0431\u0438\u0442\u043E\u0432\u044B\u0445 \u0444\u043B\u0430\u0433\u043E\u0432 \u043D\u0435 \u043C\u043E\u0433\u0443\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u043E\u0432.",
|
|
22219
|
+
[2290 /* BitFlagsTypeFieldsMustHaveType0 */]: "\u041F\u043E\u043B\u044F \u0442\u0438\u043F\u0430 \u0431\u0438\u0442\u043E\u0432\u044B\u0445 \u0444\u043B\u0430\u0433\u043E\u0432 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u0442\u0438\u043F '{0}'.",
|
|
22220
|
+
[2291 /* BitFlagsTypeFieldsMustNotHaveInitializers */]: "\u041F\u043E\u043B\u044F \u0442\u0438\u043F\u0430 \u0431\u0438\u0442\u043E\u0432\u044B\u0445 \u0444\u043B\u0430\u0433\u043E\u0432 \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F.",
|
|
22221
|
+
[2292 /* ConstructorCannotBeCalledOnThisInstance */]: "\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0432\u044B\u0437\u0432\u0430\u043D \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u044D\u043A\u0437\u0435\u043C\u043F\u043B\u044F\u0440\u0430.",
|
|
22222
|
+
[2293 /* ConstructorMustNotBeReferenced */]: "\u041D\u0435\u043B\u044C\u0437\u044F \u0431\u0440\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440.",
|
|
22223
|
+
[2294 /* ConstructorsAndDestructorsMustNotHaveReturnType */]: "\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u044B \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u044B \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043C\u044B\u0439 \u0442\u0438\u043F.",
|
|
22224
|
+
[2295 /* ConstructorsAndDestructorsMustNotHaveTypeParameters */]: "\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u044B \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u044B \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0442\u0438\u043F\u0430.",
|
|
22225
|
+
[2296 /* DeclarationsMarkedWithBuiltIntoPlatformTagMustHaveEmptyBody */]: "\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F, \u043F\u043E\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u0442\u0435\u0433\u043E\u043C '{0}', \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043F\u0443\u0441\u0442\u043E\u0435 \u0442\u0435\u043B\u043E.",
|
|
22226
|
+
[2297 /* ExpressionResultMustBeUsed */]: "\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D.",
|
|
22227
|
+
[2298 /* ExtensionTypeMustBeBasedOnAnotherType */]: "\u0422\u0438\u043F-\u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u0430\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \u0434\u0440\u0443\u0433\u043E\u043C \u0442\u0438\u043F\u0435.",
|
|
22228
|
+
[2299 /* FunctionMustNotBeTranslatedAsAnOperator */]: "\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u0430 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0438\u0442\u044C\u0441\u044F \u043A\u0430\u043A \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440.",
|
|
22229
|
+
[2300 /* IndexParametersOfIndexedElementAccessorsMustBeTranslatedTheSameWay */]: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B-\u0438\u043D\u0434\u0435\u043A\u0441\u044B \u0444\u0443\u043D\u043A\u0446\u0438\u0439 \u0447\u0442\u0435\u043D\u0438\u044F \u0438 \u0437\u0430\u043F\u0438\u0441\u0438 \u0438\u043D\u0434\u0435\u043A\u0441\u0430\u0442\u043E\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043D\u044B \u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u043E.",
|
|
22230
|
+
[2301 /* OperatorMustNotBeTranslatedAsAFunction */]: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0438\u0442\u044C\u0441\u044F \u043A\u0430\u043A \u0444\u0443\u043D\u043A\u0446\u0438\u044F.",
|
|
22231
|
+
[2302 /* OwnOrBaseConstructorExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0441\u044F \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0438\u043B\u0438 \u0431\u0430\u0437\u043E\u0432\u044B\u0439 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440.",
|
|
22232
|
+
[2303 /* ReadFunctionMustHaveNoParameters */]: "\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u0447\u0442\u0435\u043D\u0438\u044F \u043D\u0435 \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432.",
|
|
22233
|
+
[2304 /* ReducedTypeMembersMustHaveEmptyBody */]: "\u0427\u043B\u0435\u043D\u044B \u0441\u043E\u043A\u0440\u0430\u0449\u0451\u043D\u043D\u043E\u0433\u043E \u0442\u0438\u043F\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0438\u043C\u0435\u0442\u044C \u043F\u0443\u0441\u0442\u043E\u0435 \u0442\u0435\u043B\u043E.",
|
|
22234
|
+
[2305 /* SwitchStatementMustHaveOnlyOneDefaultMatchExpression */]: "\u0412\u044B\u0431\u043E\u0440 \u0434\u043E\u043B\u0436\u0435\u043D \u0438\u043C\u0435\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u043D\u043E \u0443\u0441\u043B\u043E\u0432\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.",
|
|
22235
|
+
[2306 /* TranslatedConstructorMustBeNamed0 */]: '\u041F\u0435\u0440\u0435\u0432\u0435\u0434\u0451\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440 \u0434\u043E\u043B\u0436\u0435\u043D \u043D\u0430\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F "{0}".',
|
|
22236
|
+
[2307 /* TranslatedDestructorMustBeNamed0 */]: '\u041F\u0435\u0440\u0435\u0432\u0435\u0434\u0451\u043D\u043D\u044B\u0439 \u0434\u0435\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440 \u0434\u043E\u043B\u0436\u0435\u043D \u043D\u0430\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F "{0}".',
|
|
22237
|
+
[2308 /* VariantTypesCannotContainConstructorDeclarations */]: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u043D\u044B\u0435 \u0442\u0438\u043F\u044B \u043D\u0435 \u043C\u043E\u0433\u0443\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u043E\u0432.",
|
|
22238
|
+
[2309 /* VariantValueWithName0NotFound */]: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442 \u0441 \u0438\u043C\u0435\u043D\u0435\u043C '{0}' \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.",
|
|
22239
|
+
[2310 /* WellKnownTagMustBeNamed0AndUsedWithoutAlias */]: "\u0421\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u0433 \u0434\u043E\u043B\u0436\u0435\u043D \u043D\u0430\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F '{0}' \u0438 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C\u0441\u044F \u0431\u0435\u0437 \u043F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C\u0430.",
|
|
22240
|
+
[2311 /* WrapperTypeMustBeBasedOnAnotherType */]: "\u0422\u0438\u043F-\u043E\u0431\u0451\u0440\u0442\u043A\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u0430\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \u0434\u0440\u0443\u0433\u043E\u043C \u0442\u0438\u043F\u0435.",
|
|
22241
|
+
[2312 /* WriteFunctionMustHaveOneParameter */]: "\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u0437\u0430\u043F\u0438\u0441\u0438 \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043E\u0434\u0438\u043D \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440.",
|
|
22242
|
+
[2313 /* WrongTypeParameterCount */]: "\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0442\u0438\u043F\u0430.",
|
|
22243
|
+
[2314 /* WrongTypeParameterName */]: "\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0438\u043C\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0442\u0438\u043F\u0430.",
|
|
22244
|
+
[2315 /* AllTypeParametersOfTypeDerivedFromClosedHierarchyRootMustBeUsedTypeParameter0IsUnused */]: "\u0412\u0441\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0442\u0438\u043F\u0430, \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u043D\u043E\u0433\u043E \u043E\u0442 \u043A\u043E\u0440\u043D\u044F \u0437\u0430\u043A\u0440\u044B\u0442\u043E\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u044B \u043F\u0440\u0438 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0438 \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u0442\u0438\u043F\u0430. \u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0442\u0438\u043F\u0430 '{0}' \u043D\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F.",
|
|
22242
22245
|
// Ошибки загрузки пакета
|
|
22243
22246
|
[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}.",
|
|
22244
22247
|
[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.",
|
|
@@ -32578,7 +32581,7 @@ var DisplayServiceA = class extends BaseDisplayService {
|
|
|
32578
32581
|
}
|
|
32579
32582
|
return types.map((t) => {
|
|
32580
32583
|
let typeText = this.displayTypeInternal(t, lessDetailsTypeDisplayOptions);
|
|
32581
|
-
if (t.kind === "function"
|
|
32584
|
+
if (t.kind === "function") {
|
|
32582
32585
|
typeText = `(${typeText})`;
|
|
32583
32586
|
}
|
|
32584
32587
|
return typeText;
|
|
@@ -33389,7 +33392,7 @@ var DisplayServiceM = class extends BaseDisplayService {
|
|
|
33389
33392
|
}
|
|
33390
33393
|
const typeTexts = types.map((t) => {
|
|
33391
33394
|
let typeText = this.displayTypeInternal(t, lessDetailsTypeDisplayOptions2);
|
|
33392
|
-
if (t.kind === "function"
|
|
33395
|
+
if (t.kind === "function") {
|
|
33393
33396
|
typeText = `(${typeText})`;
|
|
33394
33397
|
}
|
|
33395
33398
|
return typeText;
|
|
@@ -33861,6 +33864,15 @@ var DiagnosticLocation = class {
|
|
|
33861
33864
|
return new DiagnosticArgumentFactory(analyzer, DefaultLocale, DefaultDialect, void 0);
|
|
33862
33865
|
}
|
|
33863
33866
|
}
|
|
33867
|
+
getLocalizationContext(analyzer) {
|
|
33868
|
+
if (this.file instanceof SourceFileA) {
|
|
33869
|
+
return analyzer.getLocalizationContextForPackage(analyzer.getSourcePackageEntity(this.file.package));
|
|
33870
|
+
} else if (this.file instanceof SourceFileM) {
|
|
33871
|
+
return analyzer.getLocalizationContextForPackage(analyzer.getSourcePackageEntity(this.file.package));
|
|
33872
|
+
} else {
|
|
33873
|
+
return analyzer.getLocalizationContextForPackage(analyzer.systemPackage);
|
|
33874
|
+
}
|
|
33875
|
+
}
|
|
33864
33876
|
};
|
|
33865
33877
|
var DiagnosticAcceptorWithArgumentFactory = class {
|
|
33866
33878
|
constructor(diagnosticAcceptor, argumentFactory) {
|
|
@@ -34647,67 +34659,67 @@ function isTypeMemberEntity(entity) {
|
|
|
34647
34659
|
}
|
|
34648
34660
|
}
|
|
34649
34661
|
var TypeMemberEntity;
|
|
34650
|
-
((
|
|
34662
|
+
((TypeMemberEntity11) => {
|
|
34651
34663
|
function isAspectMember(entity) {
|
|
34652
34664
|
const containingType = entity.getContainingType();
|
|
34653
34665
|
return containingType.kind === 2 /* Type */ && containingType.typeEntityKind === 1 /* Structured */ && containingType.structuredTypeKind === 2 /* Aspect */;
|
|
34654
34666
|
}
|
|
34655
|
-
|
|
34667
|
+
TypeMemberEntity11.isAspectMember = isAspectMember;
|
|
34656
34668
|
function isClassMember(entity) {
|
|
34657
34669
|
const containingType = entity.getContainingType();
|
|
34658
34670
|
return containingType.kind === 2 /* Type */ && containingType.typeEntityKind === 1 /* Structured */ && containingType.structuredTypeKind === 0 /* Class */;
|
|
34659
34671
|
}
|
|
34660
|
-
|
|
34672
|
+
TypeMemberEntity11.isClassMember = isClassMember;
|
|
34661
34673
|
function isExtensionMember(entity) {
|
|
34662
34674
|
const containingType = entity.getContainingType();
|
|
34663
34675
|
return containingType.kind === 2 /* Type */ && containingType.typeEntityKind === 6 /* Extension */;
|
|
34664
34676
|
}
|
|
34665
|
-
|
|
34677
|
+
TypeMemberEntity11.isExtensionMember = isExtensionMember;
|
|
34666
34678
|
function isReducedTypeMember(entity) {
|
|
34667
34679
|
const containingType = entity.getContainingType();
|
|
34668
34680
|
return containingType.kind === 2 /* Type */ && containingType.typeEntityKind === 5 /* Reduced */;
|
|
34669
34681
|
}
|
|
34670
|
-
|
|
34682
|
+
TypeMemberEntity11.isReducedTypeMember = isReducedTypeMember;
|
|
34671
34683
|
function isBase(entity) {
|
|
34672
34684
|
return !entity.isStatic() && (entity.markedBase() || entity.markedAbstract());
|
|
34673
34685
|
}
|
|
34674
|
-
|
|
34686
|
+
TypeMemberEntity11.isBase = isBase;
|
|
34675
34687
|
function isAbstract(entity) {
|
|
34676
34688
|
return entity.markedAbstract();
|
|
34677
34689
|
}
|
|
34678
|
-
|
|
34690
|
+
TypeMemberEntity11.isAbstract = isAbstract;
|
|
34679
34691
|
function isOrdinaryMethod(entity) {
|
|
34680
34692
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 0 /* Ordinary */;
|
|
34681
34693
|
}
|
|
34682
|
-
|
|
34694
|
+
TypeMemberEntity11.isOrdinaryMethod = isOrdinaryMethod;
|
|
34683
34695
|
function isOperator(entity) {
|
|
34684
34696
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 4 /* Operator */;
|
|
34685
34697
|
}
|
|
34686
|
-
|
|
34698
|
+
TypeMemberEntity11.isOperator = isOperator;
|
|
34687
34699
|
function isOrdinaryConstructor(entity) {
|
|
34688
34700
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 1 /* OrdinaryConstructor */;
|
|
34689
34701
|
}
|
|
34690
|
-
|
|
34702
|
+
TypeMemberEntity11.isOrdinaryConstructor = isOrdinaryConstructor;
|
|
34691
34703
|
function isNamedConstructor(entity) {
|
|
34692
34704
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 2 /* NamedConstructor */;
|
|
34693
34705
|
}
|
|
34694
|
-
|
|
34706
|
+
TypeMemberEntity11.isNamedConstructor = isNamedConstructor;
|
|
34695
34707
|
function isOrdinaryOrNamedConstructor(entity) {
|
|
34696
34708
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && (entity.methodKind === 1 /* OrdinaryConstructor */ || entity.methodKind === 2 /* NamedConstructor */);
|
|
34697
34709
|
}
|
|
34698
|
-
|
|
34710
|
+
TypeMemberEntity11.isOrdinaryOrNamedConstructor = isOrdinaryOrNamedConstructor;
|
|
34699
34711
|
function isDestructor(entity) {
|
|
34700
34712
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 3 /* Destructor */;
|
|
34701
34713
|
}
|
|
34702
|
-
|
|
34714
|
+
TypeMemberEntity11.isDestructor = isDestructor;
|
|
34703
34715
|
function isAccessor(entity) {
|
|
34704
34716
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 5 /* Accessor */;
|
|
34705
34717
|
}
|
|
34706
|
-
|
|
34718
|
+
TypeMemberEntity11.isAccessor = isAccessor;
|
|
34707
34719
|
function isAccessorNoCast(entity) {
|
|
34708
34720
|
return entity.kind === 1 /* Function */ && entity.subkind === "method" && entity.methodKind === 5 /* Accessor */;
|
|
34709
34721
|
}
|
|
34710
|
-
|
|
34722
|
+
TypeMemberEntity11.isAccessorNoCast = isAccessorNoCast;
|
|
34711
34723
|
function getTypeOrReturnType(entity) {
|
|
34712
34724
|
switch (entity.kind) {
|
|
34713
34725
|
case 0 /* Variable */:
|
|
@@ -34722,7 +34734,7 @@ var TypeMemberEntity;
|
|
|
34722
34734
|
Debug.never(entity);
|
|
34723
34735
|
}
|
|
34724
34736
|
}
|
|
34725
|
-
|
|
34737
|
+
TypeMemberEntity11.getTypeOrReturnType = getTypeOrReturnType;
|
|
34726
34738
|
})(TypeMemberEntity || (TypeMemberEntity = {}));
|
|
34727
34739
|
|
|
34728
34740
|
// source/entities/TypeMemberKindFlags.ts
|
|
@@ -35000,9 +35012,6 @@ var IntrinsicAnonymousFunctionTypeEntity = class {
|
|
|
35000
35012
|
get dialect() {
|
|
35001
35013
|
return this.containingPackage.dialect;
|
|
35002
35014
|
}
|
|
35003
|
-
getNaming() {
|
|
35004
|
-
return new EntityNaming_anonymous();
|
|
35005
|
-
}
|
|
35006
35015
|
getTypeParameters() {
|
|
35007
35016
|
Debug.assertNotNull(this.typeParameters, "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B-\u0442\u0438\u043F\u044B \u0442\u0438\u043F\u0430 \u043D\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u044B.");
|
|
35008
35017
|
return this.typeParameters;
|
|
@@ -36361,9 +36370,10 @@ var DereferenceOperator = class _DereferenceOperator {
|
|
|
36361
36370
|
|
|
36362
36371
|
// source/entities/EntityLocalizationContext.ts
|
|
36363
36372
|
var EntityLocalizationContext = class {
|
|
36364
|
-
constructor(analyzer,
|
|
36373
|
+
constructor(analyzer, pkg2) {
|
|
36374
|
+
this.localizedPackageByOriginal = /* @__PURE__ */ new Map();
|
|
36365
36375
|
this.analyzer = analyzer;
|
|
36366
|
-
this.
|
|
36376
|
+
this.pkg = pkg2;
|
|
36367
36377
|
}
|
|
36368
36378
|
getLocalizedPackageEntity(entity) {
|
|
36369
36379
|
const result = this.getLocalizedEntity(entity);
|
|
@@ -36496,15 +36506,15 @@ var EntityLocalizationContext = class {
|
|
|
36496
36506
|
getLocalizedEntity(entity) {
|
|
36497
36507
|
const originalEntity = entity.originalEntity;
|
|
36498
36508
|
const originalContainingPackage = originalEntity.getContainingPackage();
|
|
36499
|
-
if (originalContainingPackage === this.
|
|
36500
|
-
return this.
|
|
36509
|
+
if (originalContainingPackage === this.pkg.originalEntity) {
|
|
36510
|
+
return this.getOwnLocalizedEntity(originalEntity);
|
|
36501
36511
|
}
|
|
36502
|
-
const localizedContainingPackage = this.
|
|
36512
|
+
const localizedContainingPackage = this.getLocalizedReferencedPackage(originalContainingPackage);
|
|
36503
36513
|
if (localizedContainingPackage === void 0) {
|
|
36504
36514
|
return entity;
|
|
36505
36515
|
}
|
|
36506
|
-
const
|
|
36507
|
-
return
|
|
36516
|
+
const localizationContext = this.analyzer.getLocalizationContextForPackage(localizedContainingPackage);
|
|
36517
|
+
return localizationContext.getLocalizedEntity(entity);
|
|
36508
36518
|
}
|
|
36509
36519
|
getLocalizedEntityForPossiblyNotLocalizableEntity(entity) {
|
|
36510
36520
|
if (!isLocalizableEntity(entity)) {
|
|
@@ -36602,16 +36612,23 @@ var EntityLocalizationContext = class {
|
|
|
36602
36612
|
this.createLocalizedSubstitutions(parameter.substitutions)
|
|
36603
36613
|
);
|
|
36604
36614
|
}
|
|
36605
|
-
|
|
36615
|
+
getOwnLocalizedEntity(entity) {
|
|
36616
|
+
if (entity.locale === this.pkg.locale) {
|
|
36617
|
+
return entity;
|
|
36618
|
+
}
|
|
36619
|
+
const translationPackage = this.pkg.translation?.translationPackage;
|
|
36620
|
+
if (translationPackage === void 0) {
|
|
36621
|
+
return entity;
|
|
36622
|
+
}
|
|
36606
36623
|
switch (entity.kind) {
|
|
36607
36624
|
case 6 /* Package */:
|
|
36608
|
-
return
|
|
36625
|
+
return translationPackage.getTranslatedTargetPackage() ?? entity;
|
|
36609
36626
|
case 0 /* Variable */: {
|
|
36610
36627
|
switch (entity.subkind) {
|
|
36611
36628
|
case "package":
|
|
36612
|
-
return
|
|
36629
|
+
return translationPackage.getTranslatedPackageMember(entity);
|
|
36613
36630
|
case "field":
|
|
36614
|
-
return
|
|
36631
|
+
return translationPackage.getTranslatedTypeMember(entity);
|
|
36615
36632
|
case "parameter":
|
|
36616
36633
|
return this.getOwnTranslatedParameterEntity(entity);
|
|
36617
36634
|
default:
|
|
@@ -36621,33 +36638,33 @@ var EntityLocalizationContext = class {
|
|
|
36621
36638
|
case 1 /* Function */: {
|
|
36622
36639
|
switch (entity.subkind) {
|
|
36623
36640
|
case "package":
|
|
36624
|
-
return
|
|
36641
|
+
return translationPackage.getTranslatedPackageMember(entity);
|
|
36625
36642
|
case "method":
|
|
36626
|
-
return
|
|
36643
|
+
return translationPackage.getTranslatedTypeMember(entity);
|
|
36627
36644
|
default:
|
|
36628
36645
|
Debug.never(entity);
|
|
36629
36646
|
}
|
|
36630
36647
|
}
|
|
36631
36648
|
case 2 /* Type */:
|
|
36632
|
-
return this.getOwnTranslatedTypeEntity(entity);
|
|
36649
|
+
return this.getOwnTranslatedTypeEntity(entity, translationPackage);
|
|
36633
36650
|
case 3 /* Indexer */:
|
|
36634
|
-
return
|
|
36651
|
+
return translationPackage.getTranslatedTypeMember(entity);
|
|
36635
36652
|
case 4 /* DereferenceOperator */:
|
|
36636
|
-
return
|
|
36653
|
+
return translationPackage.getTranslatedTypeMember(entity);
|
|
36637
36654
|
default:
|
|
36638
36655
|
Debug.never(entity);
|
|
36639
36656
|
}
|
|
36640
36657
|
}
|
|
36641
|
-
getOwnTranslatedTypeEntity(entity) {
|
|
36658
|
+
getOwnTranslatedTypeEntity(entity, translationPackage) {
|
|
36642
36659
|
switch (entity.typeEntityKind) {
|
|
36643
36660
|
case 1 /* Structured */: {
|
|
36644
36661
|
switch (entity.subkind) {
|
|
36645
36662
|
case "package":
|
|
36646
|
-
return
|
|
36663
|
+
return translationPackage.getTranslatedPackageMember(entity);
|
|
36647
36664
|
case "anonymous":
|
|
36648
|
-
return
|
|
36665
|
+
return translationPackage.getTranslatedAnonymousTypeEntity(entity);
|
|
36649
36666
|
case "local":
|
|
36650
|
-
return
|
|
36667
|
+
return translationPackage.getTranslatedLocalTypeEntity(entity);
|
|
36651
36668
|
default:
|
|
36652
36669
|
Debug.never(entity);
|
|
36653
36670
|
}
|
|
@@ -36655,13 +36672,13 @@ var EntityLocalizationContext = class {
|
|
|
36655
36672
|
case 2 /* Parameter */:
|
|
36656
36673
|
return this.getOwnTranslatedTypeParameterEntity(entity);
|
|
36657
36674
|
case 0 /* Function */:
|
|
36658
|
-
return
|
|
36675
|
+
return translationPackage.getTranslatedAnonymousTypeEntity(entity);
|
|
36659
36676
|
case 3 /* Variant */:
|
|
36660
|
-
return
|
|
36677
|
+
return translationPackage.getTranslatedPackageMember(entity);
|
|
36661
36678
|
case 4 /* Alias */:
|
|
36662
36679
|
case 5 /* Reduced */:
|
|
36663
36680
|
case 6 /* Extension */: {
|
|
36664
|
-
return
|
|
36681
|
+
return translationPackage.getTranslatedPackageMember(entity);
|
|
36665
36682
|
}
|
|
36666
36683
|
default:
|
|
36667
36684
|
Debug.never(entity);
|
|
@@ -36731,6 +36748,16 @@ var EntityLocalizationContext = class {
|
|
|
36731
36748
|
Debug.never(containingEntity);
|
|
36732
36749
|
}
|
|
36733
36750
|
}
|
|
36751
|
+
getLocalizedReferencedPackage(entity) {
|
|
36752
|
+
entity = entity.originalEntity;
|
|
36753
|
+
let resultOpt = this.localizedPackageByOriginal.get(entity);
|
|
36754
|
+
if (resultOpt === void 0) {
|
|
36755
|
+
const result = this.analyzer.getLocalizedPackageWithLocale(entity, this.pkg.locale);
|
|
36756
|
+
resultOpt = Option.fromNullable(result);
|
|
36757
|
+
this.localizedPackageByOriginal.set(entity, resultOpt);
|
|
36758
|
+
}
|
|
36759
|
+
return resultOpt.toNullable();
|
|
36760
|
+
}
|
|
36734
36761
|
};
|
|
36735
36762
|
function isLocalizableEntity(entity) {
|
|
36736
36763
|
if (entity.kind === 6 /* Package */ || entity.kind === 0 /* Variable */ && (entity.subkind === "package" || entity.subkind === "field" || entity.subkind === "parameter") || entity.kind === 1 /* Function */ && (entity.subkind === "package" || entity.subkind === "method") || entity.kind === 2 /* Type */ || entity.kind === 3 /* Indexer */ || entity.kind === 4 /* DereferenceOperator */) {
|
|
@@ -61106,9 +61133,10 @@ var TypeArgumentInferrerCore = class {
|
|
|
61106
61133
|
}
|
|
61107
61134
|
const notCheckedSourceTypes = checkedSourceTypes.length === 0 ? sourceTypes : sourceTypes.filter((t) => !checkedSourceTypes.some((c) => c.equals(t)));
|
|
61108
61135
|
const notCheckedTargetTypes = checkedTargetTypes.length === 0 ? targetTypes : targetTypes.filter((t) => !checkedTargetTypes.some((c) => c.equals(t)));
|
|
61109
|
-
|
|
61136
|
+
if (notCheckedSourceTypes.length > 0 && notCheckedTargetTypes.length > 0) {
|
|
61137
|
+
const newSourceType = this.analyzer.typeFactory.getUnionType(notCheckedSourceTypes);
|
|
61110
61138
|
for (const constituentTargetType of notCheckedTargetTypes) {
|
|
61111
|
-
this.inferFromTypes(
|
|
61139
|
+
this.inferFromTypes(newSourceType, constituentTargetType, priority);
|
|
61112
61140
|
}
|
|
61113
61141
|
}
|
|
61114
61142
|
}
|
|
@@ -61131,8 +61159,13 @@ var TypeArgumentInferrerCore = class {
|
|
|
61131
61159
|
if (inferenceState.inferredType.hasValue) {
|
|
61132
61160
|
result = inferenceState.inferredType.getCachedValue();
|
|
61133
61161
|
} else {
|
|
61134
|
-
|
|
61135
|
-
|
|
61162
|
+
const candidates = inferenceState.candidates;
|
|
61163
|
+
if (candidates.length > 0) {
|
|
61164
|
+
if (candidates.length === 1) {
|
|
61165
|
+
result = candidates[0];
|
|
61166
|
+
} else {
|
|
61167
|
+
result = void 0;
|
|
61168
|
+
}
|
|
61136
61169
|
} else {
|
|
61137
61170
|
const defaultType = inferenceState.typeParameter.getDefaultType();
|
|
61138
61171
|
if (defaultType !== void 0) {
|
|
@@ -61569,17 +61602,13 @@ function visitTypeRecursively(type, cb, state) {
|
|
|
61569
61602
|
}
|
|
61570
61603
|
return void 0;
|
|
61571
61604
|
case "function":
|
|
61572
|
-
|
|
61573
|
-
|
|
61574
|
-
|
|
61575
|
-
|
|
61576
|
-
const result2 = visitTypeRecursively(parameter.getType(), cb, state);
|
|
61577
|
-
if (result2 !== void 0) {
|
|
61578
|
-
return result2;
|
|
61579
|
-
}
|
|
61605
|
+
for (const parameter of type.getParameters()) {
|
|
61606
|
+
const result2 = visitTypeRecursively(parameter.getType(), cb, state);
|
|
61607
|
+
if (result2 !== void 0) {
|
|
61608
|
+
return result2;
|
|
61580
61609
|
}
|
|
61581
|
-
return visitTypeRecursively(type.getReturnType(), cb, state);
|
|
61582
61610
|
}
|
|
61611
|
+
return visitTypeRecursively(type.getReturnType(), cb, state);
|
|
61583
61612
|
case "variant":
|
|
61584
61613
|
if (type.entity.getNaming().kind === "named") {
|
|
61585
61614
|
return visitSubstitutionsRecursively(type.substitutions, cb, state);
|
|
@@ -61627,7 +61656,7 @@ function visitSubstitutionsRecursively(substitutions, cb, state) {
|
|
|
61627
61656
|
|
|
61628
61657
|
// source/entities/translated/TranslatedAliasTypeEntity.ts
|
|
61629
61658
|
var TranslatedAliasTypeEntity = class {
|
|
61630
|
-
constructor(originalEntity, translation, name) {
|
|
61659
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
61631
61660
|
this.kind = 2 /* Type */;
|
|
61632
61661
|
this.typeEntityKind = 4 /* Alias */;
|
|
61633
61662
|
this.subkind = "package";
|
|
@@ -61639,6 +61668,7 @@ var TranslatedAliasTypeEntity = class {
|
|
|
61639
61668
|
);
|
|
61640
61669
|
this.originalEntity = originalEntity;
|
|
61641
61670
|
this.translation = translation;
|
|
61671
|
+
this.localizationContext = localizationContext;
|
|
61642
61672
|
this.name = name;
|
|
61643
61673
|
}
|
|
61644
61674
|
get locale() {
|
|
@@ -61647,9 +61677,6 @@ var TranslatedAliasTypeEntity = class {
|
|
|
61647
61677
|
get dialect() {
|
|
61648
61678
|
return this.originalEntity.dialect;
|
|
61649
61679
|
}
|
|
61650
|
-
get localizationContext() {
|
|
61651
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
61652
|
-
}
|
|
61653
61680
|
getName() {
|
|
61654
61681
|
return this.name;
|
|
61655
61682
|
}
|
|
@@ -61699,7 +61726,7 @@ var LocalizedAliasedType = class extends AliasedType {
|
|
|
61699
61726
|
|
|
61700
61727
|
// source/entities/translated/TranslatedFunctionEntity.ts
|
|
61701
61728
|
var TranslatedPackageFunctionEntity = class {
|
|
61702
|
-
constructor(originalEntity, translation, name) {
|
|
61729
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
61703
61730
|
this.kind = 1 /* Function */;
|
|
61704
61731
|
this.subkind = "package";
|
|
61705
61732
|
this.containingPackage = new Cached();
|
|
@@ -61711,6 +61738,7 @@ var TranslatedPackageFunctionEntity = class {
|
|
|
61711
61738
|
);
|
|
61712
61739
|
this.originalEntity = originalEntity;
|
|
61713
61740
|
this.translation = translation;
|
|
61741
|
+
this.localizationContext = localizationContext;
|
|
61714
61742
|
this.name = name;
|
|
61715
61743
|
}
|
|
61716
61744
|
get functionKind() {
|
|
@@ -61728,9 +61756,6 @@ var TranslatedPackageFunctionEntity = class {
|
|
|
61728
61756
|
get dialect() {
|
|
61729
61757
|
return this.originalEntity.dialect;
|
|
61730
61758
|
}
|
|
61731
|
-
get localizationContext() {
|
|
61732
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
61733
|
-
}
|
|
61734
61759
|
getContainingPackage() {
|
|
61735
61760
|
return this.containingPackage.getOrInsertWith(() => this.localizationContext.getLocalizedPackageEntity(this.originalEntity.getContainingPackage()));
|
|
61736
61761
|
}
|
|
@@ -62045,7 +62070,7 @@ IntrinsicTranslatedConstructorEntity = __decorateClass([
|
|
|
62045
62070
|
|
|
62046
62071
|
// source/entities/translated/TranslatedTypeParameterEntity.ts
|
|
62047
62072
|
var TranslatedTypeParameterEntity = class {
|
|
62048
|
-
constructor(originalEntity, translation, name, translatedContainingEntity) {
|
|
62073
|
+
constructor(originalEntity, translation, localizationContext, name, translatedContainingEntity) {
|
|
62049
62074
|
this.kind = 2 /* Type */;
|
|
62050
62075
|
this.typeEntityKind = 2 /* Parameter */;
|
|
62051
62076
|
this.containingPackage = new Cached();
|
|
@@ -62057,6 +62082,7 @@ var TranslatedTypeParameterEntity = class {
|
|
|
62057
62082
|
);
|
|
62058
62083
|
this.originalEntity = originalEntity;
|
|
62059
62084
|
this.translation = translation;
|
|
62085
|
+
this.localizationContext = localizationContext;
|
|
62060
62086
|
this.name = name;
|
|
62061
62087
|
this.containingEntity = translatedContainingEntity;
|
|
62062
62088
|
}
|
|
@@ -62066,9 +62092,6 @@ var TranslatedTypeParameterEntity = class {
|
|
|
62066
62092
|
get dialect() {
|
|
62067
62093
|
return this.originalEntity.dialect;
|
|
62068
62094
|
}
|
|
62069
|
-
get localizationContext() {
|
|
62070
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62071
|
-
}
|
|
62072
62095
|
getName() {
|
|
62073
62096
|
return this.name;
|
|
62074
62097
|
}
|
|
@@ -62138,7 +62161,7 @@ var LocalizedTypeParameterConstraint = class extends TypeParameterConstraint {
|
|
|
62138
62161
|
|
|
62139
62162
|
// source/entities/translated/BaseTranslatedTypeMemberAccessorEntity.ts
|
|
62140
62163
|
var BaseTranslatedTypeMemberAccessorEntity = class extends BaseTypeMemberAccessorEntity {
|
|
62141
|
-
constructor(analyzer, originalEntity, translation, translatedOwningEntity) {
|
|
62164
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedOwningEntity) {
|
|
62142
62165
|
super();
|
|
62143
62166
|
this.typeParameters = new Cached();
|
|
62144
62167
|
this.returnType = new Cached();
|
|
@@ -62146,6 +62169,7 @@ var BaseTranslatedTypeMemberAccessorEntity = class extends BaseTypeMemberAccesso
|
|
|
62146
62169
|
this.analyzer = analyzer;
|
|
62147
62170
|
this.originalEntity = originalEntity;
|
|
62148
62171
|
this.translation = translation;
|
|
62172
|
+
this.localizationContext = localizationContext;
|
|
62149
62173
|
this.translatedOwningEntity = translatedOwningEntity;
|
|
62150
62174
|
}
|
|
62151
62175
|
get accessorKind() {
|
|
@@ -62160,9 +62184,6 @@ var BaseTranslatedTypeMemberAccessorEntity = class extends BaseTypeMemberAccesso
|
|
|
62160
62184
|
get dialect() {
|
|
62161
62185
|
return this.originalEntity.dialect;
|
|
62162
62186
|
}
|
|
62163
|
-
get localizationContext() {
|
|
62164
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62165
|
-
}
|
|
62166
62187
|
getAccessorOwner() {
|
|
62167
62188
|
return MaybeLazy.getValue(this.translatedOwningEntity);
|
|
62168
62189
|
}
|
|
@@ -62170,7 +62191,7 @@ var BaseTranslatedTypeMemberAccessorEntity = class extends BaseTypeMemberAccesso
|
|
|
62170
62191
|
return this.typeParameters.getOrInsertWith(() => this.originalEntity.getTypeParameters().map((p) => new TranslatedTypeParameterEntity(p, new Translation(
|
|
62171
62192
|
this.translation.translationPackage,
|
|
62172
62193
|
new IntrinsicTranslationDefinition()
|
|
62173
|
-
), p.getName(), this)));
|
|
62194
|
+
), this.localizationContext, p.getName(), this)));
|
|
62174
62195
|
}
|
|
62175
62196
|
getTypeParametersArity() {
|
|
62176
62197
|
return this.originalEntity.getTypeParametersArity();
|
|
@@ -62218,7 +62239,7 @@ var BaseTranslatedTypeMemberAccessorEntity = class extends BaseTypeMemberAccesso
|
|
|
62218
62239
|
|
|
62219
62240
|
// source/entities/translated/TranslatedParameterEntity.ts
|
|
62220
62241
|
var TranslatedParameterEntity = class {
|
|
62221
|
-
constructor(originalEntity, translation, name, translatedContainingEntity) {
|
|
62242
|
+
constructor(originalEntity, translation, localizationContext, name, translatedContainingEntity) {
|
|
62222
62243
|
this.kind = 0 /* Variable */;
|
|
62223
62244
|
this.subkind = "parameter";
|
|
62224
62245
|
this.containingPackage = new Cached();
|
|
@@ -62229,6 +62250,7 @@ var TranslatedParameterEntity = class {
|
|
|
62229
62250
|
);
|
|
62230
62251
|
this.originalEntity = originalEntity;
|
|
62231
62252
|
this.translation = translation;
|
|
62253
|
+
this.localizationContext = localizationContext;
|
|
62232
62254
|
if (this.isObjectParameter() && name.key !== specialNameKeys.objectParameter) {
|
|
62233
62255
|
name = new Name(name.unescapedOriginal, name.flags, specialNameKeys.objectParameter);
|
|
62234
62256
|
}
|
|
@@ -62241,9 +62263,6 @@ var TranslatedParameterEntity = class {
|
|
|
62241
62263
|
get dialect() {
|
|
62242
62264
|
return this.originalEntity.dialect;
|
|
62243
62265
|
}
|
|
62244
|
-
get localizationContext() {
|
|
62245
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62246
|
-
}
|
|
62247
62266
|
getContainingEntity() {
|
|
62248
62267
|
return this.containingEntity;
|
|
62249
62268
|
}
|
|
@@ -62300,8 +62319,8 @@ TranslatedParameterEntity = __decorateClass([
|
|
|
62300
62319
|
|
|
62301
62320
|
// source/entities/translated/TranslatedTypeMemberAccessorEntity.ts
|
|
62302
62321
|
var TranslatedTypeMemberAccessorEntity = class extends BaseTranslatedTypeMemberAccessorEntity {
|
|
62303
|
-
constructor(analyzer, originalEntity, translation, translatedOwningEntity) {
|
|
62304
|
-
super(analyzer, originalEntity, translation, translatedOwningEntity);
|
|
62322
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedOwningEntity) {
|
|
62323
|
+
super(analyzer, originalEntity, translation, localizationContext, translatedOwningEntity);
|
|
62305
62324
|
this.parameters = new Cached();
|
|
62306
62325
|
}
|
|
62307
62326
|
getParameters() {
|
|
@@ -62320,7 +62339,13 @@ var TranslatedTypeMemberAccessorEntity = class extends BaseTranslatedTypeMemberA
|
|
|
62320
62339
|
this.translation.translationPackage,
|
|
62321
62340
|
new IntrinsicTranslationDefinition()
|
|
62322
62341
|
);
|
|
62323
|
-
return [new TranslatedParameterEntity(
|
|
62342
|
+
return [new TranslatedParameterEntity(
|
|
62343
|
+
originalParameters[0],
|
|
62344
|
+
translation,
|
|
62345
|
+
this.localizationContext,
|
|
62346
|
+
name,
|
|
62347
|
+
this
|
|
62348
|
+
)];
|
|
62324
62349
|
}
|
|
62325
62350
|
break;
|
|
62326
62351
|
}
|
|
@@ -62334,7 +62359,7 @@ var TranslatedTypeMemberAccessorEntity = class extends BaseTranslatedTypeMemberA
|
|
|
62334
62359
|
this.translation.translationPackage,
|
|
62335
62360
|
new IntrinsicTranslationDefinition()
|
|
62336
62361
|
);
|
|
62337
|
-
return new TranslatedParameterEntity(original, translation, name, this);
|
|
62362
|
+
return new TranslatedParameterEntity(original, translation, this.localizationContext, name, this);
|
|
62338
62363
|
}).toArray();
|
|
62339
62364
|
}
|
|
62340
62365
|
} else {
|
|
@@ -62346,7 +62371,7 @@ var TranslatedTypeMemberAccessorEntity = class extends BaseTranslatedTypeMemberA
|
|
|
62346
62371
|
this.translation.translationPackage,
|
|
62347
62372
|
new IntrinsicTranslationDefinition()
|
|
62348
62373
|
);
|
|
62349
|
-
return new TranslatedParameterEntity(original, translation2, name2, this);
|
|
62374
|
+
return new TranslatedParameterEntity(original, translation2, this.localizationContext, name2, this);
|
|
62350
62375
|
}).toArray();
|
|
62351
62376
|
const lastOriginalParameter = originalParameters[originalParameters.length - 1];
|
|
62352
62377
|
const name = LocalizationHelperA.localizeReservedName(1 /* Value */, this.locale);
|
|
@@ -62354,7 +62379,13 @@ var TranslatedTypeMemberAccessorEntity = class extends BaseTranslatedTypeMemberA
|
|
|
62354
62379
|
this.translation.translationPackage,
|
|
62355
62380
|
new IntrinsicTranslationDefinition()
|
|
62356
62381
|
);
|
|
62357
|
-
result.push(new TranslatedParameterEntity(
|
|
62382
|
+
result.push(new TranslatedParameterEntity(
|
|
62383
|
+
lastOriginalParameter,
|
|
62384
|
+
translation,
|
|
62385
|
+
this.localizationContext,
|
|
62386
|
+
name,
|
|
62387
|
+
this
|
|
62388
|
+
));
|
|
62358
62389
|
}
|
|
62359
62390
|
}
|
|
62360
62391
|
break;
|
|
@@ -62368,7 +62399,7 @@ var TranslatedTypeMemberAccessorEntity = class extends BaseTranslatedTypeMemberA
|
|
|
62368
62399
|
this.translation.translationPackage,
|
|
62369
62400
|
new IntrinsicTranslationDefinition()
|
|
62370
62401
|
);
|
|
62371
|
-
return new TranslatedParameterEntity(p, translation, name, this);
|
|
62402
|
+
return new TranslatedParameterEntity(p, translation, this.localizationContext, name, this);
|
|
62372
62403
|
});
|
|
62373
62404
|
});
|
|
62374
62405
|
}
|
|
@@ -62379,7 +62410,7 @@ TranslatedTypeMemberAccessorEntity = __decorateClass([
|
|
|
62379
62410
|
|
|
62380
62411
|
// source/entities/translated/TranslatedDereferenceOperatorEntity.ts
|
|
62381
62412
|
var TranslatedDereferenceOperatorEntity = class {
|
|
62382
|
-
constructor(analyzer, originalEntity, translation, translatedContainingEntity) {
|
|
62413
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedContainingEntity) {
|
|
62383
62414
|
this.kind = 4 /* DereferenceOperator */;
|
|
62384
62415
|
this.containingPackage = new Cached();
|
|
62385
62416
|
this.type = new Cached();
|
|
@@ -62395,6 +62426,7 @@ var TranslatedDereferenceOperatorEntity = class {
|
|
|
62395
62426
|
this.analyzer = analyzer;
|
|
62396
62427
|
this.originalEntity = originalEntity;
|
|
62397
62428
|
this.translation = translation;
|
|
62429
|
+
this.localizationContext = localizationContext;
|
|
62398
62430
|
this.containingType = translatedContainingEntity;
|
|
62399
62431
|
}
|
|
62400
62432
|
get kindFlag() {
|
|
@@ -62406,9 +62438,6 @@ var TranslatedDereferenceOperatorEntity = class {
|
|
|
62406
62438
|
get dialect() {
|
|
62407
62439
|
return this.originalEntity.dialect;
|
|
62408
62440
|
}
|
|
62409
|
-
get localizationContext() {
|
|
62410
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62411
|
-
}
|
|
62412
62441
|
getContainingType() {
|
|
62413
62442
|
return this.containingType;
|
|
62414
62443
|
}
|
|
@@ -62434,6 +62463,7 @@ var TranslatedDereferenceOperatorEntity = class {
|
|
|
62434
62463
|
this.analyzer,
|
|
62435
62464
|
originalGetter,
|
|
62436
62465
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
62466
|
+
this.localizationContext,
|
|
62437
62467
|
this
|
|
62438
62468
|
) : void 0;
|
|
62439
62469
|
});
|
|
@@ -62445,6 +62475,7 @@ var TranslatedDereferenceOperatorEntity = class {
|
|
|
62445
62475
|
this.analyzer,
|
|
62446
62476
|
originalSetter,
|
|
62447
62477
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
62478
|
+
this.localizationContext,
|
|
62448
62479
|
this
|
|
62449
62480
|
) : void 0;
|
|
62450
62481
|
});
|
|
@@ -62495,7 +62526,7 @@ TranslatedDereferenceOperatorEntity = __decorateClass([
|
|
|
62495
62526
|
|
|
62496
62527
|
// source/entities/translated/TranslatedExtensionTypeEntity.ts
|
|
62497
62528
|
var TranslatedExtensionTypeEntity = class {
|
|
62498
|
-
constructor(originalEntity, translation, name) {
|
|
62529
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
62499
62530
|
this.kind = 2 /* Type */;
|
|
62500
62531
|
this.typeEntityKind = 6 /* Extension */;
|
|
62501
62532
|
this.containingPackage = new Cached();
|
|
@@ -62506,6 +62537,7 @@ var TranslatedExtensionTypeEntity = class {
|
|
|
62506
62537
|
);
|
|
62507
62538
|
this.originalEntity = originalEntity;
|
|
62508
62539
|
this.translation = translation;
|
|
62540
|
+
this.localizationContext = localizationContext;
|
|
62509
62541
|
this.name = name;
|
|
62510
62542
|
}
|
|
62511
62543
|
get locale() {
|
|
@@ -62514,9 +62546,6 @@ var TranslatedExtensionTypeEntity = class {
|
|
|
62514
62546
|
get dialect() {
|
|
62515
62547
|
return this.originalEntity.dialect;
|
|
62516
62548
|
}
|
|
62517
|
-
get localizationContext() {
|
|
62518
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62519
|
-
}
|
|
62520
62549
|
getName() {
|
|
62521
62550
|
return this.name;
|
|
62522
62551
|
}
|
|
@@ -62545,7 +62574,7 @@ var TranslatedExtensionTypeEntity = class {
|
|
|
62545
62574
|
|
|
62546
62575
|
// source/entities/translated/TranslatedStructuredTypeEntity.ts
|
|
62547
62576
|
var TranslatedPackageStructuredTypeEntity = class {
|
|
62548
|
-
constructor(originalEntity, translation, name) {
|
|
62577
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
62549
62578
|
this.kind = 2 /* Type */;
|
|
62550
62579
|
this.typeEntityKind = 1 /* Structured */;
|
|
62551
62580
|
this.subkind = "package";
|
|
@@ -62559,6 +62588,7 @@ var TranslatedPackageStructuredTypeEntity = class {
|
|
|
62559
62588
|
);
|
|
62560
62589
|
this.originalEntity = originalEntity;
|
|
62561
62590
|
this.translation = translation;
|
|
62591
|
+
this.localizationContext = localizationContext;
|
|
62562
62592
|
this.name = name;
|
|
62563
62593
|
}
|
|
62564
62594
|
get structuredTypeKind() {
|
|
@@ -62570,9 +62600,6 @@ var TranslatedPackageStructuredTypeEntity = class {
|
|
|
62570
62600
|
get dialect() {
|
|
62571
62601
|
return this.originalEntity.dialect;
|
|
62572
62602
|
}
|
|
62573
|
-
get localizationContext() {
|
|
62574
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62575
|
-
}
|
|
62576
62603
|
getName() {
|
|
62577
62604
|
return this.name;
|
|
62578
62605
|
}
|
|
@@ -62635,7 +62662,7 @@ var TranslatedPackageStructuredTypeEntity = class {
|
|
|
62635
62662
|
}
|
|
62636
62663
|
};
|
|
62637
62664
|
var TranslatedAnonymousStructuredTypeEntity = class {
|
|
62638
|
-
constructor(originalEntity, translation) {
|
|
62665
|
+
constructor(originalEntity, translation, localizationContext) {
|
|
62639
62666
|
this.kind = 2 /* Type */;
|
|
62640
62667
|
this.typeEntityKind = 1 /* Structured */;
|
|
62641
62668
|
this.subkind = "anonymous";
|
|
@@ -62649,6 +62676,7 @@ var TranslatedAnonymousStructuredTypeEntity = class {
|
|
|
62649
62676
|
);
|
|
62650
62677
|
this.originalEntity = originalEntity;
|
|
62651
62678
|
this.translation = translation;
|
|
62679
|
+
this.localizationContext = localizationContext;
|
|
62652
62680
|
}
|
|
62653
62681
|
get structuredTypeKind() {
|
|
62654
62682
|
return this.originalEntity.structuredTypeKind;
|
|
@@ -62659,9 +62687,6 @@ var TranslatedAnonymousStructuredTypeEntity = class {
|
|
|
62659
62687
|
get dialect() {
|
|
62660
62688
|
return this.originalEntity.dialect;
|
|
62661
62689
|
}
|
|
62662
|
-
get localizationContext() {
|
|
62663
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62664
|
-
}
|
|
62665
62690
|
getContainingPackage() {
|
|
62666
62691
|
return this.containingPackage.getOrInsertWith(() => this.localizationContext.getLocalizedPackageEntity(this.originalEntity.getContainingPackage()));
|
|
62667
62692
|
}
|
|
@@ -62728,7 +62753,7 @@ var TranslatedAnonymousStructuredTypeEntity = class {
|
|
|
62728
62753
|
}
|
|
62729
62754
|
};
|
|
62730
62755
|
var TranslatedLocalStructuredTypeEntity = class {
|
|
62731
|
-
constructor(originalEntity, translation, name) {
|
|
62756
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
62732
62757
|
this.kind = 2 /* Type */;
|
|
62733
62758
|
this.typeEntityKind = 1 /* Structured */;
|
|
62734
62759
|
this.subkind = "local";
|
|
@@ -62742,6 +62767,7 @@ var TranslatedLocalStructuredTypeEntity = class {
|
|
|
62742
62767
|
);
|
|
62743
62768
|
this.originalEntity = originalEntity;
|
|
62744
62769
|
this.translation = translation;
|
|
62770
|
+
this.localizationContext = localizationContext;
|
|
62745
62771
|
this.name = name;
|
|
62746
62772
|
}
|
|
62747
62773
|
get structuredTypeKind() {
|
|
@@ -62753,9 +62779,6 @@ var TranslatedLocalStructuredTypeEntity = class {
|
|
|
62753
62779
|
get dialect() {
|
|
62754
62780
|
return this.originalEntity.dialect;
|
|
62755
62781
|
}
|
|
62756
|
-
get localizationContext() {
|
|
62757
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62758
|
-
}
|
|
62759
62782
|
getName() {
|
|
62760
62783
|
return this.name;
|
|
62761
62784
|
}
|
|
@@ -62865,7 +62888,7 @@ var LocalizedWrapperSource = class extends WrapperSourceSource {
|
|
|
62865
62888
|
|
|
62866
62889
|
// source/entities/translated/TranslatedFunctionTypeEntity.ts
|
|
62867
62890
|
var TranslatedAnonymousFunctionTypeEntity = class {
|
|
62868
|
-
constructor(originalEntity, translation) {
|
|
62891
|
+
constructor(originalEntity, translation, localizationContext) {
|
|
62869
62892
|
this.kind = 2 /* Type */;
|
|
62870
62893
|
this.typeEntityKind = 0 /* Function */;
|
|
62871
62894
|
this.subkind = "anonymous";
|
|
@@ -62878,6 +62901,7 @@ var TranslatedAnonymousFunctionTypeEntity = class {
|
|
|
62878
62901
|
);
|
|
62879
62902
|
this.originalEntity = originalEntity;
|
|
62880
62903
|
this.translation = translation;
|
|
62904
|
+
this.localizationContext = localizationContext;
|
|
62881
62905
|
}
|
|
62882
62906
|
get locale() {
|
|
62883
62907
|
return this.translation.locale;
|
|
@@ -62885,17 +62909,9 @@ var TranslatedAnonymousFunctionTypeEntity = class {
|
|
|
62885
62909
|
get dialect() {
|
|
62886
62910
|
return this.originalEntity.dialect;
|
|
62887
62911
|
}
|
|
62888
|
-
get localizationContext() {
|
|
62889
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62890
|
-
}
|
|
62891
62912
|
getContainingPackage() {
|
|
62892
62913
|
return this.containingPackage.getOrInsertWith(() => this.localizationContext.getLocalizedPackageEntity(this.originalEntity.getContainingPackage()));
|
|
62893
62914
|
}
|
|
62894
|
-
getNaming() {
|
|
62895
|
-
const originalNaming = this.originalEntity.getNaming();
|
|
62896
|
-
Debug.assert(originalNaming.kind === "anonymous");
|
|
62897
|
-
return originalNaming;
|
|
62898
|
-
}
|
|
62899
62915
|
getTypeParameters() {
|
|
62900
62916
|
const originalTypeParameters = this.originalEntity.getTypeParameters();
|
|
62901
62917
|
Debug.assert(originalTypeParameters.length === 0);
|
|
@@ -62929,7 +62945,7 @@ var TranslatedAnonymousFunctionTypeEntity = class {
|
|
|
62929
62945
|
|
|
62930
62946
|
// source/entities/translated/TranslatedIndexerEntity.ts
|
|
62931
62947
|
var TranslatedIndexerEntity = class {
|
|
62932
|
-
constructor(analyzer, originalEntity, translation, translatedContainingEntity) {
|
|
62948
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedContainingEntity) {
|
|
62933
62949
|
this.kind = 3 /* Indexer */;
|
|
62934
62950
|
this.containingPackage = new Cached();
|
|
62935
62951
|
this.type = new Cached();
|
|
@@ -62943,6 +62959,7 @@ var TranslatedIndexerEntity = class {
|
|
|
62943
62959
|
this.analyzer = analyzer;
|
|
62944
62960
|
this.originalEntity = originalEntity;
|
|
62945
62961
|
this.translation = translation;
|
|
62962
|
+
this.localizationContext = localizationContext;
|
|
62946
62963
|
this.containingType = translatedContainingEntity;
|
|
62947
62964
|
}
|
|
62948
62965
|
get kindFlag() {
|
|
@@ -62954,9 +62971,6 @@ var TranslatedIndexerEntity = class {
|
|
|
62954
62971
|
get dialect() {
|
|
62955
62972
|
return this.originalEntity.dialect;
|
|
62956
62973
|
}
|
|
62957
|
-
get localizationContext() {
|
|
62958
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
62959
|
-
}
|
|
62960
62974
|
getContainingType() {
|
|
62961
62975
|
return this.containingType;
|
|
62962
62976
|
}
|
|
@@ -63017,11 +63031,12 @@ var UnfinishedIntrinsicTranslatedIndexerEntity = class {
|
|
|
63017
63031
|
get unfinishedValue() {
|
|
63018
63032
|
return this.unfinishedValue_;
|
|
63019
63033
|
}
|
|
63020
|
-
constructor(analyzer, originalEntity, translation, translatedContainingEntity) {
|
|
63034
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedContainingEntity) {
|
|
63021
63035
|
this.unfinishedValue_ = new IntrinsicTranslatedIndexerEntity(
|
|
63022
63036
|
analyzer,
|
|
63023
63037
|
originalEntity,
|
|
63024
63038
|
translation,
|
|
63039
|
+
localizationContext,
|
|
63025
63040
|
translatedContainingEntity
|
|
63026
63041
|
);
|
|
63027
63042
|
}
|
|
@@ -63136,12 +63151,6 @@ var TranslatedNameTranslationPackageEntity = class extends TranslatedPackageEnti
|
|
|
63136
63151
|
getTranslatedTargetPackage() {
|
|
63137
63152
|
return this.originalEntity.getTranslatedTargetPackage();
|
|
63138
63153
|
}
|
|
63139
|
-
getLocalizedReferencedPackagesMap() {
|
|
63140
|
-
return this.originalEntity.getLocalizedReferencedPackagesMap();
|
|
63141
|
-
}
|
|
63142
|
-
getLocalizationContext() {
|
|
63143
|
-
return this.originalEntity.getLocalizationContext();
|
|
63144
|
-
}
|
|
63145
63154
|
getTranslatedPackageMember(entity) {
|
|
63146
63155
|
return this.originalEntity.getTranslatedPackageMember(entity);
|
|
63147
63156
|
}
|
|
@@ -63178,7 +63187,7 @@ var TranslatedTextTranslationPackageEntity = class extends TranslatedPackageEnti
|
|
|
63178
63187
|
|
|
63179
63188
|
// source/entities/translated/TranslatedPackageMemberAccessorEntity.ts
|
|
63180
63189
|
var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAccessorEntity {
|
|
63181
|
-
constructor(analyzer, originalEntity, translation, translatedOwningEntity, accessorKind) {
|
|
63190
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedOwningEntity, accessorKind) {
|
|
63182
63191
|
super();
|
|
63183
63192
|
this.typeParameters = new Cached();
|
|
63184
63193
|
this.parameters = new Cached();
|
|
@@ -63187,6 +63196,7 @@ var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAcces
|
|
|
63187
63196
|
this.analyzer = analyzer;
|
|
63188
63197
|
this.originalEntity = originalEntity;
|
|
63189
63198
|
this.translation = translation;
|
|
63199
|
+
this.localizationContext = localizationContext;
|
|
63190
63200
|
this.translatedOwningEntity = translatedOwningEntity;
|
|
63191
63201
|
this.accessorKind = accessorKind;
|
|
63192
63202
|
}
|
|
@@ -63196,9 +63206,6 @@ var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAcces
|
|
|
63196
63206
|
get dialect() {
|
|
63197
63207
|
return this.originalEntity.dialect;
|
|
63198
63208
|
}
|
|
63199
|
-
get localizationContext() {
|
|
63200
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
63201
|
-
}
|
|
63202
63209
|
getAccessorOwner() {
|
|
63203
63210
|
return this.translatedOwningEntity;
|
|
63204
63211
|
}
|
|
@@ -63206,7 +63213,7 @@ var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAcces
|
|
|
63206
63213
|
return this.typeParameters.getOrInsertWith(() => this.originalEntity.getTypeParameters().map((p) => new TranslatedTypeParameterEntity(p, new Translation(
|
|
63207
63214
|
this.translation.translationPackage,
|
|
63208
63215
|
new IntrinsicTranslationDefinition()
|
|
63209
|
-
), p.getName(), this)));
|
|
63216
|
+
), this.localizationContext, p.getName(), this)));
|
|
63210
63217
|
}
|
|
63211
63218
|
getTypeParametersArity() {
|
|
63212
63219
|
return this.originalEntity.getTypeParametersArity();
|
|
@@ -63225,7 +63232,13 @@ var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAcces
|
|
|
63225
63232
|
this.translation.translationPackage,
|
|
63226
63233
|
new IntrinsicTranslationDefinition()
|
|
63227
63234
|
);
|
|
63228
|
-
return [new TranslatedParameterEntity(
|
|
63235
|
+
return [new TranslatedParameterEntity(
|
|
63236
|
+
originalParameters[0],
|
|
63237
|
+
translation,
|
|
63238
|
+
this.localizationContext,
|
|
63239
|
+
name,
|
|
63240
|
+
this
|
|
63241
|
+
)];
|
|
63229
63242
|
}
|
|
63230
63243
|
break;
|
|
63231
63244
|
}
|
|
@@ -63238,7 +63251,7 @@ var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAcces
|
|
|
63238
63251
|
this.translation.translationPackage,
|
|
63239
63252
|
new IntrinsicTranslationDefinition()
|
|
63240
63253
|
);
|
|
63241
|
-
return new TranslatedParameterEntity(p, translation, name, this);
|
|
63254
|
+
return new TranslatedParameterEntity(p, translation, this.localizationContext, name, this);
|
|
63242
63255
|
});
|
|
63243
63256
|
});
|
|
63244
63257
|
}
|
|
@@ -63267,7 +63280,7 @@ var TranslatedPackageMemberAccessorEntity = class extends BasePackageMemberAcces
|
|
|
63267
63280
|
|
|
63268
63281
|
// source/entities/translated/TranslatedReducedTypeEntity.ts
|
|
63269
63282
|
var TranslatedReducedTypeEntity = class {
|
|
63270
|
-
constructor(originalEntity, translation, name) {
|
|
63283
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
63271
63284
|
this.kind = 2 /* Type */;
|
|
63272
63285
|
this.typeEntityKind = 5 /* Reduced */;
|
|
63273
63286
|
this.subkind = "package";
|
|
@@ -63280,6 +63293,7 @@ var TranslatedReducedTypeEntity = class {
|
|
|
63280
63293
|
);
|
|
63281
63294
|
this.originalEntity = originalEntity;
|
|
63282
63295
|
this.translation = translation;
|
|
63296
|
+
this.localizationContext = localizationContext;
|
|
63283
63297
|
this.name = name;
|
|
63284
63298
|
}
|
|
63285
63299
|
get locale() {
|
|
@@ -63288,9 +63302,6 @@ var TranslatedReducedTypeEntity = class {
|
|
|
63288
63302
|
get dialect() {
|
|
63289
63303
|
return this.originalEntity.dialect;
|
|
63290
63304
|
}
|
|
63291
|
-
get localizationContext() {
|
|
63292
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
63293
|
-
}
|
|
63294
63305
|
getName() {
|
|
63295
63306
|
return this.name;
|
|
63296
63307
|
}
|
|
@@ -63347,7 +63358,7 @@ var LocalizedReductionSource = class extends ReductionSource {
|
|
|
63347
63358
|
// source/entities/translated/TranslatedTypeMemberAccessorStandaloneEntity.ts
|
|
63348
63359
|
var TranslatedTypeMemberAccessorStandaloneEntity = class extends BaseTranslatedTypeMemberAccessorEntity {
|
|
63349
63360
|
constructor(analyzer, originalEntity, translation, translationPackage, translatedOwningEntity, node) {
|
|
63350
|
-
super(analyzer, originalEntity, translation, translatedOwningEntity);
|
|
63361
|
+
super(analyzer, originalEntity, translation, translationPackage.localizationContext, translatedOwningEntity);
|
|
63351
63362
|
this.parameters = new Cached();
|
|
63352
63363
|
this.translationPackage = translationPackage;
|
|
63353
63364
|
this.node = node;
|
|
@@ -63366,7 +63377,7 @@ TranslatedTypeMemberAccessorStandaloneEntity = __decorateClass([
|
|
|
63366
63377
|
|
|
63367
63378
|
// source/entities/translated/TranslatedVariableEntity.ts
|
|
63368
63379
|
var TranslatedPackageVariableEntity = class {
|
|
63369
|
-
constructor(analyzer, originalEntity, translation, name) {
|
|
63380
|
+
constructor(analyzer, originalEntity, translation, localizationContext, name) {
|
|
63370
63381
|
this.kind = 0 /* Variable */;
|
|
63371
63382
|
this.subkind = "package";
|
|
63372
63383
|
this.containingPackage = new Cached();
|
|
@@ -63380,6 +63391,7 @@ var TranslatedPackageVariableEntity = class {
|
|
|
63380
63391
|
this.analyzer = analyzer;
|
|
63381
63392
|
this.originalEntity = originalEntity;
|
|
63382
63393
|
this.translation = translation;
|
|
63394
|
+
this.localizationContext = localizationContext;
|
|
63383
63395
|
this.name = name;
|
|
63384
63396
|
}
|
|
63385
63397
|
get locale() {
|
|
@@ -63388,9 +63400,6 @@ var TranslatedPackageVariableEntity = class {
|
|
|
63388
63400
|
get dialect() {
|
|
63389
63401
|
return this.originalEntity.dialect;
|
|
63390
63402
|
}
|
|
63391
|
-
get localizationContext() {
|
|
63392
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
63393
|
-
}
|
|
63394
63403
|
getContainingPackage() {
|
|
63395
63404
|
return this.containingPackage.getOrInsertWith(() => this.localizationContext.getLocalizedPackageEntity(this.originalEntity.getContainingPackage()));
|
|
63396
63405
|
}
|
|
@@ -63410,6 +63419,7 @@ var TranslatedPackageVariableEntity = class {
|
|
|
63410
63419
|
this.analyzer,
|
|
63411
63420
|
originalGetter,
|
|
63412
63421
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
63422
|
+
this.localizationContext,
|
|
63413
63423
|
this,
|
|
63414
63424
|
0 /* PackageVariableGetter */
|
|
63415
63425
|
) : void 0;
|
|
@@ -63422,6 +63432,7 @@ var TranslatedPackageVariableEntity = class {
|
|
|
63422
63432
|
this.analyzer,
|
|
63423
63433
|
originalSetter,
|
|
63424
63434
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
63435
|
+
this.localizationContext,
|
|
63425
63436
|
this,
|
|
63426
63437
|
1 /* PackageVariableSetter */
|
|
63427
63438
|
) : void 0;
|
|
@@ -63447,7 +63458,7 @@ TranslatedPackageVariableEntity = __decorateClass([
|
|
|
63447
63458
|
entityToStringDecorator
|
|
63448
63459
|
], TranslatedPackageVariableEntity);
|
|
63449
63460
|
var TranslatedFieldEntity = class {
|
|
63450
|
-
constructor(analyzer, originalEntity, translation, name, translatedContainingEntity) {
|
|
63461
|
+
constructor(analyzer, originalEntity, translation, localizationContext, name, translatedContainingEntity) {
|
|
63451
63462
|
this.kind = 0 /* Variable */;
|
|
63452
63463
|
this.subkind = "field";
|
|
63453
63464
|
this.containingPackage = new Cached();
|
|
@@ -63464,6 +63475,7 @@ var TranslatedFieldEntity = class {
|
|
|
63464
63475
|
this.analyzer = analyzer;
|
|
63465
63476
|
this.originalEntity = originalEntity;
|
|
63466
63477
|
this.translation = translation;
|
|
63478
|
+
this.localizationContext = localizationContext;
|
|
63467
63479
|
this.name = name;
|
|
63468
63480
|
this.containingType = translatedContainingEntity;
|
|
63469
63481
|
}
|
|
@@ -63476,9 +63488,6 @@ var TranslatedFieldEntity = class {
|
|
|
63476
63488
|
get dialect() {
|
|
63477
63489
|
return this.originalEntity.dialect;
|
|
63478
63490
|
}
|
|
63479
|
-
get localizationContext() {
|
|
63480
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
63481
|
-
}
|
|
63482
63491
|
getContainingType() {
|
|
63483
63492
|
return this.containingType;
|
|
63484
63493
|
}
|
|
@@ -63548,6 +63557,7 @@ var TranslatedFieldEntity = class {
|
|
|
63548
63557
|
this.analyzer,
|
|
63549
63558
|
originalGetter,
|
|
63550
63559
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
63560
|
+
this.localizationContext,
|
|
63551
63561
|
this
|
|
63552
63562
|
) : void 0;
|
|
63553
63563
|
});
|
|
@@ -63559,6 +63569,7 @@ var TranslatedFieldEntity = class {
|
|
|
63559
63569
|
this.analyzer,
|
|
63560
63570
|
originalSetter,
|
|
63561
63571
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
63572
|
+
this.localizationContext,
|
|
63562
63573
|
this
|
|
63563
63574
|
) : void 0;
|
|
63564
63575
|
});
|
|
@@ -63593,7 +63604,7 @@ TranslatedFieldEntity = __decorateClass([
|
|
|
63593
63604
|
|
|
63594
63605
|
// source/entities/translated/TranslatedVariantTypeEntity.ts
|
|
63595
63606
|
var TranslatedPackageVariantTypeEntity = class {
|
|
63596
|
-
constructor(originalEntity, translation, name) {
|
|
63607
|
+
constructor(originalEntity, translation, localizationContext, name) {
|
|
63597
63608
|
this.kind = 2 /* Type */;
|
|
63598
63609
|
this.typeEntityKind = 3 /* Variant */;
|
|
63599
63610
|
this.subkind = "package";
|
|
@@ -63606,6 +63617,7 @@ var TranslatedPackageVariantTypeEntity = class {
|
|
|
63606
63617
|
);
|
|
63607
63618
|
this.originalEntity = originalEntity;
|
|
63608
63619
|
this.translation = translation;
|
|
63620
|
+
this.localizationContext = localizationContext;
|
|
63609
63621
|
this.name = name;
|
|
63610
63622
|
}
|
|
63611
63623
|
get locale() {
|
|
@@ -63614,9 +63626,6 @@ var TranslatedPackageVariantTypeEntity = class {
|
|
|
63614
63626
|
get dialect() {
|
|
63615
63627
|
return this.originalEntity.dialect;
|
|
63616
63628
|
}
|
|
63617
|
-
get localizationContext() {
|
|
63618
|
-
return this.translation.translationPackage.getLocalizationContext();
|
|
63619
|
-
}
|
|
63620
63629
|
getName() {
|
|
63621
63630
|
return this.name;
|
|
63622
63631
|
}
|
|
@@ -63655,7 +63664,7 @@ var TranslatedPackageVariantTypeEntity = class {
|
|
|
63655
63664
|
// source/entities/translated/source/a/SourceTranslatedAliasTypeEntity.ts
|
|
63656
63665
|
var SourceTranslatedAliasTypeEntity = class extends TranslatedAliasTypeEntity {
|
|
63657
63666
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
63658
|
-
super(originalEntity, translation, name);
|
|
63667
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
63659
63668
|
this.typeParameters = new Cached();
|
|
63660
63669
|
this.translationPackage = translationPackage;
|
|
63661
63670
|
this.node = node;
|
|
@@ -63773,7 +63782,7 @@ SourceTranslatedDestructorEntity = __decorateClass([
|
|
|
63773
63782
|
// source/entities/translated/source/a/SourceTranslatedExtensionTypeEntity.ts
|
|
63774
63783
|
var SourceTranslatedExtensionTypeEntity = class extends TranslatedExtensionTypeEntity {
|
|
63775
63784
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
63776
|
-
super(originalEntity, translation, name);
|
|
63785
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
63777
63786
|
this.typeParameters = new Cached();
|
|
63778
63787
|
this.members = new Cached();
|
|
63779
63788
|
this.translationPackage = translationPackage;
|
|
@@ -63797,7 +63806,7 @@ SourceTranslatedExtensionTypeEntity = __decorateClass([
|
|
|
63797
63806
|
// source/entities/translated/source/a/SourceTranslatedFunctionEntity.ts
|
|
63798
63807
|
var SourceTranslatedPackageFunctionEntity = class extends TranslatedPackageFunctionEntity {
|
|
63799
63808
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
63800
|
-
super(originalEntity, translation, name);
|
|
63809
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
63801
63810
|
this.typeParameters = new Cached();
|
|
63802
63811
|
this.parameters = new Cached();
|
|
63803
63812
|
this.translationPackage = translationPackage;
|
|
@@ -63873,7 +63882,7 @@ SourceTranslatedOrdinaryOrOperatorMethodEntity = __decorateClass([
|
|
|
63873
63882
|
// source/entities/translated/source/a/SourceTranslatedFunctionTypeEntity.ts
|
|
63874
63883
|
var SourceTranslatedAnonymousFunctionTypeEntity = class extends TranslatedAnonymousFunctionTypeEntity {
|
|
63875
63884
|
constructor(originalEntity, translation, translationPackage, node) {
|
|
63876
|
-
super(originalEntity, translation);
|
|
63885
|
+
super(originalEntity, translation, translationPackage.localizationContext);
|
|
63877
63886
|
this.parameters = new Cached();
|
|
63878
63887
|
this.members = new Cached();
|
|
63879
63888
|
this.translationPackage = translationPackage;
|
|
@@ -63897,7 +63906,7 @@ SourceTranslatedAnonymousFunctionTypeEntity = __decorateClass([
|
|
|
63897
63906
|
// source/entities/translated/source/a/SourceTranslatedIndexerEntity.ts
|
|
63898
63907
|
var SourceTranslatedIndexerEntity = class extends TranslatedIndexerEntity {
|
|
63899
63908
|
constructor(analyzer, originalEntity, translation, translationPackage, translatedContainingEntity, node) {
|
|
63900
|
-
super(analyzer, originalEntity, translation, translatedContainingEntity);
|
|
63909
|
+
super(analyzer, originalEntity, translation, translationPackage.localizationContext, translatedContainingEntity);
|
|
63901
63910
|
this.getter = new Cached();
|
|
63902
63911
|
this.setter = new Cached();
|
|
63903
63912
|
this.parameters = new Cached();
|
|
@@ -63918,6 +63927,7 @@ var SourceTranslatedIndexerEntity = class extends TranslatedIndexerEntity {
|
|
|
63918
63927
|
this.analyzer,
|
|
63919
63928
|
originalGetter,
|
|
63920
63929
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
63930
|
+
this.translationPackage.localizationContext,
|
|
63921
63931
|
this
|
|
63922
63932
|
) : void 0;
|
|
63923
63933
|
});
|
|
@@ -63929,6 +63939,7 @@ var SourceTranslatedIndexerEntity = class extends TranslatedIndexerEntity {
|
|
|
63929
63939
|
this.analyzer,
|
|
63930
63940
|
originalSetter,
|
|
63931
63941
|
new Translation(this.translation.translationPackage, new IntrinsicTranslationDefinition()),
|
|
63942
|
+
this.translationPackage.localizationContext,
|
|
63932
63943
|
this
|
|
63933
63944
|
) : void 0;
|
|
63934
63945
|
});
|
|
@@ -63979,7 +63990,7 @@ SourceTranslatedTextTranslationPackageEntity = __decorateClass([
|
|
|
63979
63990
|
// source/entities/translated/source/a/SourceTranslatedPackageStructuredTypeEntity.ts
|
|
63980
63991
|
var SourceTranslatedPackageStructuredTypeEntity = class extends TranslatedPackageStructuredTypeEntity {
|
|
63981
63992
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
63982
|
-
super(originalEntity, translation, name);
|
|
63993
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
63983
63994
|
this.typeParameters = new Cached();
|
|
63984
63995
|
this.members = new Cached();
|
|
63985
63996
|
this.translationPackage = translationPackage;
|
|
@@ -64001,7 +64012,7 @@ SourceTranslatedPackageStructuredTypeEntity = __decorateClass([
|
|
|
64001
64012
|
], SourceTranslatedPackageStructuredTypeEntity);
|
|
64002
64013
|
var SourceTranslatedAnonymousStructuredTypeEntity = class extends TranslatedAnonymousStructuredTypeEntity {
|
|
64003
64014
|
constructor(originalEntity, translation, translationPackage) {
|
|
64004
|
-
super(originalEntity, translation);
|
|
64015
|
+
super(originalEntity, translation, translationPackage.localizationContext);
|
|
64005
64016
|
this.members = new Cached();
|
|
64006
64017
|
this.translationPackage = translationPackage;
|
|
64007
64018
|
}
|
|
@@ -64014,7 +64025,7 @@ SourceTranslatedAnonymousStructuredTypeEntity = __decorateClass([
|
|
|
64014
64025
|
], SourceTranslatedAnonymousStructuredTypeEntity);
|
|
64015
64026
|
var SourceTranslatedLocalStructuredTypeEntity = class extends TranslatedLocalStructuredTypeEntity {
|
|
64016
64027
|
constructor(originalEntity, translation, name, translationPackage) {
|
|
64017
|
-
super(originalEntity, translation, name);
|
|
64028
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
64018
64029
|
this.members = new Cached();
|
|
64019
64030
|
this.translationPackage = translationPackage;
|
|
64020
64031
|
}
|
|
@@ -64029,7 +64040,7 @@ SourceTranslatedLocalStructuredTypeEntity = __decorateClass([
|
|
|
64029
64040
|
// source/entities/translated/source/a/SourceTranslatedPackageVariantTypeEntity.ts
|
|
64030
64041
|
var SourceTranslatedPackageVariantTypeEntity = class extends TranslatedPackageVariantTypeEntity {
|
|
64031
64042
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
64032
|
-
super(originalEntity, translation, name);
|
|
64043
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
64033
64044
|
this.typeParameters = new Cached();
|
|
64034
64045
|
this.members = new Cached();
|
|
64035
64046
|
this.translationPackage = translationPackage;
|
|
@@ -64053,7 +64064,7 @@ SourceTranslatedPackageVariantTypeEntity = __decorateClass([
|
|
|
64053
64064
|
// source/entities/translated/source/a/SourceTranslatedReducedTypeEntity.ts
|
|
64054
64065
|
var SourceTranslatedReducedTypeEntity = class extends TranslatedReducedTypeEntity {
|
|
64055
64066
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
64056
|
-
super(originalEntity, translation, name);
|
|
64067
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
64057
64068
|
this.typeParameters = new Cached();
|
|
64058
64069
|
this.members = new Cached();
|
|
64059
64070
|
this.translationPackage = translationPackage;
|
|
@@ -64356,7 +64367,6 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64356
64367
|
this.package_ = package_;
|
|
64357
64368
|
this.packageEntity = analyzer.entity.ofNameTranslationPackage(package_);
|
|
64358
64369
|
this.targetPackage = targetPackage;
|
|
64359
|
-
this.localizationContext = this.packageEntity.getLocalizationContext();
|
|
64360
64370
|
const translation = new Translation(this.packageEntity, new SourceTranslationDefinition(this.package_, void 0));
|
|
64361
64371
|
switch (targetPackage.subkind) {
|
|
64362
64372
|
case "program":
|
|
@@ -64386,6 +64396,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64386
64396
|
default:
|
|
64387
64397
|
Debug.never(targetPackage);
|
|
64388
64398
|
}
|
|
64399
|
+
this.localizationContext = this.analyzer.getLocalizationContextForPackage(this.translatedTargetPackage);
|
|
64389
64400
|
this.entityNameConflictsValidator = new TranslatedEntityNameConflictsValidator(
|
|
64390
64401
|
this.analyzer,
|
|
64391
64402
|
this.translatedTargetPackage
|
|
@@ -64513,6 +64524,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64513
64524
|
return new TranslatedTypeParameterEntity(
|
|
64514
64525
|
e,
|
|
64515
64526
|
new Translation(this.packageEntity, translationDefinition),
|
|
64527
|
+
this.localizationContext,
|
|
64516
64528
|
name,
|
|
64517
64529
|
containingEntity
|
|
64518
64530
|
);
|
|
@@ -64528,6 +64540,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64528
64540
|
return new TranslatedParameterEntity(
|
|
64529
64541
|
e,
|
|
64530
64542
|
new Translation(this.packageEntity, translationDefinition),
|
|
64543
|
+
this.localizationContext,
|
|
64531
64544
|
name,
|
|
64532
64545
|
containingEntity
|
|
64533
64546
|
);
|
|
@@ -64620,7 +64633,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64620
64633
|
translationDeclaration,
|
|
64621
64634
|
translationDeclaration.translatedName,
|
|
64622
64635
|
(e, t, n) => {
|
|
64623
|
-
const result = new TranslatedPackageVariableEntity(this.analyzer, e, t, n);
|
|
64636
|
+
const result = new TranslatedPackageVariableEntity(this.analyzer, e, t, this.localizationContext, n);
|
|
64624
64637
|
const getter = result.getGetter();
|
|
64625
64638
|
if (getter !== void 0) {
|
|
64626
64639
|
this.translatedEntityByOriginal.set(getter.originalEntity, getter);
|
|
@@ -64774,7 +64787,14 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64774
64787
|
translationDeclaration,
|
|
64775
64788
|
(e, t) => {
|
|
64776
64789
|
const name = translationDeclaration.translatedName.isMissing ? e.getName() : this.analyzer.createNameFromIdentifier(translationDeclaration.translatedName);
|
|
64777
|
-
return new TranslatedFieldEntity(
|
|
64790
|
+
return new TranslatedFieldEntity(
|
|
64791
|
+
this.analyzer,
|
|
64792
|
+
e,
|
|
64793
|
+
t,
|
|
64794
|
+
this.localizationContext,
|
|
64795
|
+
name,
|
|
64796
|
+
translatedTypeEntity
|
|
64797
|
+
);
|
|
64778
64798
|
}
|
|
64779
64799
|
);
|
|
64780
64800
|
}
|
|
@@ -64962,7 +64982,13 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64962
64982
|
const translation = new Translation(this.packageEntity, new IntrinsicTranslationDefinition());
|
|
64963
64983
|
switch (entity.kind) {
|
|
64964
64984
|
case 0 /* Variable */:
|
|
64965
|
-
return new TranslatedPackageVariableEntity(
|
|
64985
|
+
return new TranslatedPackageVariableEntity(
|
|
64986
|
+
this.analyzer,
|
|
64987
|
+
entity,
|
|
64988
|
+
translation,
|
|
64989
|
+
this.localizationContext,
|
|
64990
|
+
entity.getName()
|
|
64991
|
+
);
|
|
64966
64992
|
case 1 /* Function */:
|
|
64967
64993
|
return new SourceTranslatedPackageFunctionEntity(entity, translation, entity.getName(), this, void 0);
|
|
64968
64994
|
case 2 /* Type */: {
|
|
@@ -64999,6 +65025,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
64999
65025
|
this.analyzer,
|
|
65000
65026
|
entity,
|
|
65001
65027
|
translation,
|
|
65028
|
+
this.localizationContext,
|
|
65002
65029
|
entity.getName(),
|
|
65003
65030
|
translatedContainingEntity
|
|
65004
65031
|
);
|
|
@@ -65074,7 +65101,13 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65074
65101
|
void 0
|
|
65075
65102
|
);
|
|
65076
65103
|
case 4 /* DereferenceOperator */:
|
|
65077
|
-
return new TranslatedDereferenceOperatorEntity(
|
|
65104
|
+
return new TranslatedDereferenceOperatorEntity(
|
|
65105
|
+
this.analyzer,
|
|
65106
|
+
entity,
|
|
65107
|
+
translation,
|
|
65108
|
+
this.localizationContext,
|
|
65109
|
+
translatedContainingEntity
|
|
65110
|
+
);
|
|
65078
65111
|
default:
|
|
65079
65112
|
Debug.never(entity);
|
|
65080
65113
|
}
|
|
@@ -65524,7 +65557,13 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65524
65557
|
const nameWithTranslation = translatedNameByParameter.get(p);
|
|
65525
65558
|
const name = nameWithTranslation?.name ?? p.getName();
|
|
65526
65559
|
const translation = nameWithTranslation?.translation ?? new Translation(this.packageEntity, new IntrinsicTranslationDefinition());
|
|
65527
|
-
return new TranslatedParameterEntity(
|
|
65560
|
+
return new TranslatedParameterEntity(
|
|
65561
|
+
p,
|
|
65562
|
+
translation,
|
|
65563
|
+
this.localizationContext,
|
|
65564
|
+
name,
|
|
65565
|
+
translatedConstructor.unfinishedValue
|
|
65566
|
+
);
|
|
65528
65567
|
});
|
|
65529
65568
|
return translatedConstructor.finish(parameters);
|
|
65530
65569
|
}
|
|
@@ -65536,10 +65575,17 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65536
65575
|
return void 0;
|
|
65537
65576
|
}
|
|
65538
65577
|
const localizedOverriddenMember = this.localizationContext.getLocalizedFieldEntity(overriddenMember.entity);
|
|
65539
|
-
return new TranslatedFieldEntity(
|
|
65540
|
-
this.
|
|
65541
|
-
|
|
65542
|
-
|
|
65578
|
+
return new TranslatedFieldEntity(
|
|
65579
|
+
this.analyzer,
|
|
65580
|
+
entity,
|
|
65581
|
+
new Translation(
|
|
65582
|
+
this.packageEntity,
|
|
65583
|
+
new IntrinsicTranslationDefinition()
|
|
65584
|
+
),
|
|
65585
|
+
this.localizationContext,
|
|
65586
|
+
localizedOverriddenMember.getName(),
|
|
65587
|
+
translatedContainingEntity
|
|
65588
|
+
);
|
|
65543
65589
|
}
|
|
65544
65590
|
case 1 /* Function */: {
|
|
65545
65591
|
const overriddenMember = entity.getOverriddenMembers()[0];
|
|
@@ -65555,13 +65601,20 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65555
65601
|
this.localizationContext,
|
|
65556
65602
|
translatedContainingEntity
|
|
65557
65603
|
);
|
|
65558
|
-
const typeParameters = Query.zipLeft(entity.getTypeParameters(), localizedOverriddenMember.getTypeParameters(), (p, bp) => new TranslatedTypeParameterEntity(
|
|
65559
|
-
|
|
65560
|
-
new
|
|
65561
|
-
|
|
65604
|
+
const typeParameters = Query.zipLeft(entity.getTypeParameters(), localizedOverriddenMember.getTypeParameters(), (p, bp) => new TranslatedTypeParameterEntity(
|
|
65605
|
+
p,
|
|
65606
|
+
new Translation(
|
|
65607
|
+
this.packageEntity,
|
|
65608
|
+
new IntrinsicTranslationDefinition()
|
|
65609
|
+
),
|
|
65610
|
+
this.localizationContext,
|
|
65611
|
+
bp?.getName() ?? p.getName(),
|
|
65612
|
+
translatedMember.unfinishedValue
|
|
65613
|
+
)).toArray();
|
|
65562
65614
|
const parameters = Query.zipLeft(entity.getParameters(), localizedOverriddenMember.getParameters(), (p, bp) => new TranslatedParameterEntity(
|
|
65563
65615
|
p,
|
|
65564
65616
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
65617
|
+
this.localizationContext,
|
|
65565
65618
|
bp?.getName() ?? p.getName(),
|
|
65566
65619
|
translatedMember.unfinishedValue
|
|
65567
65620
|
)).toArray();
|
|
@@ -65577,6 +65630,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65577
65630
|
this.analyzer,
|
|
65578
65631
|
entity,
|
|
65579
65632
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
65633
|
+
this.localizationContext,
|
|
65580
65634
|
translatedContainingEntity
|
|
65581
65635
|
);
|
|
65582
65636
|
const originalGetter = entity.getGetter();
|
|
@@ -65584,6 +65638,7 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65584
65638
|
const parameters = Query.zipLeft(entity.getParameters(), localizedOverriddenMember.getParameters(), (p, bp) => new TranslatedParameterEntity(
|
|
65585
65639
|
p,
|
|
65586
65640
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
65641
|
+
this.localizationContext,
|
|
65587
65642
|
bp?.getName() ?? p.getName(),
|
|
65588
65643
|
translatedMember.unfinishedValue
|
|
65589
65644
|
)).toArray();
|
|
@@ -65591,12 +65646,14 @@ var ResolvedNameTranslationPackage = class _ResolvedNameTranslationPackage {
|
|
|
65591
65646
|
this.analyzer,
|
|
65592
65647
|
originalGetter,
|
|
65593
65648
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
65649
|
+
this.localizationContext,
|
|
65594
65650
|
translatedMember.unfinishedValue
|
|
65595
65651
|
) : void 0;
|
|
65596
65652
|
const setter = originalSetter !== void 0 ? new TranslatedTypeMemberAccessorEntity(
|
|
65597
65653
|
this.analyzer,
|
|
65598
65654
|
originalSetter,
|
|
65599
65655
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
65656
|
+
this.localizationContext,
|
|
65600
65657
|
translatedMember.unfinishedValue
|
|
65601
65658
|
) : void 0;
|
|
65602
65659
|
return translatedMember.finish(parameters, getter, setter);
|
|
@@ -68780,7 +68837,7 @@ var ModifierValidator = class _ModifierValidator {
|
|
|
68780
68837
|
const wrapperSource = entity.getWrapperSource()?.cycleFree;
|
|
68781
68838
|
if (wrapperSource !== void 0 && (wrapperSource.entity === void 0 || !TypeEntity.isBaseOrAliasedBase(wrapperSource.entity))) {
|
|
68782
68839
|
this.diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
68783
|
-
|
|
68840
|
+
2285 /* WrapperTypeMarkedWith0ModifierMustBeBasedOnBaseType */,
|
|
68784
68841
|
modifier,
|
|
68785
68842
|
[this.displayModifierNode(modifier)]
|
|
68786
68843
|
));
|
|
@@ -68810,7 +68867,7 @@ var ModifierValidator = class _ModifierValidator {
|
|
|
68810
68867
|
this.reportDuplicateAbstractModifier(modifier, parentGroupFlags);
|
|
68811
68868
|
} else if (entity?.kind === 2 /* Type */ && TypeEntity.isWrapperType(entity)) {
|
|
68812
68869
|
this.diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
68813
|
-
|
|
68870
|
+
2284 /* WrapperTypeCannotBeMarkedWithAbstract0Modifier */,
|
|
68814
68871
|
modifier,
|
|
68815
68872
|
[this.displayModifierNode(modifier)]
|
|
68816
68873
|
));
|
|
@@ -71879,9 +71936,6 @@ var AnonymousFunctionTypeDeclarationEntity = class {
|
|
|
71879
71936
|
get dialect() {
|
|
71880
71937
|
return 0 /* ArtelA */;
|
|
71881
71938
|
}
|
|
71882
|
-
getNaming() {
|
|
71883
|
-
return new EntityNaming_anonymous();
|
|
71884
|
-
}
|
|
71885
71939
|
getTypeParameters() {
|
|
71886
71940
|
return emptyTypeParameterEntities;
|
|
71887
71941
|
}
|
|
@@ -73966,8 +74020,6 @@ var SourceNameTranslationPackageEntity = class extends SourcePackageEntity {
|
|
|
73966
74020
|
super(analyzer);
|
|
73967
74021
|
this.subkind = "name-translation";
|
|
73968
74022
|
this.targetPackage = new Cached();
|
|
73969
|
-
this.localizedReferencedPackagesMap = new Cached();
|
|
73970
|
-
this.localizationContext = new Cached();
|
|
73971
74023
|
this.resolvedTranslationPackage_ = new Cached();
|
|
73972
74024
|
this.package_ = package_;
|
|
73973
74025
|
}
|
|
@@ -73992,12 +74044,6 @@ var SourceNameTranslationPackageEntity = class extends SourcePackageEntity {
|
|
|
73992
74044
|
return new ResolvedNameTranslationPackage(this.analyzer, this.package_, targetPackage);
|
|
73993
74045
|
});
|
|
73994
74046
|
}
|
|
73995
|
-
getLocalizationContext() {
|
|
73996
|
-
return this.localizationContext.getOrInsertWith(() => new EntityLocalizationContext(this.analyzer, this));
|
|
73997
|
-
}
|
|
73998
|
-
getLocalizedReferencedPackagesMap() {
|
|
73999
|
-
return this.localizedReferencedPackagesMap.getOrInsertWith(() => this.analyzer.createLocalizedReferencedPackagesMapForNameTranslationPackage(this));
|
|
74000
|
-
}
|
|
74001
74047
|
getTranslatedPackageMember(entity) {
|
|
74002
74048
|
return this.getResolvedNameTranslationPackage()?.getTranslatedPackageMember(entity) ?? entity;
|
|
74003
74049
|
}
|
|
@@ -74601,6 +74647,18 @@ var NodeOrDiagnosticLocation;
|
|
|
74601
74647
|
}
|
|
74602
74648
|
}
|
|
74603
74649
|
NodeOrDiagnosticLocation2.getDiagnosticArgumentFactory = getDiagnosticArgumentFactory;
|
|
74650
|
+
function getLocalizationContext(nodeOrLocation, analyzer) {
|
|
74651
|
+
if (isNodeA(nodeOrLocation)) {
|
|
74652
|
+
const packageEntity2 = TreeQuery.getPackageEntity(nodeOrLocation, analyzer.dialectA);
|
|
74653
|
+
return analyzer.getLocalizationContextForPackage(packageEntity2);
|
|
74654
|
+
} else if (isNodeM(nodeOrLocation)) {
|
|
74655
|
+
const packageEntity2 = TreeQuery2.getPackageEntity(nodeOrLocation, analyzer.dialectM);
|
|
74656
|
+
return analyzer.getLocalizationContextForPackage(packageEntity2);
|
|
74657
|
+
} else {
|
|
74658
|
+
return nodeOrLocation.getLocalizationContext(analyzer);
|
|
74659
|
+
}
|
|
74660
|
+
}
|
|
74661
|
+
NodeOrDiagnosticLocation2.getLocalizationContext = getLocalizationContext;
|
|
74604
74662
|
})(NodeOrDiagnosticLocation || (NodeOrDiagnosticLocation = {}));
|
|
74605
74663
|
|
|
74606
74664
|
// source/entities/source/a/SourceStructuredTypeEntity.ts
|
|
@@ -76455,9 +76513,6 @@ var TsAnonymousFunctionTypeEntity = class {
|
|
|
76455
76513
|
get dialect() {
|
|
76456
76514
|
return this.containingPackage.dialect;
|
|
76457
76515
|
}
|
|
76458
|
-
getNaming() {
|
|
76459
|
-
return new EntityNaming_anonymous();
|
|
76460
|
-
}
|
|
76461
76516
|
getTypeParameters() {
|
|
76462
76517
|
return emptyTypeParameterEntities;
|
|
76463
76518
|
}
|
|
@@ -78715,7 +78770,7 @@ var LocalizedWellKnownDeclarations = class {
|
|
|
78715
78770
|
entity.getContainingPackage(),
|
|
78716
78771
|
this.locale
|
|
78717
78772
|
);
|
|
78718
|
-
return localizedContainingPackage
|
|
78773
|
+
return localizedContainingPackage !== void 0 ? this.analyzer.getLocalizationContextForPackage(localizedContainingPackage) : void 0;
|
|
78719
78774
|
}
|
|
78720
78775
|
};
|
|
78721
78776
|
var LocalizedWellKnownDeclarationsA = class extends LocalizedWellKnownDeclarations {
|
|
@@ -81681,7 +81736,7 @@ var SourceFileAnalyzer = class {
|
|
|
81681
81736
|
if (defaultMatchNodes.length > 1) {
|
|
81682
81737
|
for (const node2 of defaultMatchNodes) {
|
|
81683
81738
|
this.addDiagnostic(this.analyzer.createDiagnostic(
|
|
81684
|
-
|
|
81739
|
+
2305 /* SwitchStatementMustHaveOnlyOneDefaultMatchExpression */,
|
|
81685
81740
|
node2
|
|
81686
81741
|
));
|
|
81687
81742
|
}
|
|
@@ -83236,266 +83291,6 @@ var DialectSpecificBoundTypeMemberLookup;
|
|
|
83236
83291
|
DialectSpecificBoundTypeMemberLookup2.ofTypeEntity = ofTypeEntity;
|
|
83237
83292
|
})(DialectSpecificBoundTypeMemberLookup || (DialectSpecificBoundTypeMemberLookup = {}));
|
|
83238
83293
|
|
|
83239
|
-
// source/analysis/ReferencedPackagesCollector.ts
|
|
83240
|
-
var ReferencedPackagesCollector = class {
|
|
83241
|
-
constructor(packageEntity2) {
|
|
83242
|
-
this.packageEntity = packageEntity2;
|
|
83243
|
-
this.referencedPackages = /* @__PURE__ */ new Set();
|
|
83244
|
-
this.visitedAnonymousTypes = /* @__PURE__ */ new Set();
|
|
83245
|
-
}
|
|
83246
|
-
collect() {
|
|
83247
|
-
this.visitPackageEntity(this.packageEntity);
|
|
83248
|
-
return Array.from(this.referencedPackages);
|
|
83249
|
-
}
|
|
83250
|
-
visitPackageEntity(entity) {
|
|
83251
|
-
const members = entity.getMembers();
|
|
83252
|
-
for (const member of members.getNamedMembers()) {
|
|
83253
|
-
switch (member.kind) {
|
|
83254
|
-
case 0 /* Variable */:
|
|
83255
|
-
this.visitType(member.getType());
|
|
83256
|
-
break;
|
|
83257
|
-
case 1 /* Function */:
|
|
83258
|
-
this.visitTypeParameterEntities(member.getTypeParameters());
|
|
83259
|
-
this.visitParameterEntities(member.getParameters());
|
|
83260
|
-
this.visitType(member.getReturnType());
|
|
83261
|
-
break;
|
|
83262
|
-
case 2 /* Type */:
|
|
83263
|
-
this.visitTypeEntity(member, true);
|
|
83264
|
-
break;
|
|
83265
|
-
default:
|
|
83266
|
-
Debug.never(member);
|
|
83267
|
-
}
|
|
83268
|
-
}
|
|
83269
|
-
}
|
|
83270
|
-
visitTypeParameterEntities(entities) {
|
|
83271
|
-
for (const entity of entities) {
|
|
83272
|
-
this.visitTypeParameterEntity(entity, true);
|
|
83273
|
-
}
|
|
83274
|
-
}
|
|
83275
|
-
visitParameterEntities(entities) {
|
|
83276
|
-
for (const entity of entities) {
|
|
83277
|
-
this.visitType(entity.getType());
|
|
83278
|
-
}
|
|
83279
|
-
}
|
|
83280
|
-
visitTypeEntity(entity, isDeclaration) {
|
|
83281
|
-
if (isAnonymousTypeEntity(entity)) {
|
|
83282
|
-
if (this.visitedAnonymousTypes.has(entity)) {
|
|
83283
|
-
return;
|
|
83284
|
-
}
|
|
83285
|
-
this.visitedAnonymousTypes.add(entity);
|
|
83286
|
-
}
|
|
83287
|
-
switch (entity.typeEntityKind) {
|
|
83288
|
-
case 1 /* Structured */:
|
|
83289
|
-
this.visitStructuredTypeEntity(entity, isDeclaration);
|
|
83290
|
-
break;
|
|
83291
|
-
case 0 /* Function */:
|
|
83292
|
-
this.visitFunctionTypeEntity(entity, isDeclaration);
|
|
83293
|
-
break;
|
|
83294
|
-
case 3 /* Variant */:
|
|
83295
|
-
this.visitVariantTypeEntity(entity, isDeclaration);
|
|
83296
|
-
break;
|
|
83297
|
-
case 4 /* Alias */:
|
|
83298
|
-
this.visitAliasTypeEntity(entity, isDeclaration);
|
|
83299
|
-
break;
|
|
83300
|
-
case 5 /* Reduced */:
|
|
83301
|
-
this.visitReducedTypeEntity(entity, isDeclaration);
|
|
83302
|
-
break;
|
|
83303
|
-
case 6 /* Extension */:
|
|
83304
|
-
this.visitExtensionTypeEntity(entity, isDeclaration);
|
|
83305
|
-
break;
|
|
83306
|
-
case 2 /* Parameter */:
|
|
83307
|
-
this.visitTypeParameterEntity(entity, isDeclaration);
|
|
83308
|
-
break;
|
|
83309
|
-
default:
|
|
83310
|
-
Debug.never(entity);
|
|
83311
|
-
}
|
|
83312
|
-
}
|
|
83313
|
-
visitStructuredTypeEntity(entity, isDeclaration) {
|
|
83314
|
-
if (!isDeclaration) {
|
|
83315
|
-
this.recordEntityUsage(entity);
|
|
83316
|
-
}
|
|
83317
|
-
if (isDeclaration || entity.subkind === "anonymous") {
|
|
83318
|
-
this.visitTypeParameterEntities(entity.getTypeParameters());
|
|
83319
|
-
const baseTypes = entity.getBaseTypes().values;
|
|
83320
|
-
for (const baseType of baseTypes) {
|
|
83321
|
-
this.visitType(baseType);
|
|
83322
|
-
}
|
|
83323
|
-
this.visitTypeEntityMembers(entity.getMembers());
|
|
83324
|
-
}
|
|
83325
|
-
}
|
|
83326
|
-
visitFunctionTypeEntity(entity, isDeclaration) {
|
|
83327
|
-
if (!isDeclaration) {
|
|
83328
|
-
this.recordEntityUsage(entity);
|
|
83329
|
-
}
|
|
83330
|
-
if (isDeclaration || entity.subkind === "anonymous") {
|
|
83331
|
-
this.visitTypeParameterEntities(entity.getTypeParameters());
|
|
83332
|
-
this.visitParameterEntities(entity.getParameters());
|
|
83333
|
-
this.visitType(entity.getReturnType());
|
|
83334
|
-
const baseTypes = entity.getBaseTypes().values;
|
|
83335
|
-
for (const baseType of baseTypes) {
|
|
83336
|
-
this.visitType(baseType);
|
|
83337
|
-
}
|
|
83338
|
-
this.visitTypeEntityMembers(entity.getMembers());
|
|
83339
|
-
}
|
|
83340
|
-
}
|
|
83341
|
-
visitVariantTypeEntity(entity, isDeclaration) {
|
|
83342
|
-
if (!isDeclaration) {
|
|
83343
|
-
this.recordEntityUsage(entity);
|
|
83344
|
-
}
|
|
83345
|
-
if (isDeclaration) {
|
|
83346
|
-
this.visitTypeParameterEntities(entity.getTypeParameters());
|
|
83347
|
-
const baseTypes = entity.getBaseTypes().values;
|
|
83348
|
-
for (const baseType of baseTypes) {
|
|
83349
|
-
this.visitType(baseType);
|
|
83350
|
-
}
|
|
83351
|
-
this.visitTypeEntityMembers(entity.getMembers());
|
|
83352
|
-
}
|
|
83353
|
-
}
|
|
83354
|
-
visitAliasTypeEntity(entity, isDeclaration) {
|
|
83355
|
-
if (!isDeclaration) {
|
|
83356
|
-
this.recordEntityUsage(entity);
|
|
83357
|
-
}
|
|
83358
|
-
if (isDeclaration) {
|
|
83359
|
-
this.visitTypeParameterEntities(entity.getTypeParameters());
|
|
83360
|
-
const aliasedType = entity.getAliasedType().cycleFree;
|
|
83361
|
-
this.visitType(aliasedType);
|
|
83362
|
-
}
|
|
83363
|
-
}
|
|
83364
|
-
visitReducedTypeEntity(entity, isDeclaration) {
|
|
83365
|
-
if (!isDeclaration) {
|
|
83366
|
-
this.recordEntityUsage(entity);
|
|
83367
|
-
}
|
|
83368
|
-
if (isDeclaration) {
|
|
83369
|
-
this.visitTypeParameterEntities(entity.getTypeParameters());
|
|
83370
|
-
const reductionSourceType = entity.getReductionSource().cycleFree;
|
|
83371
|
-
this.visitType(reductionSourceType);
|
|
83372
|
-
const baseTypes = entity.getBaseTypes().values;
|
|
83373
|
-
for (const baseType of baseTypes) {
|
|
83374
|
-
this.visitType(baseType);
|
|
83375
|
-
}
|
|
83376
|
-
this.visitTypeEntityMembers(entity.getMembers());
|
|
83377
|
-
}
|
|
83378
|
-
}
|
|
83379
|
-
visitTypeParameterEntity(entity, isDeclaration) {
|
|
83380
|
-
if (!isDeclaration) {
|
|
83381
|
-
this.recordEntityUsage(entity);
|
|
83382
|
-
}
|
|
83383
|
-
if (isDeclaration) {
|
|
83384
|
-
const constraint = entity.getConstraint().cycleFree;
|
|
83385
|
-
if (constraint !== void 0) {
|
|
83386
|
-
this.visitType(constraint);
|
|
83387
|
-
}
|
|
83388
|
-
const defaultType = entity.getDefaultType();
|
|
83389
|
-
if (defaultType !== void 0) {
|
|
83390
|
-
this.visitType(defaultType);
|
|
83391
|
-
}
|
|
83392
|
-
}
|
|
83393
|
-
}
|
|
83394
|
-
visitExtensionTypeEntity(entity, isDeclaration) {
|
|
83395
|
-
if (!isDeclaration) {
|
|
83396
|
-
this.recordEntityUsage(entity);
|
|
83397
|
-
}
|
|
83398
|
-
if (isDeclaration) {
|
|
83399
|
-
const extendedType = entity.getExtendedType();
|
|
83400
|
-
if (extendedType.entity !== void 0) {
|
|
83401
|
-
this.visitTypeEntity(extendedType.entity, false);
|
|
83402
|
-
}
|
|
83403
|
-
this.visitTypeEntityMembers(entity.getMembers());
|
|
83404
|
-
}
|
|
83405
|
-
}
|
|
83406
|
-
visitTypeEntityMembers(members) {
|
|
83407
|
-
for (const member of members.getAll()) {
|
|
83408
|
-
this.visitTypeMemberEntity(member);
|
|
83409
|
-
}
|
|
83410
|
-
}
|
|
83411
|
-
visitTypeMemberEntity(entity) {
|
|
83412
|
-
switch (entity.kind) {
|
|
83413
|
-
case 0 /* Variable */:
|
|
83414
|
-
this.visitType(entity.getType());
|
|
83415
|
-
break;
|
|
83416
|
-
case 1 /* Function */:
|
|
83417
|
-
this.visitTypeParameterEntities(entity.getTypeParameters());
|
|
83418
|
-
this.visitParameterEntities(entity.getParameters());
|
|
83419
|
-
this.visitType(entity.getReturnType());
|
|
83420
|
-
break;
|
|
83421
|
-
case 3 /* Indexer */:
|
|
83422
|
-
this.visitParameterEntities(entity.getParameters());
|
|
83423
|
-
this.visitType(entity.getType());
|
|
83424
|
-
break;
|
|
83425
|
-
case 4 /* DereferenceOperator */:
|
|
83426
|
-
this.visitType(entity.getType());
|
|
83427
|
-
break;
|
|
83428
|
-
default:
|
|
83429
|
-
Debug.never(entity);
|
|
83430
|
-
}
|
|
83431
|
-
this.visitOverriddenTypeMembers(entity.getOverriddenMembers());
|
|
83432
|
-
}
|
|
83433
|
-
visitOverriddenTypeMembers(members) {
|
|
83434
|
-
for (const member of members) {
|
|
83435
|
-
this.recordEntityUsage(member.entity);
|
|
83436
|
-
}
|
|
83437
|
-
}
|
|
83438
|
-
visitType(type) {
|
|
83439
|
-
switch (type.kind) {
|
|
83440
|
-
case "function":
|
|
83441
|
-
this.visitTypeEntity(type.entity, false);
|
|
83442
|
-
this.visitTypeArguments(type.substitutions);
|
|
83443
|
-
break;
|
|
83444
|
-
case "structured":
|
|
83445
|
-
this.visitTypeEntity(type.entity, false);
|
|
83446
|
-
this.visitTypeArguments(type.substitutions);
|
|
83447
|
-
break;
|
|
83448
|
-
case "variant":
|
|
83449
|
-
this.visitTypeEntity(type.entity, false);
|
|
83450
|
-
this.visitTypeArguments(type.substitutions);
|
|
83451
|
-
break;
|
|
83452
|
-
case "alias":
|
|
83453
|
-
this.visitTypeEntity(type.entity, false);
|
|
83454
|
-
this.visitTypeArguments(type.substitutions);
|
|
83455
|
-
break;
|
|
83456
|
-
case "reduced":
|
|
83457
|
-
this.visitTypeEntity(type.entity, false);
|
|
83458
|
-
this.visitTypeArguments(type.substitutions);
|
|
83459
|
-
break;
|
|
83460
|
-
case "extension":
|
|
83461
|
-
this.visitTypeEntity(type.entity, false);
|
|
83462
|
-
this.visitTypeArguments(type.substitutions);
|
|
83463
|
-
break;
|
|
83464
|
-
case "parameter":
|
|
83465
|
-
this.visitTypeEntity(type.entity, false);
|
|
83466
|
-
break;
|
|
83467
|
-
case "union": {
|
|
83468
|
-
for (const constituentType of type.originalTypes) {
|
|
83469
|
-
this.visitType(constituentType);
|
|
83470
|
-
}
|
|
83471
|
-
break;
|
|
83472
|
-
}
|
|
83473
|
-
case "intersection": {
|
|
83474
|
-
for (const constituentType of type.originalTypes) {
|
|
83475
|
-
this.visitType(constituentType);
|
|
83476
|
-
}
|
|
83477
|
-
break;
|
|
83478
|
-
}
|
|
83479
|
-
case "unresolved":
|
|
83480
|
-
case "substitution-stub":
|
|
83481
|
-
break;
|
|
83482
|
-
default:
|
|
83483
|
-
Debug.never(type);
|
|
83484
|
-
}
|
|
83485
|
-
}
|
|
83486
|
-
visitTypeArguments(substitutions) {
|
|
83487
|
-
for (const type of substitutions.getTypes()) {
|
|
83488
|
-
this.visitType(type);
|
|
83489
|
-
}
|
|
83490
|
-
}
|
|
83491
|
-
recordEntityUsage(entity) {
|
|
83492
|
-
const containingPackage = entity.getContainingPackage();
|
|
83493
|
-
if (containingPackage.originalEntity !== this.packageEntity.originalEntity) {
|
|
83494
|
-
this.referencedPackages.add(containingPackage);
|
|
83495
|
-
}
|
|
83496
|
-
}
|
|
83497
|
-
};
|
|
83498
|
-
|
|
83499
83294
|
// source/analysis/ResolvedImplementationPackage.ts
|
|
83500
83295
|
var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
83501
83296
|
constructor(analyzer, interfacePackage, implementationPackage, targetPlatform) {
|
|
@@ -83532,6 +83327,9 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83532
83327
|
if (isTypeEntityWithMembers(namedMember)) {
|
|
83533
83328
|
this.getTypeMemberImplementations(namedMember);
|
|
83534
83329
|
}
|
|
83330
|
+
if (namedMember.typeEntityKind === 4 /* Alias */) {
|
|
83331
|
+
this.checkAliasedTypesAreEqual(namedMember);
|
|
83332
|
+
}
|
|
83535
83333
|
break;
|
|
83536
83334
|
default:
|
|
83537
83335
|
Debug.never(namedMember);
|
|
@@ -83541,6 +83339,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83541
83339
|
}
|
|
83542
83340
|
}
|
|
83543
83341
|
getPackageVariableImplementation(entity) {
|
|
83342
|
+
entity = entity.originalEntity;
|
|
83544
83343
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83545
83344
|
return void 0;
|
|
83546
83345
|
}
|
|
@@ -83570,6 +83369,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83570
83369
|
return resultOpt.toNullable();
|
|
83571
83370
|
}
|
|
83572
83371
|
getPackageFunctionImplementation(entity) {
|
|
83372
|
+
entity = entity.originalEntity;
|
|
83573
83373
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83574
83374
|
return void 0;
|
|
83575
83375
|
}
|
|
@@ -83617,6 +83417,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83617
83417
|
return resultOpt.toNullable();
|
|
83618
83418
|
}
|
|
83619
83419
|
getPackageTypeImplementation(entity) {
|
|
83420
|
+
entity = entity.originalEntity;
|
|
83620
83421
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83621
83422
|
return void 0;
|
|
83622
83423
|
}
|
|
@@ -83692,6 +83493,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83692
83493
|
return resultOpt.toNullable();
|
|
83693
83494
|
}
|
|
83694
83495
|
getFieldImplementation(entity) {
|
|
83496
|
+
entity = entity.originalEntity;
|
|
83695
83497
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83696
83498
|
return void 0;
|
|
83697
83499
|
}
|
|
@@ -83699,6 +83501,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83699
83501
|
return this.getTypeMemberImplementations(containingType)?.getFieldImplementation(entity);
|
|
83700
83502
|
}
|
|
83701
83503
|
getMethodImplementation(entity) {
|
|
83504
|
+
entity = entity.originalEntity;
|
|
83702
83505
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83703
83506
|
return void 0;
|
|
83704
83507
|
}
|
|
@@ -83706,6 +83509,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83706
83509
|
return this.getTypeMemberImplementations(containingType)?.getMethodImplementation(entity);
|
|
83707
83510
|
}
|
|
83708
83511
|
getIndexerImplementation(entity) {
|
|
83512
|
+
entity = entity.originalEntity;
|
|
83709
83513
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83710
83514
|
return void 0;
|
|
83711
83515
|
}
|
|
@@ -83713,6 +83517,7 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
83713
83517
|
return this.getTypeMemberImplementations(containingType)?.getIndexerImplementation(entity);
|
|
83714
83518
|
}
|
|
83715
83519
|
getDereferenceOperatorImplementation(entity) {
|
|
83520
|
+
entity = entity.originalEntity;
|
|
83716
83521
|
if (entity.getContainingPackage() !== this.interfacePackage) {
|
|
83717
83522
|
return void 0;
|
|
83718
83523
|
}
|
|
@@ -84099,6 +83904,30 @@ var ResolvedImplementationPackage = class _ResolvedImplementationPackage {
|
|
|
84099
83904
|
}
|
|
84100
83905
|
return result;
|
|
84101
83906
|
}
|
|
83907
|
+
checkAliasedTypesAreEqual(typeFromInterfacePackage) {
|
|
83908
|
+
const implementationType = this.getPackageTypeImplementation(typeFromInterfacePackage);
|
|
83909
|
+
if (implementationType?.kind === 2 /* Type */ && implementationType.typeEntityKind === 4 /* Alias */) {
|
|
83910
|
+
const aliasedTypeFromInterface = typeFromInterfacePackage.getAliasedType().cycleFree;
|
|
83911
|
+
const aliasedTypeFromImplementation = implementationType.getAliasedType().cycleFree;
|
|
83912
|
+
if (aliasedTypeFromInterface !== void 0 && aliasedTypeFromImplementation !== void 0 && !this.areEqualTypes(aliasedTypeFromInterface, aliasedTypeFromImplementation)) {
|
|
83913
|
+
const linkedType = this.analyzer.implementation.getLinkedTypeOrPreserve(
|
|
83914
|
+
aliasedTypeFromInterface,
|
|
83915
|
+
this.targetPlatform
|
|
83916
|
+
);
|
|
83917
|
+
const diagnosticLocation = this.analyzer.getEntityDiagnosticLocation(implementationType);
|
|
83918
|
+
if (diagnosticLocation !== void 0) {
|
|
83919
|
+
const argumentFactory = diagnosticLocation.getArgumentFactory(this.analyzer);
|
|
83920
|
+
const localizationContext = diagnosticLocation.getLocalizationContext(this.analyzer);
|
|
83921
|
+
const localizedLinkedType = localizationContext.createLocalizedType(linkedType);
|
|
83922
|
+
this.diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
83923
|
+
2283 /* ToMatchTypeDeclaredInInterfacePackageRightTypeOfAliasTypeMustBe0 */,
|
|
83924
|
+
diagnosticLocation,
|
|
83925
|
+
[argumentFactory.createDisplayableType(localizedLinkedType)]
|
|
83926
|
+
));
|
|
83927
|
+
}
|
|
83928
|
+
}
|
|
83929
|
+
}
|
|
83930
|
+
}
|
|
84102
83931
|
areEqualFunctions(function1, function2) {
|
|
84103
83932
|
return this.analyzer.signatureComparer.areEqualEntities(
|
|
84104
83933
|
function1,
|
|
@@ -86699,7 +86528,7 @@ var WellKnownTagValidator = class _WellKnownTagValidator {
|
|
|
86699
86528
|
const wrapperSource = entity.getWrapperSource()?.cycleFree;
|
|
86700
86529
|
if (wrapperSource !== void 0 && (wrapperSource.entity === void 0 || !TypeEntity.isBaseOrAliasedBase(wrapperSource.entity))) {
|
|
86701
86530
|
this.diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
86702
|
-
|
|
86531
|
+
2285 /* WrapperTypeMarkedWith0ModifierMustBeBasedOnBaseType */,
|
|
86703
86532
|
tag,
|
|
86704
86533
|
[this.displayTagNode(tag)]
|
|
86705
86534
|
));
|
|
@@ -86729,7 +86558,7 @@ var WellKnownTagValidator = class _WellKnownTagValidator {
|
|
|
86729
86558
|
this.reportDuplicateTag(tag, flag, parentGroupFlags);
|
|
86730
86559
|
} else if (entity?.kind === 2 /* Type */ && TypeEntity.isWrapperType(entity)) {
|
|
86731
86560
|
this.diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
86732
|
-
|
|
86561
|
+
2284 /* WrapperTypeCannotBeMarkedWithAbstract0Modifier */,
|
|
86733
86562
|
tag,
|
|
86734
86563
|
[this.displayTagNode(tag)]
|
|
86735
86564
|
));
|
|
@@ -87072,7 +86901,7 @@ var WellKnownTagValidator = class _WellKnownTagValidator {
|
|
|
87072
86901
|
));
|
|
87073
86902
|
} else if (typeMemberDeclarationKind === 9 /* BitFlag */) {
|
|
87074
86903
|
this.diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
87075
|
-
|
|
86904
|
+
2288 /* BitFlagCannotBeHidden */,
|
|
87076
86905
|
tag
|
|
87077
86906
|
));
|
|
87078
86907
|
} else if ((flag & 1 /* HiddenInType */) !== 0 && (flags & 32 /* Abstract */) !== 0) {
|
|
@@ -87731,7 +87560,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
87731
87560
|
const flagName = getWellKnownTagFlagName(flag, node.locale);
|
|
87732
87561
|
if (flagName !== void 0) {
|
|
87733
87562
|
this.createAndAddDiagnostic(
|
|
87734
|
-
|
|
87563
|
+
2310 /* WellKnownTagMustBeNamed0AndUsedWithoutAlias */,
|
|
87735
87564
|
node.name,
|
|
87736
87565
|
[flagName],
|
|
87737
87566
|
0 /* Error */
|
|
@@ -87971,7 +87800,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
87971
87800
|
const wellKnownDeclarations = this.analyzer.getLocalizedWellKnownDeclarations(entity.locale);
|
|
87972
87801
|
const closedHierarchyTag = closedHierarchyScope.kind === "file" ? wellKnownDeclarations.tagClosedHierarchyInFile : wellKnownDeclarations.tagClosedHierarchyInPackage;
|
|
87973
87802
|
this.createAndAddDiagnostic(
|
|
87974
|
-
|
|
87803
|
+
2316 /* DeclarationsMarkedWithClosedHierarchy0ModifierMustBeAlsoMarkedWithAbstract1Modifier */,
|
|
87975
87804
|
node.name,
|
|
87976
87805
|
[
|
|
87977
87806
|
this.diagnosticArgumentFactory.createDisplayableEntityName(closedHierarchyTag),
|
|
@@ -88347,7 +88176,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88347
88176
|
void 0
|
|
88348
88177
|
);
|
|
88349
88178
|
if (node.parameterClause.parameterList.parameters.count() !== 0) {
|
|
88350
|
-
this.createAndAddDiagnostic(
|
|
88179
|
+
this.createAndAddDiagnostic(2303 /* ReadFunctionMustHaveNoParameters */, diagnosticLocation);
|
|
88351
88180
|
}
|
|
88352
88181
|
}
|
|
88353
88182
|
checkPackageVariableSetterDeclaration(node) {
|
|
@@ -88357,7 +88186,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88357
88186
|
this.checkPackageMemberBodyPresence(entity, node.block, diagnosticLocation);
|
|
88358
88187
|
this.analyzer.semanticContext.ofAccessorDeclarationParameters(node).validateNameConflicts(this.diagnosticAcceptor);
|
|
88359
88188
|
if (node.parameterClause.parameterList.parameters.count() !== 1) {
|
|
88360
|
-
this.createAndAddDiagnostic(
|
|
88189
|
+
this.createAndAddDiagnostic(2312 /* WriteFunctionMustHaveOneParameter */, diagnosticLocation);
|
|
88361
88190
|
}
|
|
88362
88191
|
}
|
|
88363
88192
|
checkPackageMemberBodyPresence(entity, body, diagnosticLocation) {
|
|
@@ -88368,7 +88197,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88368
88197
|
} else if (findTag(this.analyzer.originalWellKnownDeclarationsA.builtIntoPlatform, entity.getTags()) !== void 0) {
|
|
88369
88198
|
if (!isEmptyFunctionBlock(body)) {
|
|
88370
88199
|
this.createAndAddDiagnostic(
|
|
88371
|
-
|
|
88200
|
+
2296 /* DeclarationsMarkedWithBuiltIntoPlatformTagMustHaveEmptyBody */,
|
|
88372
88201
|
diagnosticLocation,
|
|
88373
88202
|
[this.diagnosticArgumentFactory.createDisplayableEntityName(
|
|
88374
88203
|
this.analyzer.getLocalizedWellKnownDeclarations(entity.locale).builtIntoPlatform
|
|
@@ -88465,9 +88294,9 @@ var SourceFileAnalyzer2 = class {
|
|
|
88465
88294
|
if (TypeMemberEntity.isOrdinaryOrNamedConstructor(entity)) {
|
|
88466
88295
|
const type = entity.getContainingType();
|
|
88467
88296
|
if (this.analyzer.isBitFlagsTypeEntity(type) && type.originalEntity !== this.analyzer.originalWellKnownDeclarationsM.bits.originalEntity) {
|
|
88468
|
-
this.createAndAddDiagnostic(
|
|
88297
|
+
this.createAndAddDiagnostic(2289 /* BitFlagsTypesCannotContainConstructorDeclarations */, node.name);
|
|
88469
88298
|
} else if (entity.getContainingType().typeEntityKind === 3 /* Variant */) {
|
|
88470
|
-
this.createAndAddDiagnostic(
|
|
88299
|
+
this.createAndAddDiagnostic(2308 /* VariantTypesCannotContainConstructorDeclarations */, node.name);
|
|
88471
88300
|
}
|
|
88472
88301
|
}
|
|
88473
88302
|
this.analyzer.semanticContext.ofFunctionDeclarationParameters(node).validateNameConflicts(this.diagnosticAcceptor);
|
|
@@ -88569,13 +88398,13 @@ var SourceFileAnalyzer2 = class {
|
|
|
88569
88398
|
case 3 /* Destructor */: {
|
|
88570
88399
|
if (node.typeParameterClause !== void 0) {
|
|
88571
88400
|
this.addDiagnostic(this.analyzer.createDiagnostic(
|
|
88572
|
-
|
|
88401
|
+
2295 /* ConstructorsAndDestructorsMustNotHaveTypeParameters */,
|
|
88573
88402
|
node.typeParameterClause
|
|
88574
88403
|
));
|
|
88575
88404
|
}
|
|
88576
88405
|
if (node.returnTypeAnnotation !== void 0) {
|
|
88577
88406
|
this.addDiagnostic(this.analyzer.createDiagnostic(
|
|
88578
|
-
|
|
88407
|
+
2294 /* ConstructorsAndDestructorsMustNotHaveReturnType */,
|
|
88579
88408
|
node.returnTypeAnnotation
|
|
88580
88409
|
));
|
|
88581
88410
|
}
|
|
@@ -88639,14 +88468,14 @@ var SourceFileAnalyzer2 = class {
|
|
|
88639
88468
|
).bit
|
|
88640
88469
|
);
|
|
88641
88470
|
this.createAndAddDiagnostic(
|
|
88642
|
-
|
|
88471
|
+
2290 /* BitFlagsTypeFieldsMustHaveType0 */,
|
|
88643
88472
|
node.name,
|
|
88644
88473
|
[display],
|
|
88645
88474
|
0 /* Error */
|
|
88646
88475
|
);
|
|
88647
88476
|
}
|
|
88648
88477
|
if (node.initializationClause !== void 0) {
|
|
88649
|
-
this.createAndAddDiagnostic(
|
|
88478
|
+
this.createAndAddDiagnostic(2291 /* BitFlagsTypeFieldsMustNotHaveInitializers */, node.name);
|
|
88650
88479
|
}
|
|
88651
88480
|
}
|
|
88652
88481
|
}
|
|
@@ -88663,7 +88492,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88663
88492
|
void 0
|
|
88664
88493
|
);
|
|
88665
88494
|
if (node.parameterClause.parameterList.parameters.count() !== 0) {
|
|
88666
|
-
this.createAndAddDiagnostic(
|
|
88495
|
+
this.createAndAddDiagnostic(2303 /* ReadFunctionMustHaveNoParameters */, diagnosticLocation);
|
|
88667
88496
|
}
|
|
88668
88497
|
}
|
|
88669
88498
|
checkFieldSetterDeclaration(node) {
|
|
@@ -88673,7 +88502,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88673
88502
|
this.checkTypeMemberBodyPresence(entity, node.block, diagnosticLocation);
|
|
88674
88503
|
this.analyzer.semanticContext.ofAccessorDeclarationParameters(node).validateNameConflicts(this.diagnosticAcceptor);
|
|
88675
88504
|
if (node.parameterClause.parameterList.parameters.count() !== 1) {
|
|
88676
|
-
this.createAndAddDiagnostic(
|
|
88505
|
+
this.createAndAddDiagnostic(2312 /* WriteFunctionMustHaveOneParameter */, diagnosticLocation);
|
|
88677
88506
|
}
|
|
88678
88507
|
}
|
|
88679
88508
|
checkIndexedElementGetterDeclaration(node) {
|
|
@@ -88722,7 +88551,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88722
88551
|
} else if (findTag(this.analyzer.originalWellKnownDeclarationsA.builtIntoPlatform, entity.getTags()) !== void 0) {
|
|
88723
88552
|
if (!isEmptyFunctionBlock(body)) {
|
|
88724
88553
|
this.createAndAddDiagnostic(
|
|
88725
|
-
|
|
88554
|
+
2296 /* DeclarationsMarkedWithBuiltIntoPlatformTagMustHaveEmptyBody */,
|
|
88726
88555
|
diagnosticLocation,
|
|
88727
88556
|
[this.diagnosticArgumentFactory.createDisplayableEntityName(
|
|
88728
88557
|
this.analyzer.getLocalizedWellKnownDeclarations(entity.locale).builtIntoPlatform
|
|
@@ -88732,7 +88561,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88732
88561
|
} else if (TypeMemberEntity.isReducedTypeMember(entity)) {
|
|
88733
88562
|
if (!isEmptyFunctionBlock(body)) {
|
|
88734
88563
|
this.createAndAddDiagnostic(
|
|
88735
|
-
|
|
88564
|
+
2304 /* ReducedTypeMembersMustHaveEmptyBody */,
|
|
88736
88565
|
diagnosticLocation
|
|
88737
88566
|
);
|
|
88738
88567
|
}
|
|
@@ -88743,7 +88572,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
88743
88572
|
} else if (entity.markedAbstract()) {
|
|
88744
88573
|
if (!isEmptyFunctionBlock(body)) {
|
|
88745
88574
|
this.createAndAddDiagnostic(
|
|
88746
|
-
|
|
88575
|
+
2287 /* AbstractTypeMembersMustHaveEmptyBody */,
|
|
88747
88576
|
diagnosticLocation
|
|
88748
88577
|
);
|
|
88749
88578
|
}
|
|
@@ -89068,7 +88897,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
89068
88897
|
if (defaultMatchNodes.length > 1) {
|
|
89069
88898
|
for (const node2 of defaultMatchNodes) {
|
|
89070
88899
|
this.addDiagnostic(this.analyzer.createDiagnostic(
|
|
89071
|
-
|
|
88900
|
+
2305 /* SwitchStatementMustHaveOnlyOneDefaultMatchExpression */,
|
|
89072
88901
|
node2
|
|
89073
88902
|
));
|
|
89074
88903
|
}
|
|
@@ -89320,7 +89149,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
89320
89149
|
}
|
|
89321
89150
|
checkExpressionStatement(node) {
|
|
89322
89151
|
if (!this.isUsefulExpression(node.expression)) {
|
|
89323
|
-
this.createAndAddDiagnostic(
|
|
89152
|
+
this.createAndAddDiagnostic(2297 /* ExpressionResultMustBeUsed */, node);
|
|
89324
89153
|
}
|
|
89325
89154
|
}
|
|
89326
89155
|
isUsefulExpression(node) {
|
|
@@ -89648,7 +89477,7 @@ var SourceFileAnalyzer2 = class {
|
|
|
89648
89477
|
foundValid = true;
|
|
89649
89478
|
continue;
|
|
89650
89479
|
} else {
|
|
89651
|
-
this.createAndAddDiagnostic(
|
|
89480
|
+
this.createAndAddDiagnostic(2286 /* RedundantArgument */, arg);
|
|
89652
89481
|
}
|
|
89653
89482
|
}
|
|
89654
89483
|
}
|
|
@@ -89657,10 +89486,10 @@ var SourceFileAnalyzer2 = class {
|
|
|
89657
89486
|
if (arg.value.kind === 1042 /* IdentifierExpression */) {
|
|
89658
89487
|
const meaning2 = this.analyzer.resolveIdentifierExpressionFirstStage(arg.value);
|
|
89659
89488
|
if (meaning2.kind !== "bit-flag-access") {
|
|
89660
|
-
this.createAndAddDiagnostic(
|
|
89489
|
+
this.createAndAddDiagnostic(2286 /* RedundantArgument */, arg);
|
|
89661
89490
|
}
|
|
89662
89491
|
} else {
|
|
89663
|
-
this.createAndAddDiagnostic(
|
|
89492
|
+
this.createAndAddDiagnostic(2286 /* RedundantArgument */, arg);
|
|
89664
89493
|
}
|
|
89665
89494
|
}
|
|
89666
89495
|
}
|
|
@@ -91179,17 +91008,23 @@ var Analyzer = class {
|
|
|
91179
91008
|
}
|
|
91180
91009
|
}
|
|
91181
91010
|
getOriginalPackageEntities() {
|
|
91182
|
-
|
|
91183
|
-
|
|
91184
|
-
|
|
91011
|
+
if (this.state.originalPackageEntities === void 0) {
|
|
91012
|
+
const sourcePackages = this.compilation.allPackages.map((p) => this.getSourcePackageEntity(p));
|
|
91013
|
+
const tsPackages = this.tsInterop.getOriginalPackageEntities();
|
|
91014
|
+
this.state.originalPackageEntities = sourcePackages.concat(tsPackages);
|
|
91015
|
+
}
|
|
91016
|
+
return this.state.originalPackageEntities;
|
|
91185
91017
|
}
|
|
91186
91018
|
getPackageEntities() {
|
|
91187
|
-
|
|
91188
|
-
|
|
91189
|
-
|
|
91190
|
-
|
|
91191
|
-
|
|
91192
|
-
|
|
91019
|
+
if (this.state.packageEntities === void 0) {
|
|
91020
|
+
const originalPackages = this.getOriginalPackageEntities();
|
|
91021
|
+
const translatedPackages = Query.mapAndFilter(
|
|
91022
|
+
originalPackages,
|
|
91023
|
+
(p) => p.subkind === "name-translation" ? p.getTranslatedTargetPackage() : void 0
|
|
91024
|
+
).toArray();
|
|
91025
|
+
this.state.packageEntities = originalPackages.concat(translatedPackages);
|
|
91026
|
+
}
|
|
91027
|
+
return this.state.packageEntities;
|
|
91193
91028
|
}
|
|
91194
91029
|
getOriginalPackageEntityByName(name) {
|
|
91195
91030
|
if (this.state.originalPackageEntitiesByNameKey === void 0) {
|
|
@@ -91953,17 +91788,11 @@ var Analyzer = class {
|
|
|
91953
91788
|
Debug.never(sourceFile);
|
|
91954
91789
|
}
|
|
91955
91790
|
}
|
|
91956
|
-
|
|
91957
|
-
|
|
91958
|
-
if (
|
|
91959
|
-
|
|
91960
|
-
|
|
91961
|
-
const referencedPackages = new ReferencedPackagesCollector(targetPackage).collect();
|
|
91962
|
-
const result = /* @__PURE__ */ new Map();
|
|
91963
|
-
for (const referencedPackage of referencedPackages) {
|
|
91964
|
-
const originalPackage = referencedPackage.originalEntity;
|
|
91965
|
-
const localizedPackage = this.getLocalizedPackageWithLocale(originalPackage, entity.getTranslationLocale()) ?? referencedPackage;
|
|
91966
|
-
result.set(originalPackage, localizedPackage);
|
|
91791
|
+
getLocalizationContextForPackage(entity) {
|
|
91792
|
+
let result = this.state.localizationContexts.get(entity);
|
|
91793
|
+
if (result === void 0) {
|
|
91794
|
+
result = new EntityLocalizationContext(this, entity);
|
|
91795
|
+
this.state.localizationContexts.set(entity, result);
|
|
91967
91796
|
}
|
|
91968
91797
|
return result;
|
|
91969
91798
|
}
|
|
@@ -92043,7 +91872,7 @@ var Analyzer = class {
|
|
|
92043
91872
|
result = false;
|
|
92044
91873
|
if (diagnostics !== void 0 && diagnosticLocation !== void 0) {
|
|
92045
91874
|
diagnostics.addDiagnostic(this.createDiagnostic(
|
|
92046
|
-
|
|
91875
|
+
2315 /* AllTypeParametersOfTypeDerivedFromClosedHierarchyRootMustBeUsedTypeParameter0IsUnused */,
|
|
92047
91876
|
diagnosticLocation,
|
|
92048
91877
|
[typeParameter.getName()]
|
|
92049
91878
|
));
|
|
@@ -92154,6 +91983,7 @@ var CommonAnalyzerState = class {
|
|
|
92154
91983
|
this.sideDiagnosticsByFile = /* @__PURE__ */ new Map();
|
|
92155
91984
|
this.sideDiagnosticsWithoutFile = new Array();
|
|
92156
91985
|
this.typeMemberImplementationCheckResults = /* @__PURE__ */ new Map();
|
|
91986
|
+
this.localizationContexts = /* @__PURE__ */ new Map();
|
|
92157
91987
|
this.compilation = compilation;
|
|
92158
91988
|
this.tsInteropInputs = tsInteropInputs;
|
|
92159
91989
|
}
|
|
@@ -92934,6 +92764,88 @@ var ImplementationEntity = class {
|
|
|
92934
92764
|
const implementationPackage = this.analyzer.getResolvedImplementationPackageForInterfacePackage(containingPackage, platform);
|
|
92935
92765
|
return implementationPackage?.getDereferenceOperatorImplementation(entity);
|
|
92936
92766
|
}
|
|
92767
|
+
getLinkedTypeOrPreserve(type, platform) {
|
|
92768
|
+
switch (type.kind) {
|
|
92769
|
+
case "structured":
|
|
92770
|
+
case "variant":
|
|
92771
|
+
case "alias":
|
|
92772
|
+
case "reduced":
|
|
92773
|
+
case "extension":
|
|
92774
|
+
case "parameter": {
|
|
92775
|
+
let entity = type.entity;
|
|
92776
|
+
if (this.isEntityFromMultiPlatformPackage(entity)) {
|
|
92777
|
+
const linkedEntity = this.ofType(entity, platform);
|
|
92778
|
+
if (linkedEntity === void 0) {
|
|
92779
|
+
return type;
|
|
92780
|
+
}
|
|
92781
|
+
entity = linkedEntity;
|
|
92782
|
+
}
|
|
92783
|
+
const substitutions = this.getLinkedSubstitutionsOrPreserve(type.substitutions, platform);
|
|
92784
|
+
if (substitutions === void 0) {
|
|
92785
|
+
return type;
|
|
92786
|
+
}
|
|
92787
|
+
if (entity === type.entity && substitutions === type.substitutions) {
|
|
92788
|
+
return type;
|
|
92789
|
+
}
|
|
92790
|
+
return this.analyzer.instantiateTypeWithSubstitutions(entity, substitutions);
|
|
92791
|
+
}
|
|
92792
|
+
case "union": {
|
|
92793
|
+
const linkedConstituentTypes = type.originalTypes.map((t) => this.getLinkedTypeOrPreserve(t, platform));
|
|
92794
|
+
return this.analyzer.typeFactory.getUnionType(linkedConstituentTypes);
|
|
92795
|
+
}
|
|
92796
|
+
case "intersection": {
|
|
92797
|
+
const linkedConstituentTypes = type.originalTypes.map((t) => this.getLinkedTypeOrPreserve(t, platform));
|
|
92798
|
+
return this.analyzer.typeFactory.getUnionType(linkedConstituentTypes);
|
|
92799
|
+
}
|
|
92800
|
+
case "function": {
|
|
92801
|
+
const returnType = this.getLinkedTypeOrPreserve(type.getReturnType(), platform);
|
|
92802
|
+
const isAsync = type.isAsync();
|
|
92803
|
+
const unfinishedTypeEntity = new UnfinishedIntrinsicAnonymousFunctionTypeEntity(
|
|
92804
|
+
this.analyzer,
|
|
92805
|
+
returnType,
|
|
92806
|
+
isAsync,
|
|
92807
|
+
type.entity.getContainingPackage(),
|
|
92808
|
+
void 0
|
|
92809
|
+
);
|
|
92810
|
+
const parameters = type.getParameters().map((p) => new IntrinsicParameterEntity(
|
|
92811
|
+
p.getName(),
|
|
92812
|
+
this.getLinkedTypeOrPreserve(p.getType(), platform),
|
|
92813
|
+
unfinishedTypeEntity.unfinishedValue,
|
|
92814
|
+
p.isOptional(),
|
|
92815
|
+
p.isVariadic(),
|
|
92816
|
+
p.isObjectParameter(),
|
|
92817
|
+
void 0
|
|
92818
|
+
));
|
|
92819
|
+
const typeEntity = unfinishedTypeEntity.finish([], parameters);
|
|
92820
|
+
return this.analyzer.typeFactory.getFunctionType(typeEntity, Substitutions.empty());
|
|
92821
|
+
}
|
|
92822
|
+
case "unresolved":
|
|
92823
|
+
case "substitution-stub":
|
|
92824
|
+
return type;
|
|
92825
|
+
default:
|
|
92826
|
+
Debug.never(type);
|
|
92827
|
+
}
|
|
92828
|
+
}
|
|
92829
|
+
getLinkedSubstitutionsOrPreserve(substitutions, platform) {
|
|
92830
|
+
if (substitutions.size === 0) {
|
|
92831
|
+
return substitutions;
|
|
92832
|
+
}
|
|
92833
|
+
const map = /* @__PURE__ */ new Map();
|
|
92834
|
+
let mapChanged = false;
|
|
92835
|
+
for (const [typeParameter, typeArgument] of substitutions.map) {
|
|
92836
|
+
const linkedTypeParameter = this.ofParameterType(typeParameter, platform);
|
|
92837
|
+
if (linkedTypeParameter === void 0) {
|
|
92838
|
+
return substitutions;
|
|
92839
|
+
}
|
|
92840
|
+
const linkedTypeArgument = this.getLinkedTypeOrPreserve(typeArgument, platform);
|
|
92841
|
+
map.set(linkedTypeParameter, linkedTypeArgument);
|
|
92842
|
+
mapChanged ||= linkedTypeParameter !== typeParameter || linkedTypeArgument !== typeArgument;
|
|
92843
|
+
}
|
|
92844
|
+
if (!mapChanged) {
|
|
92845
|
+
return substitutions;
|
|
92846
|
+
}
|
|
92847
|
+
return Substitutions.fromSubstitutionMap(map);
|
|
92848
|
+
}
|
|
92937
92849
|
};
|
|
92938
92850
|
var TypeAssignabilityCheck = class {
|
|
92939
92851
|
constructor(analyzer) {
|
|
@@ -95838,9 +95750,6 @@ var LocalFunctionTypeDeclarationEntity = class {
|
|
|
95838
95750
|
get dialect() {
|
|
95839
95751
|
return 1 /* ArtelM */;
|
|
95840
95752
|
}
|
|
95841
|
-
getNaming() {
|
|
95842
|
-
return new EntityNaming_anonymous();
|
|
95843
|
-
}
|
|
95844
95753
|
getTypeParameters() {
|
|
95845
95754
|
return emptyTypeParameterEntities;
|
|
95846
95755
|
}
|
|
@@ -97746,7 +97655,7 @@ AliasedPackageImportEntity2 = __decorateClass([
|
|
|
97746
97655
|
// source/entities/translated/source/m/SourceTranslatedAliasTypeEntity.ts
|
|
97747
97656
|
var SourceTranslatedAliasTypeEntity2 = class extends TranslatedAliasTypeEntity {
|
|
97748
97657
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
97749
|
-
super(originalEntity, translation, name);
|
|
97658
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
97750
97659
|
this.typeParameters = new Cached();
|
|
97751
97660
|
this.translationPackage = translationPackage;
|
|
97752
97661
|
this.node = node;
|
|
@@ -97864,7 +97773,7 @@ SourceTranslatedDestructorEntity2 = __decorateClass([
|
|
|
97864
97773
|
// source/entities/translated/source/m/SourceTranslatedExtensionTypeEntity.ts
|
|
97865
97774
|
var SourceTranslatedExtensionTypeEntity2 = class extends TranslatedExtensionTypeEntity {
|
|
97866
97775
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
97867
|
-
super(originalEntity, translation, name);
|
|
97776
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
97868
97777
|
this.typeParameters = new Cached();
|
|
97869
97778
|
this.members = new Cached();
|
|
97870
97779
|
this.translationPackage = translationPackage;
|
|
@@ -97888,7 +97797,7 @@ SourceTranslatedExtensionTypeEntity2 = __decorateClass([
|
|
|
97888
97797
|
// source/entities/translated/source/m/SourceTranslatedFunctionEntity.ts
|
|
97889
97798
|
var SourceTranslatedPackageFunctionEntity2 = class extends TranslatedPackageFunctionEntity {
|
|
97890
97799
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
97891
|
-
super(originalEntity, translation, name);
|
|
97800
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
97892
97801
|
this.typeParameters = new Cached();
|
|
97893
97802
|
this.parameters = new Cached();
|
|
97894
97803
|
this.translationPackage = translationPackage;
|
|
@@ -97954,7 +97863,7 @@ SourceTranslatedOrdinaryOrOperatorMethodEntity2 = __decorateClass([
|
|
|
97954
97863
|
// source/entities/translated/source/m/SourceTranslatedFunctionTypeEntity.ts
|
|
97955
97864
|
var SourceTranslatedAnonymousFunctionTypeEntity2 = class extends TranslatedAnonymousFunctionTypeEntity {
|
|
97956
97865
|
constructor(originalEntity, translation, translationPackage, node) {
|
|
97957
|
-
super(originalEntity, translation);
|
|
97866
|
+
super(originalEntity, translation, translationPackage.localizationContext);
|
|
97958
97867
|
this.parameters = new Cached();
|
|
97959
97868
|
this.members = new Cached();
|
|
97960
97869
|
this.translationPackage = translationPackage;
|
|
@@ -97977,8 +97886,8 @@ SourceTranslatedAnonymousFunctionTypeEntity2 = __decorateClass([
|
|
|
97977
97886
|
|
|
97978
97887
|
// source/entities/translated/source/m/SourceTranslatedIndexerEntity.ts
|
|
97979
97888
|
var SourceTranslatedIndexerEntity2 = class extends TranslatedIndexerEntity {
|
|
97980
|
-
constructor(analyzer, originalEntity, translation, translatedContainingEntity, getter, setter) {
|
|
97981
|
-
super(analyzer, originalEntity, translation, translatedContainingEntity);
|
|
97889
|
+
constructor(analyzer, originalEntity, translation, localizationContext, translatedContainingEntity, getter, setter) {
|
|
97890
|
+
super(analyzer, originalEntity, translation, localizationContext, translatedContainingEntity);
|
|
97982
97891
|
this.getter = getter;
|
|
97983
97892
|
this.setter = setter;
|
|
97984
97893
|
}
|
|
@@ -98037,7 +97946,7 @@ SourceTranslatedTextTranslationPackageEntity2 = __decorateClass([
|
|
|
98037
97946
|
// source/entities/translated/source/m/SourceTranslatedPackageStructuredTypeEntity.ts
|
|
98038
97947
|
var SourceTranslatedPackageStructuredTypeEntity2 = class extends TranslatedPackageStructuredTypeEntity {
|
|
98039
97948
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
98040
|
-
super(originalEntity, translation, name);
|
|
97949
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
98041
97950
|
this.typeParameters = new Cached();
|
|
98042
97951
|
this.members = new Cached();
|
|
98043
97952
|
this.translationPackage = translationPackage;
|
|
@@ -98059,7 +97968,7 @@ SourceTranslatedPackageStructuredTypeEntity2 = __decorateClass([
|
|
|
98059
97968
|
], SourceTranslatedPackageStructuredTypeEntity2);
|
|
98060
97969
|
var SourceTranslatedAnonymousStructuredTypeEntity2 = class extends TranslatedAnonymousStructuredTypeEntity {
|
|
98061
97970
|
constructor(originalEntity, translation, translationPackage) {
|
|
98062
|
-
super(originalEntity, translation);
|
|
97971
|
+
super(originalEntity, translation, translationPackage.localizationContext);
|
|
98063
97972
|
this.members = new Cached();
|
|
98064
97973
|
this.translationPackage = translationPackage;
|
|
98065
97974
|
}
|
|
@@ -98072,7 +97981,7 @@ SourceTranslatedAnonymousStructuredTypeEntity2 = __decorateClass([
|
|
|
98072
97981
|
], SourceTranslatedAnonymousStructuredTypeEntity2);
|
|
98073
97982
|
var SourceTranslatedLocalStructuredTypeEntity2 = class extends TranslatedLocalStructuredTypeEntity {
|
|
98074
97983
|
constructor(originalEntity, translation, name, translationPackage) {
|
|
98075
|
-
super(originalEntity, translation, name);
|
|
97984
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
98076
97985
|
this.members = new Cached();
|
|
98077
97986
|
this.translationPackage = translationPackage;
|
|
98078
97987
|
}
|
|
@@ -98087,7 +97996,7 @@ SourceTranslatedLocalStructuredTypeEntity2 = __decorateClass([
|
|
|
98087
97996
|
// source/entities/translated/source/m/SourceTranslatedPackageVariantTypeEntity.ts
|
|
98088
97997
|
var SourceTranslatedPackageVariantTypeEntity2 = class extends TranslatedPackageVariantTypeEntity {
|
|
98089
97998
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
98090
|
-
super(originalEntity, translation, name);
|
|
97999
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
98091
98000
|
this.typeParameters = new Cached();
|
|
98092
98001
|
this.members = new Cached();
|
|
98093
98002
|
this.translationPackage = translationPackage;
|
|
@@ -98111,7 +98020,7 @@ SourceTranslatedPackageVariantTypeEntity2 = __decorateClass([
|
|
|
98111
98020
|
// source/entities/translated/source/m/SourceTranslatedReducedTypeEntity.ts
|
|
98112
98021
|
var SourceTranslatedReducedTypeEntity2 = class extends TranslatedReducedTypeEntity {
|
|
98113
98022
|
constructor(originalEntity, translation, name, translationPackage, node) {
|
|
98114
|
-
super(originalEntity, translation, name);
|
|
98023
|
+
super(originalEntity, translation, translationPackage.localizationContext, name);
|
|
98115
98024
|
this.typeParameters = new Cached();
|
|
98116
98025
|
this.members = new Cached();
|
|
98117
98026
|
this.translationPackage = translationPackage;
|
|
@@ -98393,13 +98302,13 @@ var TranslatedEntityNameConflictsValidator2 = class {
|
|
|
98393
98302
|
const spName = sp.getName();
|
|
98394
98303
|
if (!gpName.considerEqual(spName)) {
|
|
98395
98304
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
98396
|
-
|
|
98305
|
+
2300 /* IndexParametersOfIndexedElementAccessorsMustBeTranslatedTheSameWay */,
|
|
98397
98306
|
gpTranslationDefinition.translatedNameIdentifier,
|
|
98398
98307
|
void 0,
|
|
98399
98308
|
1 /* Warning */
|
|
98400
98309
|
));
|
|
98401
98310
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
98402
|
-
|
|
98311
|
+
2300 /* IndexParametersOfIndexedElementAccessorsMustBeTranslatedTheSameWay */,
|
|
98403
98312
|
spTranslationDefinition.translatedNameIdentifier,
|
|
98404
98313
|
void 0,
|
|
98405
98314
|
1 /* Warning */
|
|
@@ -98456,7 +98365,6 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98456
98365
|
this.package_ = package_;
|
|
98457
98366
|
this.packageEntity = analyzer.entity.ofNameTranslationPackage(package_);
|
|
98458
98367
|
this.targetPackage = targetPackage;
|
|
98459
|
-
this.localizationContext = this.packageEntity.getLocalizationContext();
|
|
98460
98368
|
const translation = new Translation(this.packageEntity, new SourceTranslationDefinition(this.package_, void 0));
|
|
98461
98369
|
switch (targetPackage.subkind) {
|
|
98462
98370
|
case "program":
|
|
@@ -98486,6 +98394,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98486
98394
|
default:
|
|
98487
98395
|
Debug.never(targetPackage);
|
|
98488
98396
|
}
|
|
98397
|
+
this.localizationContext = this.analyzer.getLocalizationContextForPackage(this.translatedTargetPackage);
|
|
98489
98398
|
this.entityNameConflictsValidator = new TranslatedEntityNameConflictsValidator2(
|
|
98490
98399
|
this.analyzer,
|
|
98491
98400
|
this.translatedTargetPackage
|
|
@@ -98613,6 +98522,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98613
98522
|
return new TranslatedTypeParameterEntity(
|
|
98614
98523
|
e,
|
|
98615
98524
|
new Translation(this.packageEntity, translationDefinition),
|
|
98525
|
+
this.localizationContext,
|
|
98616
98526
|
name,
|
|
98617
98527
|
containingEntity
|
|
98618
98528
|
);
|
|
@@ -98628,6 +98538,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98628
98538
|
return new TranslatedParameterEntity(
|
|
98629
98539
|
e,
|
|
98630
98540
|
new Translation(this.packageEntity, translationDefinition),
|
|
98541
|
+
this.localizationContext,
|
|
98631
98542
|
name,
|
|
98632
98543
|
containingEntity
|
|
98633
98544
|
);
|
|
@@ -98725,7 +98636,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98725
98636
|
translationDeclaration,
|
|
98726
98637
|
translationDeclaration.translatedName,
|
|
98727
98638
|
(e, t, n) => {
|
|
98728
|
-
const result = new TranslatedPackageVariableEntity(this.analyzer, e, t, n);
|
|
98639
|
+
const result = new TranslatedPackageVariableEntity(this.analyzer, e, t, this.localizationContext, n);
|
|
98729
98640
|
const getter = result.getGetter();
|
|
98730
98641
|
if (getter !== void 0) {
|
|
98731
98642
|
this.translatedEntityByOriginal.set(getter.originalEntity, getter);
|
|
@@ -98879,7 +98790,14 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98879
98790
|
translationDeclaration,
|
|
98880
98791
|
(e, t) => {
|
|
98881
98792
|
const name = translationDeclaration.translatedName.isMissing ? e.getName() : this.analyzer.createNameFromIdentifier(translationDeclaration.translatedName);
|
|
98882
|
-
return new TranslatedFieldEntity(
|
|
98793
|
+
return new TranslatedFieldEntity(
|
|
98794
|
+
this.analyzer,
|
|
98795
|
+
e,
|
|
98796
|
+
t,
|
|
98797
|
+
this.localizationContext,
|
|
98798
|
+
name,
|
|
98799
|
+
translatedTypeEntity
|
|
98800
|
+
);
|
|
98883
98801
|
}
|
|
98884
98802
|
);
|
|
98885
98803
|
}
|
|
@@ -98897,7 +98815,14 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
98897
98815
|
translationDeclaration,
|
|
98898
98816
|
(e, t) => {
|
|
98899
98817
|
const name = translationDeclaration.translatedName.isMissing ? e.getName() : this.analyzer.createNameFromIdentifier(translationDeclaration.translatedName);
|
|
98900
|
-
return new TranslatedFieldEntity(
|
|
98818
|
+
return new TranslatedFieldEntity(
|
|
98819
|
+
this.analyzer,
|
|
98820
|
+
e,
|
|
98821
|
+
t,
|
|
98822
|
+
this.localizationContext,
|
|
98823
|
+
name,
|
|
98824
|
+
translatedTypeEntity
|
|
98825
|
+
);
|
|
98901
98826
|
}
|
|
98902
98827
|
);
|
|
98903
98828
|
}
|
|
@@ -99185,7 +99110,13 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99185
99110
|
const translation = new Translation(this.packageEntity, new IntrinsicTranslationDefinition());
|
|
99186
99111
|
switch (entity.kind) {
|
|
99187
99112
|
case 0 /* Variable */:
|
|
99188
|
-
return new TranslatedPackageVariableEntity(
|
|
99113
|
+
return new TranslatedPackageVariableEntity(
|
|
99114
|
+
this.analyzer,
|
|
99115
|
+
entity,
|
|
99116
|
+
translation,
|
|
99117
|
+
this.localizationContext,
|
|
99118
|
+
entity.getName()
|
|
99119
|
+
);
|
|
99189
99120
|
case 1 /* Function */:
|
|
99190
99121
|
return new SourceTranslatedPackageFunctionEntity2(entity, translation, entity.getName(), this, void 0);
|
|
99191
99122
|
case 2 /* Type */: {
|
|
@@ -99222,6 +99153,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99222
99153
|
this.analyzer,
|
|
99223
99154
|
entity,
|
|
99224
99155
|
translation,
|
|
99156
|
+
this.localizationContext,
|
|
99225
99157
|
entity.getName(),
|
|
99226
99158
|
translatedContainingEntity
|
|
99227
99159
|
);
|
|
@@ -99330,7 +99262,13 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99330
99262
|
case 3 /* Indexer */:
|
|
99331
99263
|
Debug.unreachable("\u041C\u0435\u0442\u043E\u0434 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u044B\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u0438\u043D\u0434\u0435\u043A\u0441\u0430\u0442\u043E\u0440\u043E\u0432; \u043E\u043D \u0432\u044B\u0437\u0432\u0430\u043D \u0434\u043B\u044F \u0435\u0433\u043E \u0444\u0443\u043D\u043A\u0446\u0438\u0439 \u0447\u0442\u0435\u043D\u0438\u044F \u0438 \u0437\u0430\u043F\u0438\u0441\u0438.");
|
|
99332
99264
|
case 4 /* DereferenceOperator */:
|
|
99333
|
-
return new TranslatedDereferenceOperatorEntity(
|
|
99265
|
+
return new TranslatedDereferenceOperatorEntity(
|
|
99266
|
+
this.analyzer,
|
|
99267
|
+
entity,
|
|
99268
|
+
translation,
|
|
99269
|
+
this.localizationContext,
|
|
99270
|
+
translatedContainingEntity
|
|
99271
|
+
);
|
|
99334
99272
|
default:
|
|
99335
99273
|
Debug.never(entity);
|
|
99336
99274
|
}
|
|
@@ -99541,7 +99479,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99541
99479
|
const targets = originalMembers.getNamedMembersByNameM(name).filter((m) => m.kind === 0 /* Variable */ && m.isVariantValue());
|
|
99542
99480
|
if (targets.length === 0) {
|
|
99543
99481
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
99544
|
-
|
|
99482
|
+
2309 /* VariantValueWithName0NotFound */,
|
|
99545
99483
|
node.sourceName,
|
|
99546
99484
|
[name],
|
|
99547
99485
|
1 /* Warning */
|
|
@@ -99590,7 +99528,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99590
99528
|
);
|
|
99591
99529
|
if (!translatedNameOrOperatorKind.considerEqual(expectedTranslatedName)) {
|
|
99592
99530
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
99593
|
-
|
|
99531
|
+
2306 /* TranslatedConstructorMustBeNamed0 */,
|
|
99594
99532
|
node.translatedName,
|
|
99595
99533
|
[expectedTranslatedName],
|
|
99596
99534
|
1 /* Warning */
|
|
@@ -99605,7 +99543,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99605
99543
|
);
|
|
99606
99544
|
if (!translatedNameOrOperatorKind.considerEqual(expectedTranslatedName)) {
|
|
99607
99545
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
99608
|
-
|
|
99546
|
+
2307 /* TranslatedDestructorMustBeNamed0 */,
|
|
99609
99547
|
node.translatedName,
|
|
99610
99548
|
[expectedTranslatedName],
|
|
99611
99549
|
1 /* Warning */
|
|
@@ -99614,7 +99552,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99614
99552
|
}
|
|
99615
99553
|
} else {
|
|
99616
99554
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
99617
|
-
|
|
99555
|
+
2299 /* FunctionMustNotBeTranslatedAsAnOperator */,
|
|
99618
99556
|
node.translatedName,
|
|
99619
99557
|
void 0,
|
|
99620
99558
|
1 /* Warning */
|
|
@@ -99676,7 +99614,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99676
99614
|
}
|
|
99677
99615
|
} else {
|
|
99678
99616
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
99679
|
-
|
|
99617
|
+
2301 /* OperatorMustNotBeTranslatedAsAFunction */,
|
|
99680
99618
|
node.translatedName,
|
|
99681
99619
|
void 0,
|
|
99682
99620
|
1 /* Warning */
|
|
@@ -99874,7 +99812,13 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99874
99812
|
const nameWithTranslation = translatedNameByParameter.get(p);
|
|
99875
99813
|
const name = nameWithTranslation?.name ?? p.getName();
|
|
99876
99814
|
const translation = nameWithTranslation?.translation ?? new Translation(this.packageEntity, new IntrinsicTranslationDefinition());
|
|
99877
|
-
return new TranslatedParameterEntity(
|
|
99815
|
+
return new TranslatedParameterEntity(
|
|
99816
|
+
p,
|
|
99817
|
+
translation,
|
|
99818
|
+
this.localizationContext,
|
|
99819
|
+
name,
|
|
99820
|
+
translatedConstructor.unfinishedValue
|
|
99821
|
+
);
|
|
99878
99822
|
});
|
|
99879
99823
|
return translatedConstructor.finish(parameters);
|
|
99880
99824
|
}
|
|
@@ -99886,6 +99830,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99886
99830
|
this.analyzer,
|
|
99887
99831
|
sourceIndexer,
|
|
99888
99832
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
99833
|
+
this.localizationContext,
|
|
99889
99834
|
translatedTypeEntity,
|
|
99890
99835
|
accessors?.getter,
|
|
99891
99836
|
accessors?.setter
|
|
@@ -99902,10 +99847,17 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99902
99847
|
return void 0;
|
|
99903
99848
|
}
|
|
99904
99849
|
const localizedOverriddenMember = this.localizationContext.getLocalizedFieldEntity(overriddenMember.entity);
|
|
99905
|
-
return new TranslatedFieldEntity(
|
|
99906
|
-
this.
|
|
99907
|
-
|
|
99908
|
-
|
|
99850
|
+
return new TranslatedFieldEntity(
|
|
99851
|
+
this.analyzer,
|
|
99852
|
+
entity,
|
|
99853
|
+
new Translation(
|
|
99854
|
+
this.packageEntity,
|
|
99855
|
+
new IntrinsicTranslationDefinition()
|
|
99856
|
+
),
|
|
99857
|
+
this.localizationContext,
|
|
99858
|
+
localizedOverriddenMember.getName(),
|
|
99859
|
+
translatedContainingEntity
|
|
99860
|
+
);
|
|
99909
99861
|
}
|
|
99910
99862
|
case 1 /* Function */: {
|
|
99911
99863
|
const overriddenMember = entity.getOverriddenMembers()[0];
|
|
@@ -99923,13 +99875,20 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99923
99875
|
this.localizationContext,
|
|
99924
99876
|
translatedContainingEntity
|
|
99925
99877
|
);
|
|
99926
|
-
const typeParameters = Query.zipLeft(entity.getTypeParameters(), localizedOverriddenMember.getTypeParameters(), (p, bp) => new TranslatedTypeParameterEntity(
|
|
99927
|
-
|
|
99928
|
-
new
|
|
99929
|
-
|
|
99878
|
+
const typeParameters = Query.zipLeft(entity.getTypeParameters(), localizedOverriddenMember.getTypeParameters(), (p, bp) => new TranslatedTypeParameterEntity(
|
|
99879
|
+
p,
|
|
99880
|
+
new Translation(
|
|
99881
|
+
this.packageEntity,
|
|
99882
|
+
new IntrinsicTranslationDefinition()
|
|
99883
|
+
),
|
|
99884
|
+
this.localizationContext,
|
|
99885
|
+
bp?.getName() ?? p.getName(),
|
|
99886
|
+
translatedMember.unfinishedValue
|
|
99887
|
+
)).toArray();
|
|
99930
99888
|
const parameters = Query.zipLeft(entity.getParameters(), localizedOverriddenMember.getParameters(), (p, bp) => new TranslatedParameterEntity(
|
|
99931
99889
|
p,
|
|
99932
99890
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
99891
|
+
this.localizationContext,
|
|
99933
99892
|
bp?.getName() ?? p.getName(),
|
|
99934
99893
|
translatedMember.unfinishedValue
|
|
99935
99894
|
)).toArray();
|
|
@@ -99945,6 +99904,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99945
99904
|
this.analyzer,
|
|
99946
99905
|
entity,
|
|
99947
99906
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
99907
|
+
this.localizationContext,
|
|
99948
99908
|
translatedContainingEntity
|
|
99949
99909
|
);
|
|
99950
99910
|
const originalGetter = entity.getGetter();
|
|
@@ -99952,6 +99912,7 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99952
99912
|
const parameters = Query.zipLeft(entity.getParameters(), localizedOverriddenMember.getParameters(), (p, bp) => new TranslatedParameterEntity(
|
|
99953
99913
|
p,
|
|
99954
99914
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
99915
|
+
this.localizationContext,
|
|
99955
99916
|
bp?.getName() ?? p.getName(),
|
|
99956
99917
|
translatedMember.unfinishedValue
|
|
99957
99918
|
)).toArray();
|
|
@@ -99959,12 +99920,14 @@ var ResolvedNameTranslationPackage2 = class _ResolvedNameTranslationPackage {
|
|
|
99959
99920
|
this.analyzer,
|
|
99960
99921
|
originalGetter,
|
|
99961
99922
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
99923
|
+
this.localizationContext,
|
|
99962
99924
|
translatedMember.unfinishedValue
|
|
99963
99925
|
) : void 0;
|
|
99964
99926
|
const setter = originalSetter !== void 0 ? new TranslatedTypeMemberAccessorEntity(
|
|
99965
99927
|
this.analyzer,
|
|
99966
99928
|
originalSetter,
|
|
99967
99929
|
new Translation(this.packageEntity, new IntrinsicTranslationDefinition()),
|
|
99930
|
+
this.localizationContext,
|
|
99968
99931
|
translatedMember.unfinishedValue
|
|
99969
99932
|
) : void 0;
|
|
99970
99933
|
return translatedMember.finish(parameters, getter, setter);
|
|
@@ -100174,8 +100137,6 @@ var SourceNameTranslationPackageEntity2 = class extends SourcePackageEntity2 {
|
|
|
100174
100137
|
super(analyzer);
|
|
100175
100138
|
this.subkind = "name-translation";
|
|
100176
100139
|
this.targetPackage = new Cached();
|
|
100177
|
-
this.localizedReferencedPackagesMap = new Cached();
|
|
100178
|
-
this.localizationContext = new Cached();
|
|
100179
100140
|
this.resolvedTranslationPackage_ = new Cached();
|
|
100180
100141
|
this.package_ = package_;
|
|
100181
100142
|
}
|
|
@@ -100200,12 +100161,6 @@ var SourceNameTranslationPackageEntity2 = class extends SourcePackageEntity2 {
|
|
|
100200
100161
|
return new ResolvedNameTranslationPackage2(this.analyzer, this.package_, targetPackage);
|
|
100201
100162
|
});
|
|
100202
100163
|
}
|
|
100203
|
-
getLocalizationContext() {
|
|
100204
|
-
return this.localizationContext.getOrInsertWith(() => new EntityLocalizationContext(this.analyzer, this));
|
|
100205
|
-
}
|
|
100206
|
-
getLocalizedReferencedPackagesMap() {
|
|
100207
|
-
return this.localizedReferencedPackagesMap.getOrInsertWith(() => this.analyzer.createLocalizedReferencedPackagesMapForNameTranslationPackage(this));
|
|
100208
|
-
}
|
|
100209
100164
|
getTranslatedPackageMember(entity) {
|
|
100210
100165
|
return this.getResolvedNameTranslationPackage()?.getTranslatedPackageMember(entity) ?? entity;
|
|
100211
100166
|
}
|
|
@@ -100851,7 +100806,7 @@ var SourceStructuredTypeDeclarationData2 = class {
|
|
|
100851
100806
|
wrapperSourceType = this.analyzer.type.ofTypeSpecifier(firstBaseType);
|
|
100852
100807
|
} else {
|
|
100853
100808
|
this.analyzer.getSideDiagnosticAcceptor().addDiagnostic(this.analyzer.createDiagnostic(
|
|
100854
|
-
|
|
100809
|
+
2311 /* WrapperTypeMustBeBasedOnAnotherType */,
|
|
100855
100810
|
this.typeNode.name
|
|
100856
100811
|
));
|
|
100857
100812
|
wrapperSourceType = this.analyzer.originalStandardTypes.unresolved;
|
|
@@ -101332,7 +101287,7 @@ var TypeExtensionDeclarationEntity2 = class {
|
|
|
101332
101287
|
const extendedType = extendedTypeSpecifier !== void 0 ? this.analyzer.type.ofTypeSpecifier(extendedTypeSpecifier) : this.analyzer.originalStandardTypes.unresolved;
|
|
101333
101288
|
if (this.node.extendsClause === void 0) {
|
|
101334
101289
|
diagnostics.addDiagnostic(this.analyzer.createDiagnostic(
|
|
101335
|
-
|
|
101290
|
+
2298 /* ExtensionTypeMustBeBasedOnAnotherType */,
|
|
101336
101291
|
this.node.name
|
|
101337
101292
|
));
|
|
101338
101293
|
}
|
|
@@ -103396,7 +103351,7 @@ var Resolver5 = class {
|
|
|
103396
103351
|
);
|
|
103397
103352
|
} else if (!isOwnConstructorCall && !isBaseConstructorCall) {
|
|
103398
103353
|
this.diagnostics?.addDiagnostic(
|
|
103399
|
-
this.analyzer.createDiagnostic(
|
|
103354
|
+
this.analyzer.createDiagnostic(2302 /* OwnOrBaseConstructorExpected */, this.node)
|
|
103400
103355
|
);
|
|
103401
103356
|
} else if (!this.analyzer.isOwnOrBaseConstructorCalledCorrectly(this.node)) {
|
|
103402
103357
|
if (typeContainingFunctionCall !== void 0 && typeContainingFunctionCall.typeEntityKind !== 6 /* Extension */ && !TypeEntity.isWrapperType(typeContainingFunctionCall)) {
|
|
@@ -103414,7 +103369,7 @@ var Resolver5 = class {
|
|
|
103414
103369
|
const receiver = callee.expression.unwrapParenthesizedExpressions();
|
|
103415
103370
|
if (receiver.kind !== 1075 /* ObjectExpression */ && receiver.kind !== 1007 /* BaseExpression */) {
|
|
103416
103371
|
this.diagnostics?.addDiagnostic(this.analyzer.createDiagnostic(
|
|
103417
|
-
|
|
103372
|
+
2292 /* ConstructorCannotBeCalledOnThisInstance */,
|
|
103418
103373
|
receiver
|
|
103419
103374
|
));
|
|
103420
103375
|
}
|
|
@@ -104594,7 +104549,7 @@ var SecondStageResolver = class {
|
|
|
104594
104549
|
const functionEntity = resolutionResult.suitableOrSingleFunction?.entity;
|
|
104595
104550
|
if (functionEntity?.subkind === "method" && TypeMemberEntity.isOrdinaryOrNamedConstructor(functionEntity)) {
|
|
104596
104551
|
this.diagnostics?.addDiagnostic(
|
|
104597
|
-
this.analyzer.createDiagnostic(
|
|
104552
|
+
this.analyzer.createDiagnostic(2293 /* ConstructorMustNotBeReferenced */, this.node)
|
|
104598
104553
|
);
|
|
104599
104554
|
}
|
|
104600
104555
|
return resolutionResult.suitableOrSingleFunction;
|
|
@@ -105527,7 +105482,7 @@ var SecondStageResolver2 = class {
|
|
|
105527
105482
|
const functionEntity = resolutionResult.suitableOrSingleFunction?.entity;
|
|
105528
105483
|
if (functionEntity?.subkind === "method" && TypeMemberEntity.isOrdinaryOrNamedConstructor(functionEntity)) {
|
|
105529
105484
|
this.diagnostics?.addDiagnostic(
|
|
105530
|
-
this.analyzer.createDiagnostic(
|
|
105485
|
+
this.analyzer.createDiagnostic(2293 /* ConstructorMustNotBeReferenced */, this.node.memberName)
|
|
105531
105486
|
);
|
|
105532
105487
|
}
|
|
105533
105488
|
return resolutionResult.suitableOrSingleFunction;
|
|
@@ -109434,7 +109389,7 @@ var Analyzer2 = class extends Analyzer {
|
|
|
109434
109389
|
this.dialectA = analyzerA;
|
|
109435
109390
|
this.type = new Type15(this);
|
|
109436
109391
|
this.returnType = new ReturnType(this);
|
|
109437
|
-
this.entity = new
|
|
109392
|
+
this.entity = new Entity11(this);
|
|
109438
109393
|
this.targetType = new TargetType(this);
|
|
109439
109394
|
this.reachabilityChecker = new ReachabilityChecker(this);
|
|
109440
109395
|
this.semanticContext = new SemanticContextBuilder(this);
|
|
@@ -111979,7 +111934,7 @@ var ReturnType = class {
|
|
|
111979
111934
|
return this.analyzer.getLocalizedStandardTypes(node.locale).text;
|
|
111980
111935
|
}
|
|
111981
111936
|
};
|
|
111982
|
-
var
|
|
111937
|
+
var Entity11 = class {
|
|
111983
111938
|
constructor(analyzer) {
|
|
111984
111939
|
this.analyzer = analyzer;
|
|
111985
111940
|
this.programPackageEntities = /* @__PURE__ */ new Map();
|
|
@@ -117597,7 +117552,7 @@ var SecondStageResolver3 = class {
|
|
|
117597
117552
|
const functionEntity = resolutionResult.suitableOrSingleFunction?.entity;
|
|
117598
117553
|
if (functionEntity?.subkind === "method" && TypeMemberEntity.isOrdinaryOrNamedConstructor(functionEntity)) {
|
|
117599
117554
|
this.diagnostics?.addDiagnostic(
|
|
117600
|
-
this.analyzer.createDiagnostic(
|
|
117555
|
+
this.analyzer.createDiagnostic(2293 /* ConstructorMustNotBeReferenced */, this.node)
|
|
117601
117556
|
);
|
|
117602
117557
|
}
|
|
117603
117558
|
return new Meaning_functionAccess2(
|
|
@@ -118475,7 +118430,7 @@ var SecondStageResolver4 = class {
|
|
|
118475
118430
|
const functionEntity = resolutionResult.suitableOrSingleFunction?.entity;
|
|
118476
118431
|
if (functionEntity?.subkind === "method" && TypeMemberEntity.isOrdinaryOrNamedConstructor(functionEntity)) {
|
|
118477
118432
|
this.diagnostics?.addDiagnostic(
|
|
118478
|
-
this.analyzer.createDiagnostic(
|
|
118433
|
+
this.analyzer.createDiagnostic(2293 /* ConstructorMustNotBeReferenced */, this.node)
|
|
118479
118434
|
);
|
|
118480
118435
|
}
|
|
118481
118436
|
return resolutionResult.suitableOrSingleFunction;
|
|
@@ -120066,7 +120021,7 @@ var Analyzer3 = class _Analyzer extends Analyzer {
|
|
|
120066
120021
|
this.dialectM = new Analyzer2(state, this);
|
|
120067
120022
|
this.type = new Type16(this);
|
|
120068
120023
|
this.returnType = new ReturnType2(this);
|
|
120069
|
-
this.entity = new
|
|
120024
|
+
this.entity = new Entity13(this);
|
|
120070
120025
|
this.targetType = new TargetType2(this);
|
|
120071
120026
|
this.reachabilityChecker = new ReachabilityChecker2(this);
|
|
120072
120027
|
this.resultLocalVariableEntity = new ResultLocalVariableEntity(this);
|
|
@@ -122649,7 +122604,7 @@ var ReturnType2 = class {
|
|
|
122649
122604
|
return this.analyzer.getLocalizedStandardTypes(node.locale).text;
|
|
122650
122605
|
}
|
|
122651
122606
|
};
|
|
122652
|
-
var
|
|
122607
|
+
var Entity13 = class {
|
|
122653
122608
|
constructor(analyzer) {
|
|
122654
122609
|
this.analyzer = analyzer;
|
|
122655
122610
|
this.programPackageEntities = /* @__PURE__ */ new Map();
|