@artel/artc 0.6.25244 → 0.6.25246
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 +36 -22
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +651 -1065
- package/build/{chunk-V7EU2U6Y.js → chunk-BGCXIMTW.js} +2 -2
- package/build/{chunk-C7RKXERX.js → chunk-CNAUD5P6.js} +1 -1
- package/build/{chunk-BAAUJYMH.js → chunk-RIWU6SF4.js} +24430 -21532
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +49 -81
- package/build/types/analysis/Analyzer.d.ts +82 -91
- package/build/types/analysis/ArgumentToParameterMatchResult.d.ts +8 -10
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/BaseExpressionMeaning.d.ts +12 -8
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +8 -10
- package/build/types/analysis/CallExpressionMeaning.d.ts +8 -9
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +4 -7
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +1 -2
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +2 -3
- package/build/types/analysis/DiagnosticArgumentFactory.d.ts +18 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +3 -3
- package/build/types/analysis/DisplayableEntity.d.ts +46 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +19 -20
- package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -7
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +7 -8
- package/build/types/analysis/InstanceFieldsInitializationValidator.d.ts +18 -0
- package/build/types/analysis/Localization.d.ts +19 -25
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +32 -34
- package/build/types/analysis/NamedTypeResolver.d.ts +7 -10
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -7
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +12 -8
- package/build/types/analysis/OwnAndBaseConstructorCallsChecker.d.ts +23 -0
- package/build/types/analysis/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
- package/build/types/analysis/PackageMemberLookup.d.ts +4 -9
- package/build/types/analysis/PackageMemberNameConflictsValidator.d.ts +2 -2
- package/build/types/analysis/SourceFileMembers.d.ts +3 -3
- package/build/types/analysis/TagMeaning.d.ts +19 -22
- package/build/types/analysis/Tags.d.ts +1 -1
- package/build/types/analysis/TypeMemberConflictsValidator.d.ts +2 -2
- package/build/types/analysis/TypeMemberLookup.d.ts +23 -31
- package/build/types/analysis/TypeNarrower.d.ts +1 -0
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -2
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -2
- package/build/types/analysis/WellKnownDeclarations.d.ts +100 -31
- package/build/types/analysis/control-flow/NarrowableReference.d.ts +5 -6
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +5 -6
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +13 -14
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +5 -6
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +8 -9
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +5 -6
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +11 -12
- package/build/types/api/Api.d.ts +0 -3
- package/build/types/common/Displayable.d.ts +13 -0
- package/build/types/common/FormatString.d.ts +2 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/Name.d.ts +9 -14
- package/build/types/common/TreeQuery.d.ts +6 -4
- package/build/types/common/WithDiagnostics.d.ts +3 -4
- package/build/types/common/index.d.ts +1 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +131 -125
- package/build/types/diagnostic/DiagnosticData.d.ts +7 -3
- package/build/types/emitter/EntityMap.d.ts +1 -0
- package/build/types/emitter/Transformer.d.ts +4 -2
- package/build/types/emitter/ir/EmitOptions.d.ts +14 -0
- package/build/types/emitter/ir/Nodes.d.ts +41 -25
- package/build/types/emitter/ir/types.d.ts +1 -1
- package/build/types/entities/AliasTypeEntity.d.ts +9 -41
- package/build/types/entities/AliasedType.d.ts +62 -0
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +1 -1
- package/build/types/entities/ConstructorEntity.d.ts +10 -2
- package/build/types/entities/DereferenceOperatorEntity.d.ts +5 -0
- package/build/types/entities/DestructorEntity.d.ts +6 -2
- package/build/types/entities/EntityHiding.d.ts +1 -1
- package/build/types/entities/EntityLocalizationContext.d.ts +53 -0
- package/build/types/entities/FunctionEntity.d.ts +20 -0
- package/build/types/entities/FunctionTypeEntity.d.ts +15 -4
- package/build/types/entities/GetterEntity.d.ts +15 -2
- package/build/types/entities/IndexerEntity.d.ts +5 -0
- package/build/types/entities/OperatorEntity.d.ts +9 -3
- package/build/types/entities/PackageAliasEntity.d.ts +5 -0
- package/build/types/entities/PackageEntity.d.ts +8 -3
- package/build/types/entities/PackageMembers.d.ts +3 -2
- package/build/types/entities/SetterEntity.d.ts +15 -2
- package/build/types/entities/StructuredTypeEntity.d.ts +64 -15
- package/build/types/entities/TypeEntityMembers.d.ts +2 -5
- package/build/types/entities/TypeExtensionEntity.d.ts +9 -5
- package/build/types/entities/TypeMemberContainer.d.ts +2 -2
- package/build/types/entities/TypeParameterEntity.d.ts +26 -8
- package/build/types/entities/VariableEntity.d.ts +41 -1
- package/build/types/entities/VariantTypeEntity.d.ts +13 -4
- package/build/types/entities/index.d.ts +5 -4
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +54 -0
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +25 -0
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +34 -0
- package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +24 -0
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +75 -0
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +83 -0
- package/build/types/entities/translated/TranslatedGetterEntity.d.ts +25 -0
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +37 -0
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +35 -0
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +28 -0
- package/build/types/entities/translated/TranslatedSetterEntity.d.ts +22 -0
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +107 -0
- package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +28 -0
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +46 -0
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +97 -0
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +76 -0
- package/build/types/project/FileSystemTree.d.ts +2 -2
- package/build/types/project/SourcePackage.d.ts +1 -0
- package/build/types/services/DefinitionService.d.ts +0 -1
- package/build/types/services/DisplayService.d.ts +39 -134
- package/build/types/services/NodeSemanticInfo.d.ts +7 -7
- package/build/types/services/ReferencesService.d.ts +5 -3
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +7 -10
- package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -3
- package/build/types/services/source-generation/SourceGenerationService.d.ts +3 -4
- package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +5 -5
- package/build/types/services/workspace/CompilationController.d.ts +3 -3
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +4 -4
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +4 -4
- package/build/types/services/workspace/Workspace.d.ts +3 -3
- package/build/types/services/workspace/WorkspaceFiles.d.ts +7 -7
- package/build/types/tree/green/Token.d.ts +6 -7
- package/build/types/ts-interop/Entities.d.ts +64 -13
- package/build/types/ts-interop/TsInteropContext.d.ts +17 -5
- package/build/types/ts-interop/TsPackageContents.d.ts +2 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +3 -3
- package/build/types/ts-interop/TsTypeMembersCreator.d.ts +4 -4
- package/build/types/types/StandardTypes.d.ts +3 -2
- package/build/types/types/Substitutions.d.ts +3 -0
- package/build/types/types/Type.d.ts +3 -0
- package/package.json +2 -2
- package/build/types/analysis/EntityLocalizationHelper.d.ts +0 -17
- package/build/types/analysis/FoundDeclaration.d.ts +0 -19
- package/build/types/analysis/LocalizationContext.d.ts +0 -15
- package/build/types/common/SearchName.d.ts +0 -14
- package/build/types/types/Internal.d.ts +0 -1
@@ -74,131 +74,137 @@ export declare enum DiagnosticCode {
|
|
74
74
|
TypeExpected = 235,
|
75
75
|
NameOfTypeOrPackageNotFound = 236,
|
76
76
|
TypeIsNotATag = 237,
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
77
|
+
Operator0IsNotDefinedForTypes1And2 = 238,
|
78
|
+
Operator0IsNotDefinedForType1 = 239,
|
79
|
+
VariantMustHaveAssociatedValue = 240,
|
80
|
+
TranslationsCanOnlyBeDeclaredInTranslationPackage = 241,
|
81
|
+
UnknownTranslatedPackage0 = 242,
|
82
|
+
BaseCannotBeUsedInThisContext = 243,
|
83
|
+
OverriddenMethodNotFound = 244,
|
84
|
+
ObjectCannotBeUsedInThisContext = 245,
|
85
|
+
BaseCannotBeUsedAsAnExpressionInItself = 246,
|
86
|
+
InterfacePackageMustNotContainImplementation = 247,
|
87
|
+
InterfacePackageVariablesMustNotHaveInitializers = 248,
|
88
|
+
BodyIsMissing = 249,
|
89
|
+
AbstractTypeMembersMustNotHaveBody = 250,
|
90
|
+
MembersOfAspectTypeMustNotHaveBody = 251,
|
91
|
+
AspectTypeFieldsMustBeAbstract = 252,
|
92
|
+
DeclarationsMarkedWithBuiltIntoPlatformTagMustNotHaveBody = 253,
|
93
|
+
AbstractFieldsMustNotHaveInitializers = 254,
|
94
|
+
PackageIsAlreadyImported = 255,
|
95
|
+
OnlySubprogramsWithReturnTypeCanReturnValue = 256,
|
96
|
+
FunctionsUsingYieldStatementCannotReturnValue = 257,
|
97
|
+
YieldStatementCannotBeUsedInAnonymousFunctions = 258,
|
98
|
+
YieldStatementCannotBeUsedHere = 259,
|
99
|
+
FunctionsUsingYieldStatementMustHaveEnumerableAsReturnType = 260,
|
100
|
+
YieldStatementCannotBeUsedInTryStatementThatHasCatchClause = 261,
|
101
|
+
YieldStatementCannotBeUsedInFinallyClause = 262,
|
102
|
+
SubprogramMustReturnValue = 263,
|
103
|
+
ResultVariableCannotBeUsedInFunctionsUsingYieldStatement = 264,
|
104
|
+
TypeAliasReferencesItself = 265,
|
105
|
+
TypeParameterHasCircularConstraint = 266,
|
106
|
+
BaseTypeCausesInheritanceCycle = 267,
|
107
|
+
OnlyGenericTypesAndFunctionsCanBeSpecialized = 268,
|
108
|
+
Expected0TypeArguments = 269,
|
109
|
+
ExpectedFrom0To1TypeArguments = 270,
|
110
|
+
Type0IsNotAssignableToConstraint1 = 271,
|
111
|
+
VariableIsDeclaredButItsValueIsNeverRead = 272,
|
112
|
+
FunctionIsDeclaredButNotUsed = 273,
|
113
|
+
TypeParameterIsDeclaredButNotUsed = 274,
|
114
|
+
DefaultConstructorArgumentsMustBeNamed = 275,
|
115
|
+
IncorrectBodyOfBasicAliasTypeMethod = 276,
|
116
|
+
TheFollowingDeclarationsAreNotTranslated0 = 277,
|
117
|
+
TheFollowingDeclarationAreNotTranslated0And1More = 278,
|
118
|
+
OperatorFunction0MustNotHaveParameters = 279,
|
119
|
+
OperatorFunction0MustHaveOneParameter = 280,
|
120
|
+
OperatorFunction0MustHaveNoMoreThanOneParameter = 281,
|
121
|
+
CorrespondingBasicTypeMemberNotFound = 282,
|
122
|
+
AsyncFunctionCanOnlyBeCalledFromFunctionMarkedWithAsyncModifier = 283,
|
123
|
+
TagNotFound = 284,
|
124
|
+
TypeOrFunctionNameExpected = 285,
|
125
|
+
PackageNameOrAliasExpected = 286,
|
126
|
+
ExpressionCanBeNone = 287,
|
127
|
+
TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator = 288,
|
128
|
+
UnreachableCode = 289,
|
129
|
+
RecursionOccurredWhileCalculatingTheTypeOfTheExpression = 290,
|
130
|
+
RecursionOccurredWhileInferringTheTypeOfTheVariable = 291,
|
131
|
+
ScopeAlreadyContainsDeclarationWithTheSameName = 292,
|
132
|
+
ScopeAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 293,
|
133
|
+
ParameterName0ConflictsWithAutomaticallyGeneratedVariableName = 294,
|
134
|
+
PackageAlreadyContainsDeclarationWithTheSameName = 295,
|
135
|
+
PackageAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 296,
|
136
|
+
PackageAlreadyContainsTypeWithTheSameNameAndSameOrIntersectingTypeParameterCount = 297,
|
137
|
+
PackageAliasWithTheSameNameAlreadyExits = 298,
|
138
|
+
TypeAlreadyContainsDeclarationWithTheSameName = 299,
|
139
|
+
TypeAlreadyContainsMethodWithTheSameNameAndParameterTypes = 300,
|
140
|
+
TypeAlreadyContainsConstructorWithTheSameParameterTypes = 301,
|
141
|
+
TypeAlreadyContainsOperatorFunctionWithTheSameParameterTypes = 302,
|
142
|
+
TypeAlreadyContainsIndexerWithTheSameParameterTypes = 303,
|
143
|
+
TypeCanHaveOnlyOneDestructor = 304,
|
144
|
+
TypeCanHaveOnlyOneDereferenceOperator = 305,
|
145
|
+
VariableIsUsedBeforeItsDeclaration = 306,
|
146
|
+
VariableMayNotHasBeenAssignedBeforeUsage = 307,
|
147
|
+
NotAllCodePathsReturnAValueAndResultLocalVariableMayNotHasBeenAssigned = 308,
|
148
|
+
WriteFunctionHasNoCorrespondingReadFunction = 309,
|
149
|
+
TypeCannotHaveMultipleBaseObjectTypes = 310,
|
150
|
+
TypeThatIsNotMarkedAsBasicCannotBeUsedAsBaseType = 311,
|
151
|
+
PlainObjectTypeCannotBeUsedAsBaseType = 312,
|
152
|
+
ThisTypeIsAlreadyListedInBaseTypeList = 313,
|
153
|
+
OnlyObjectAndAspectTypesCanBeUsedAsBaseTypes = 314,
|
154
|
+
PlainObjectTypeCanHaveOnlyAspectsAsBaseTypes = 315,
|
155
|
+
AspectTypeCanHaveOnlyAspectsAsBaseTypes = 316,
|
156
|
+
ModifierListAlreadyContains0Modifier = 317,
|
157
|
+
ModifierListOfOuterDeclarationGroupAlreadyContains0Modifier = 318,
|
158
|
+
_0ModifierIsNotAllowedHere = 319,
|
159
|
+
DeclarationCannotBePlacedInGroupHaving0Modifier = 320,
|
160
|
+
PackageConstructorDeclarationCannotHaveModifiers = 321,
|
161
|
+
PackageEntryPointDeclarationCannotHaveModifiers = 322,
|
162
|
+
TranslationsCannotHaveModifiers = 323,
|
163
|
+
AbstractModifierCanOnlyBeUsedInAbstractObjectTypes = 324,
|
164
|
+
BasicModifierCanOnlyBeUsedInObjectTypesAspectTypesAndTypeAliases = 325,
|
165
|
+
OverrideModifierCanOnlyBeUsedInObjectAndAspectTypes = 326,
|
166
|
+
_0ModifierCannotBeUsedWith1Modifier = 327,
|
167
|
+
VariantDeclarationCannotHaveHiddenModifier = 328,
|
168
|
+
BasicModifierCanOnlyBeAppliedToObjectTypes = 329,
|
169
|
+
AbstractModifierCanOnlyBeAppliedToObjectTypes = 330,
|
170
|
+
NotBasicObjectTypesCannotHaveBasicMembers = 331,
|
171
|
+
BasicModifierCannotBeAppliedToAspectTypeFields = 332,
|
172
|
+
WriteFunctionMustHaveTheSameModifiersAsReadFunction = 333,
|
173
|
+
WriteFunctionMustHaveTheSameOrMoreRestrictiveHidingLevelThenReadFunction = 334,
|
174
|
+
DeclarationConflictsWithBaseTypeMember0 = 335,
|
175
|
+
DeclarationConflictsWithBaseTypeMember0AddOverrideModifier = 336,
|
176
|
+
DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden = 337,
|
177
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 = 338,
|
178
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 = 339,
|
179
|
+
OverridingMemberMustHaveTheSameHidingLevelAsBaseMember0 = 340,
|
180
|
+
OverridingMethodMustBeAsyncBecauseBaseMethod0IsAsync = 341,
|
181
|
+
OverridingMethodMustNotBeAsyncBecauseBaseMethod0IsNotAsync = 342,
|
182
|
+
OverridingFieldMustNotBeConstOrHaveWriteFunctionToMatchBaseField0 = 343,
|
183
|
+
OverridingMemberMustHaveWriteFunctionToMatchBaseMember0 = 344,
|
184
|
+
TypeDoesNotImplementMember0 = 345,
|
185
|
+
TypeDoesNotImplementMember0ImplicitImplementationTypeMismatch1 = 346,
|
186
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsAsync = 347,
|
187
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotAsync = 348,
|
188
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotWriteable = 349,
|
189
|
+
TypeDoesNotImplementMember0ImplicitImplementation1WriteFunctionIsHidden = 350,
|
190
|
+
CannotAccessAbstractMemberOfBaseType = 351,
|
191
|
+
TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 = 352,
|
192
|
+
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 353,
|
193
|
+
EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral = 354,
|
194
|
+
OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral = 355,
|
195
|
+
OnlyIntegerLiteralInRangeFromZeroToNIsAllowedHereAsParameterOfTextTemplateLiteral = 356,
|
196
|
+
OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral = 357,
|
197
|
+
TranslationFunctionIsNotAllowedWhenIndexesAreUsedAsParametersInSourceTextTemplate = 358,
|
198
|
+
UnknownParameterOfTextTemplateTranslation = 359,
|
199
|
+
TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall = 360,
|
200
|
+
ThisCallCausesOwnConstructorCallCycle = 361,
|
201
|
+
OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock = 362,
|
202
|
+
BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock = 363,
|
203
|
+
Field0HasNoInitializerAndMayNotBeAssignedInConstructor = 364,
|
204
|
+
Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 365,
|
205
|
+
Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 366,
|
206
|
+
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 367,
|
207
|
+
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 368,
|
202
208
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
203
209
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
204
210
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
@@ -1,11 +1,15 @@
|
|
1
|
+
import { DisplayableOrPrimitive } from '../common/index.js';
|
1
2
|
import { DiagnosticCode } from './DiagnosticCode.js';
|
2
3
|
export declare class DiagnosticData {
|
3
4
|
readonly code: DiagnosticCode;
|
4
|
-
readonly message: string;
|
5
5
|
readonly kind: DiagnosticKind;
|
6
6
|
readonly flags: DiagnosticFlags;
|
7
|
-
|
8
|
-
|
7
|
+
private _messageFormat;
|
8
|
+
private _formatArguments;
|
9
|
+
private _message;
|
10
|
+
get message(): string;
|
11
|
+
constructor(code: DiagnosticCode, formatMessage: string | undefined, formatArguments: readonly DisplayableOrPrimitive[] | undefined, kind: DiagnosticKind, flags: DiagnosticFlags);
|
12
|
+
static withCode(code: DiagnosticCode, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): DiagnosticData;
|
9
13
|
}
|
10
14
|
export declare const enum DiagnosticKind {
|
11
15
|
Error = 0,
|
@@ -36,6 +36,7 @@ export declare class EntityMap {
|
|
36
36
|
private getPackageEntityInternal;
|
37
37
|
private createTypeMembers;
|
38
38
|
private getContainingPackageAndAccumulateIfMember;
|
39
|
+
private getEntityNameText;
|
39
40
|
private getNameText;
|
40
41
|
private isDefaultExport;
|
41
42
|
private unaliasTypeEntity;
|
@@ -111,7 +111,8 @@ export declare class Transformer {
|
|
111
111
|
transformJsInstanceOfExpressionChildren(expression: ir.JsInstanceOfExpression): void;
|
112
112
|
transformJsIdentifierExpressionChildren(_expression: ir.JsIdentifierExpression): void;
|
113
113
|
transformDereferenceExpressionChildren(expression: ir.DereferenceExpression): void;
|
114
|
-
|
114
|
+
transformValueJsObjectLiteralProperty(property: ir.ValueJsObjectLiteralProperty): ir.ValueJsObjectLiteralProperty;
|
115
|
+
transformFunctionJsObjectLiteralProperty(property: ir.FunctionJsObjectLiteralProperty): ir.FunctionJsObjectLiteralProperty;
|
115
116
|
transformSpreadJsObjectLiteralProperty(property: ir.SpreadJsObjectLiteralProperty): ir.SpreadJsObjectLiteralProperty;
|
116
117
|
transformDecorator(node: ir.Decorator): ir.Decorator;
|
117
118
|
private transformStatementsAndAddHoistedLocalVariables;
|
@@ -209,7 +210,8 @@ export interface TransformationConfig {
|
|
209
210
|
transformArguments?(declaration: ir.Arguments): NodeTransformationResult<ir.Arguments>;
|
210
211
|
transformCatchClause?(clause: ir.CatchClause): NodeTransformationResult<ir.CatchClause>;
|
211
212
|
transformFinallyClause?(clause: ir.FinallyClause): NodeTransformationResult<ir.FinallyClause>;
|
212
|
-
|
213
|
+
transformValueJsObjectLiteralProperty?(clause: ir.ValueJsObjectLiteralProperty): NodeTransformationResult<ir.ValueJsObjectLiteralProperty>;
|
214
|
+
transformFunctionJsObjectLiteralProperty?(clause: ir.FunctionJsObjectLiteralProperty): NodeTransformationResult<ir.FunctionJsObjectLiteralProperty>;
|
213
215
|
transformSpreadJsObjectLiteralProperty?(clause: ir.SpreadJsObjectLiteralProperty): NodeTransformationResult<ir.SpreadJsObjectLiteralProperty>;
|
214
216
|
transformDecorator?(node: ir.Decorator): NodeTransformationResult<ir.Decorator>;
|
215
217
|
}
|
@@ -174,4 +174,18 @@ declare const enum ErrorStatementEmitOptionsFlags {
|
|
174
174
|
None = 0,
|
175
175
|
WrapExpressionInError = 1
|
176
176
|
}
|
177
|
+
export declare class ForStatementEmitOptions {
|
178
|
+
private _flags;
|
179
|
+
constructor(flags?: ForStatementEmitOptionsFlags);
|
180
|
+
constructor(addExplicitCallOfEnumeratorMethodIfRequired: boolean);
|
181
|
+
static default(): ForStatementEmitOptions;
|
182
|
+
get addExplicitCallOfEnumeratorMethodIfRequired(): boolean;
|
183
|
+
set addExplicitCallOfEnumeratorMethodIfRequired(value: boolean);
|
184
|
+
setAddExplicitCallOfEnumeratorMethodIfRequired(value: boolean): this;
|
185
|
+
clone(): ForStatementEmitOptions;
|
186
|
+
}
|
187
|
+
declare const enum ForStatementEmitOptionsFlags {
|
188
|
+
None = 0,
|
189
|
+
AddExplicitCallOfEnumeratorMethodIfRequired = 1
|
190
|
+
}
|
177
191
|
export {};
|
@@ -2,7 +2,7 @@ import { AccessKind } from '../../common/index.js';
|
|
2
2
|
import { FunctionEntity, NamedEntity, Type, TypeOrExtensionEntity, VariableEntity } from '../Entities.js';
|
3
3
|
import { AccessedFunction, AccessedVariable } from './AccessedEntities.js';
|
4
4
|
import { ComputedAccess } from './ComputedAccess.js';
|
5
|
-
import { AssignmentEmitOptions, CallExpressionEmitOptions, ConstructorCallExpressionEmitOptions, DeclarationWithInitializerEmitOptions, ErrorStatementEmitOptions, FieldAccessExpressionEmitOptions, FieldDeclarationEmitOptions, FunctionAccessExpressionEmitOptions, MethodDeclarationEmitOptions, PackageVariableDeclarationEmitOptions, TextTemplateLiteralEmitOptions } from './EmitOptions.js';
|
5
|
+
import { AssignmentEmitOptions, CallExpressionEmitOptions, ConstructorCallExpressionEmitOptions, DeclarationWithInitializerEmitOptions, ErrorStatementEmitOptions, FieldAccessExpressionEmitOptions, FieldDeclarationEmitOptions, ForStatementEmitOptions, FunctionAccessExpressionEmitOptions, MethodDeclarationEmitOptions, PackageVariableDeclarationEmitOptions, TextTemplateLiteralEmitOptions } from './EmitOptions.js';
|
6
6
|
import { SourceLocation } from './SourceLocation.js';
|
7
7
|
import { Expression, LValueExpression, PackageMemberDeclaration, Statement, TypeMemberDeclaration } from './types.js';
|
8
8
|
export declare class ArrayLiteral {
|
@@ -239,9 +239,11 @@ export declare class ForStatement {
|
|
239
239
|
indexVariableEntity: VariableEntity | undefined;
|
240
240
|
enumeratedExpression: Expression;
|
241
241
|
body: BlockStatement;
|
242
|
+
ifExpressionIsNotEnumerableThenEnumeratorMethod: AccessedFunction | undefined;
|
242
243
|
sourceLocation: SourceLocation | undefined;
|
244
|
+
options: ForStatementEmitOptions;
|
243
245
|
readonly kind = NodeKind.ForStatement;
|
244
|
-
constructor(label: string | undefined, enumerationVariableEntity: VariableEntity, indexVariableEntity: VariableEntity | undefined, enumeratedExpression: Expression, body: BlockStatement, sourceLocation: SourceLocation | undefined);
|
246
|
+
constructor(label: string | undefined, enumerationVariableEntity: VariableEntity, indexVariableEntity: VariableEntity | undefined, enumeratedExpression: Expression, body: BlockStatement, ifExpressionIsNotEnumerableThenEnumeratorMethod: AccessedFunction | undefined, sourceLocation: SourceLocation | undefined, options?: ForStatementEmitOptions);
|
245
247
|
clone(): ForStatement;
|
246
248
|
}
|
247
249
|
export declare class IfStatement {
|
@@ -363,14 +365,27 @@ export declare class JsObjectLiteral {
|
|
363
365
|
constructor(properties: readonly JsObjectLiteralProperty[], sourceLocation: SourceLocation | undefined);
|
364
366
|
clone(): JsObjectLiteral;
|
365
367
|
}
|
366
|
-
export type JsObjectLiteralProperty =
|
367
|
-
export
|
368
|
-
|
368
|
+
export type JsObjectLiteralProperty = ValueJsObjectLiteralProperty | FunctionJsObjectLiteralProperty | SpreadJsObjectLiteralProperty;
|
369
|
+
export type JsObjectLiteralPropertyKey = string | Expression;
|
370
|
+
export declare namespace JsObjectLiteralPropertyKey {
|
371
|
+
function clone(value: JsObjectLiteralPropertyKey): JsObjectLiteralPropertyKey;
|
372
|
+
}
|
373
|
+
export declare class ValueJsObjectLiteralProperty {
|
374
|
+
key: JsObjectLiteralPropertyKey;
|
369
375
|
value: Expression;
|
370
376
|
sourceLocation: SourceLocation | undefined;
|
371
|
-
readonly kind = NodeKind.
|
372
|
-
constructor(
|
373
|
-
clone():
|
377
|
+
readonly kind = NodeKind.ValueJsObjectLiteralProperty;
|
378
|
+
constructor(key: JsObjectLiteralPropertyKey, value: Expression, sourceLocation: SourceLocation | undefined);
|
379
|
+
clone(): ValueJsObjectLiteralProperty;
|
380
|
+
}
|
381
|
+
export declare class FunctionJsObjectLiteralProperty {
|
382
|
+
key: JsObjectLiteralPropertyKey;
|
383
|
+
valueParameters: readonly ValueParameterDeclaration[];
|
384
|
+
body: BlockStatement;
|
385
|
+
sourceLocation: SourceLocation | undefined;
|
386
|
+
readonly kind = NodeKind.FunctionJsObjectLiteralProperty;
|
387
|
+
constructor(key: JsObjectLiteralPropertyKey, valueParameters: readonly ValueParameterDeclaration[], body: BlockStatement, sourceLocation: SourceLocation | undefined);
|
388
|
+
clone(): FunctionJsObjectLiteralProperty;
|
374
389
|
}
|
375
390
|
/**
|
376
391
|
* @example
|
@@ -983,23 +998,24 @@ export declare const enum NodeKind {
|
|
983
998
|
EsModuleImportDirectiveStatement = 78,
|
984
999
|
CjsModuleImportDirectiveStatement = 79,
|
985
1000
|
JsObjectLiteral = 80,
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1001
|
+
ValueJsObjectLiteralProperty = 81,
|
1002
|
+
FunctionJsObjectLiteralProperty = 82,
|
1003
|
+
SpreadJsObjectLiteralProperty = 83,
|
1004
|
+
JsPropertyAccessExpression = 84,
|
1005
|
+
JsFunctionLiteral = 85,
|
1006
|
+
JsTypeOfExpression = 86,
|
1007
|
+
JsInstanceOfExpression = 87,
|
1008
|
+
JsIdentifierExpression = 88,
|
1009
|
+
DereferenceExpression = 89,
|
1010
|
+
BaseExpression = 90,
|
1011
|
+
OwnConstructorCallExpression = 91,
|
1012
|
+
DereferencedVariableGetterDeclaration = 92,
|
1013
|
+
DereferencedVariableSetterDeclaration = 93,
|
1014
|
+
JsNamespaceDestructuringStatement = 94,
|
1015
|
+
ComputedFieldDeclaration = 95,
|
1016
|
+
TextWithEntityName = 96,
|
1017
|
+
Arguments = 97,
|
1018
|
+
Decorator = 98
|
1003
1019
|
}
|
1004
1020
|
export declare const enum AssignmentOperatorKind {
|
1005
1021
|
Equals = 0,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as ir from './Nodes.js';
|
2
|
-
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageFunctionDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.MethodAccessExpression | ir.FieldAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedFunctionDeclaration | ir.NestedFunctionDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NumericLiteral | ir.CatchClause | ir.FunctionAccessExpression | ir.FunctionLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.MethodDeclaration | ir.FieldDeclaration | ir.ComputedFieldDeclaration | ir.FieldGetterDeclaration | ir.FieldSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.
|
2
|
+
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageFunctionDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.MethodAccessExpression | ir.FieldAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedFunctionDeclaration | ir.NestedFunctionDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NumericLiteral | ir.CatchClause | ir.FunctionAccessExpression | ir.FunctionLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.MethodDeclaration | ir.FieldDeclaration | ir.ComputedFieldDeclaration | ir.FieldGetterDeclaration | ir.FieldSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.ValueJsObjectLiteralProperty | ir.FunctionJsObjectLiteralProperty | ir.SpreadJsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.DereferencedVariableGetterDeclaration | ir.DereferencedVariableSetterDeclaration | ir.TextWithEntityName | ir.Argument | ir.Arguments | ir.Decorator;
|
3
3
|
export type Declaration = ir.PackageFunctionDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.NestedFunctionDeclaration | ir.LocalVariableDeclaration | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.MethodDeclaration | ir.FieldDeclaration | ir.FieldGetterDeclaration | ir.FieldSetterDeclaration | ir.ValueParameterDeclaration | ir.VariantDeclaration | ir.DereferencedVariableGetterDeclaration | ir.DereferencedVariableSetterDeclaration;
|
4
4
|
export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedFunctionDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.WhileStatement | ir.YieldStatement | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement;
|
5
5
|
export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NoneLiteral | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.MethodAccessExpression | ir.FieldAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.NumericLiteral | ir.FunctionAccessExpression | ir.FunctionLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.DereferenceExpression | ir.TextLiteral | ir.TextWithEntityName | ir.TextTemplateLiteral | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.VariableAccessExpression | ir.BaseConstructorCallExpression | ir.JsIndexedAccessExpression | ir.JsObjectLiteral | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.BaseExpression | ir.OwnConstructorCallExpression;
|
@@ -1,10 +1,10 @@
|
|
1
|
+
import { Localization } from '../analysis/Localization.js';
|
1
2
|
import { Tag } from '../analysis/Tags.js';
|
2
3
|
import { Analyzer } from '../analysis/index.js';
|
3
4
|
import { Name } from '../common/index.js';
|
4
5
|
import { PackageAliasTypeDeclaration } from '../tree/index.js';
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
import { DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, ITypeEntity, PackageEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
6
|
+
import { TypeEntityMembers } from './TypeEntityMembers.js';
|
7
|
+
import { AliasedType, DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, ITypeEntity, PackageEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
8
8
|
export interface AliasTypeEntity extends ITypeEntity {
|
9
9
|
readonly kind: EntityKind.Type;
|
10
10
|
readonly typeEntityKind: TypeEntityKind.Alias;
|
@@ -16,11 +16,13 @@ export interface AliasTypeEntity extends ITypeEntity {
|
|
16
16
|
getAliasedType(): AliasedType;
|
17
17
|
getTypeParameters(): readonly TypeParameterEntity[];
|
18
18
|
getDefinition(): AliasTypeEntityDefinition;
|
19
|
-
getMembers():
|
19
|
+
getMembers(): TypeEntityMembers;
|
20
20
|
getArity(): number;
|
21
21
|
isHidden(): EntityHidingLevel | undefined;
|
22
22
|
getTags(): readonly Tag[];
|
23
23
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
24
|
+
getLocalization(): Localization;
|
25
|
+
getOriginalEntity(): AliasTypeEntity;
|
24
26
|
}
|
25
27
|
export type AliasTypeEntityDefinition = {
|
26
28
|
kind: DefinitionKind.Source;
|
@@ -28,42 +30,6 @@ export type AliasTypeEntityDefinition = {
|
|
28
30
|
} | {
|
29
31
|
kind: DefinitionKind.TypeScript;
|
30
32
|
};
|
31
|
-
/**
|
32
|
-
* Класс позволяет работать с правой частью тождественного типа (с "aliased type"), исключая циклы.
|
33
|
-
*
|
34
|
-
* Пример цикла:
|
35
|
-
* ```artel
|
36
|
-
* тип А = Б
|
37
|
-
* тип Б = А
|
38
|
-
* ```
|
39
|
-
*
|
40
|
-
* Для типа `А` в поле `declared` будет указан тип `Б`, а в поле `cycleFree` - тип `unresolved`, чтобы разорвать цикл,
|
41
|
-
* созданный типами `А` и `Б`.
|
42
|
-
*/
|
43
|
-
export declare class AliasedType {
|
44
|
-
/**
|
45
|
-
* Правая часть тождественного типа, указанная пользователем.
|
46
|
-
*/
|
47
|
-
readonly declared: types.Type;
|
48
|
-
private readonly _analyzer;
|
49
|
-
private _state;
|
50
|
-
/**
|
51
|
-
* Правая часть тождественного типа, указанная пользователем, либо тип `unresolved`,
|
52
|
-
* если указанный тип приводит к циклу.
|
53
|
-
*/
|
54
|
-
get cycleFree(): types.Type;
|
55
|
-
/**
|
56
|
-
* Приводит ли указанная пользователем правая часть тождественного типа к циклу?
|
57
|
-
*/
|
58
|
-
get causesCycle(): boolean;
|
59
|
-
constructor(analyzer: Analyzer, declared: types.Type);
|
60
|
-
private getAliasedTypeResolutionResult;
|
61
|
-
/**
|
62
|
-
* @param circularityTrackingStack Если элементом массива является `false`, тип не создаёт цикл, если `true` - создаёт.
|
63
|
-
*/
|
64
|
-
private resolveAliasedType;
|
65
|
-
private checkIfTypeFormsCycle;
|
66
|
-
}
|
67
33
|
export declare class PackageAliasTypeDeclarationEntity implements AliasTypeEntity {
|
68
34
|
private readonly _analyzer;
|
69
35
|
private readonly _node;
|
@@ -79,11 +45,13 @@ export declare class PackageAliasTypeDeclarationEntity implements AliasTypeEntit
|
|
79
45
|
getContainingPackage(): PackageEntity;
|
80
46
|
getAliasedType(): AliasedType;
|
81
47
|
getTypeParameters(): readonly TypeParameterEntity[];
|
82
|
-
getMembers():
|
48
|
+
getMembers(): TypeEntityMembers;
|
83
49
|
getDefinition(): AliasTypeEntityDefinition;
|
84
50
|
getArity(): number;
|
85
51
|
isHidden(): EntityHidingLevel | undefined;
|
86
52
|
getTags(): readonly Tag[];
|
87
53
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
88
54
|
getContext(): EntityContext;
|
55
|
+
getLocalization(): Localization;
|
56
|
+
getOriginalEntity(): AliasTypeEntity;
|
89
57
|
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { Analyzer } from '../analysis/index.js';
|
2
|
+
import * as types from '../types/index.js';
|
3
|
+
/**
|
4
|
+
* Класс позволяет работать с правой частью тождественного типа (с "aliased type"), исключая циклы.
|
5
|
+
*
|
6
|
+
* Пример цикла:
|
7
|
+
* ```artel
|
8
|
+
* тип А = Б
|
9
|
+
* тип Б = А
|
10
|
+
* ```
|
11
|
+
*
|
12
|
+
* Для типа `А` в поле `declared` будет указан тип `Б`, а в поле `cycleFree` - тип `unresolved`, чтобы разорвать цикл,
|
13
|
+
* созданный типами `А` и `Б`.
|
14
|
+
*/
|
15
|
+
export declare abstract class AliasedType {
|
16
|
+
/**
|
17
|
+
* Правая часть тождественного типа, указанная пользователем.
|
18
|
+
*/
|
19
|
+
abstract readonly declared: types.Type;
|
20
|
+
/**
|
21
|
+
* Правая часть тождественного типа, указанная пользователем, либо тип `unresolved`,
|
22
|
+
* если указанный тип приводит к циклу.
|
23
|
+
*/
|
24
|
+
abstract cycleFree: types.Type;
|
25
|
+
/**
|
26
|
+
* Приводит ли указанная пользователем правая часть тождественного типа к циклу?
|
27
|
+
*/
|
28
|
+
abstract causesCycle: boolean;
|
29
|
+
/**
|
30
|
+
* @param circularityTrackingStack Если элементом массива является `false`, тип не создаёт цикл, если `true` - создаёт.
|
31
|
+
*/
|
32
|
+
abstract resolveAliasedType(circularityTrackingStack: boolean[]): CycleFreeAliasedTypeResolutionResult;
|
33
|
+
}
|
34
|
+
export declare class OriginalAliasedType extends AliasedType {
|
35
|
+
/**
|
36
|
+
* Правая часть тождественного типа, указанная пользователем.
|
37
|
+
*/
|
38
|
+
readonly declared: types.Type;
|
39
|
+
private readonly _analyzer;
|
40
|
+
private _state;
|
41
|
+
/**
|
42
|
+
* Правая часть тождественного типа, указанная пользователем, либо тип `unresolved`,
|
43
|
+
* если указанный тип приводит к циклу.
|
44
|
+
*/
|
45
|
+
get cycleFree(): types.Type;
|
46
|
+
/**
|
47
|
+
* Приводит ли указанная пользователем правая часть тождественного типа к циклу?
|
48
|
+
*/
|
49
|
+
get causesCycle(): boolean;
|
50
|
+
constructor(analyzer: Analyzer, declared: types.Type);
|
51
|
+
/**
|
52
|
+
* @param circularityTrackingStack Если элементом массива является `false`, тип не создаёт цикл, если `true` - создаёт.
|
53
|
+
*/
|
54
|
+
resolveAliasedType(circularityTrackingStack: boolean[]): CycleFreeAliasedTypeResolutionResult;
|
55
|
+
private getAliasedTypeResolutionResult;
|
56
|
+
private checkIfTypeFormsCycle;
|
57
|
+
}
|
58
|
+
export declare class CycleFreeAliasedTypeResolutionResult {
|
59
|
+
readonly type: types.Type;
|
60
|
+
readonly causesCycle: boolean;
|
61
|
+
constructor(type: types.Type, causesCycle: boolean);
|
62
|
+
}
|
@@ -6,6 +6,6 @@ export declare abstract class BaseEntityHidingMatcher implements IEntityHidingMa
|
|
6
6
|
protected abstract typeEntity: TypeEntity | undefined;
|
7
7
|
protected abstract sourceFile: SourceFile | undefined;
|
8
8
|
protected abstract package: PackageEntity;
|
9
|
-
matches(hiding: EntityHidingLevel): boolean;
|
9
|
+
matches(hiding: EntityHidingLevel | undefined): boolean;
|
10
10
|
private collectBaseTypesRecursively;
|
11
11
|
}
|