@artel/artc 0.6.25223 → 0.6.25225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +85 -79
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +797 -674
  5. package/build/{chunk-DZNNWICP.js → chunk-TFTCV5R5.js} +6604 -5875
  6. package/build/{chunk-AX3LQ2CF.js → chunk-UB6LHKS5.js} +3 -3
  7. package/build/{chunk-LG4Z4SWO.js → chunk-Z6TZA6SN.js} +3 -3
  8. package/build/types/analysis/AccessedFunction.d.ts +53 -0
  9. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +16 -15
  10. package/build/types/analysis/Analyzer.d.ts +142 -127
  11. package/build/types/analysis/CallExpressionMeaning.d.ts +10 -10
  12. package/build/types/analysis/DiagnosticCollector.d.ts +17 -17
  13. package/build/types/analysis/EntityLocalizationHelper.d.ts +6 -6
  14. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +10 -10
  15. package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -0
  16. package/build/types/analysis/LocalizationContext.d.ts +2 -2
  17. package/build/types/analysis/{PropertyAccessExpressionMeaning.d.ts → MemberAccessExpressionMeaning.d.ts} +27 -21
  18. package/build/types/analysis/NamedTypeResolver.d.ts +5 -1
  19. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -1
  20. package/build/types/analysis/NodeTypeUtils.d.ts +13 -13
  21. package/build/types/analysis/OperationOverloadResolver.d.ts +1 -1
  22. package/build/types/analysis/Scope.d.ts +15 -15
  23. package/build/types/analysis/SemanticContext.d.ts +29 -29
  24. package/build/types/analysis/SemanticContextBuilder.d.ts +22 -22
  25. package/build/types/analysis/SourceFileMembers.d.ts +2 -2
  26. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +12 -12
  27. package/build/types/analysis/{SubstitutedMethod.d.ts → SubstitutedFunction.d.ts} +14 -14
  28. package/build/types/analysis/TagMeaning.d.ts +23 -20
  29. package/build/types/analysis/Tags.d.ts +6 -6
  30. package/build/types/analysis/TypeNarrower.d.ts +21 -21
  31. package/build/types/analysis/Utils.d.ts +15 -3
  32. package/build/types/analysis/WellKnownDeclarations.d.ts +4 -4
  33. package/build/types/analysis/control-flow/GraphBuilder.d.ts +43 -0
  34. package/build/types/analysis/{ControlFlowGraphVisualizer.d.ts → control-flow/GraphVisualizer.d.ts} +3 -3
  35. package/build/types/analysis/control-flow/NarrowableExpression.d.ts +5 -0
  36. package/build/types/analysis/control-flow/Nodes.d.ts +91 -0
  37. package/build/types/analysis/control-flow/index.d.ts +4 -0
  38. package/build/types/api/Api.d.ts +3 -3
  39. package/build/types/common/HelperPhrases.d.ts +3 -2
  40. package/build/types/diagnostic/DiagnosticCode.d.ts +130 -131
  41. package/build/types/emitter/EmitPhaseName.d.ts +8 -8
  42. package/build/types/emitter/Emitter.d.ts +4 -4
  43. package/build/types/emitter/EmitterContext.d.ts +2 -2
  44. package/build/types/emitter/Entities.d.ts +31 -29
  45. package/build/types/emitter/EntityMap.d.ts +8 -8
  46. package/build/types/emitter/IrBuilder.d.ts +18 -18
  47. package/build/types/emitter/IrToJs.d.ts +9 -9
  48. package/build/types/emitter/Transformer.d.ts +37 -37
  49. package/build/types/emitter/ir/AccessedEntities.d.ts +5 -5
  50. package/build/types/emitter/ir/ComputedAccess.d.ts +5 -5
  51. package/build/types/emitter/ir/EmitOptions.d.ts +41 -27
  52. package/build/types/emitter/ir/Nodes.d.ts +141 -140
  53. package/build/types/emitter/ir/types.d.ts +8 -8
  54. package/build/types/entities/ConstructorEntity.d.ts +9 -9
  55. package/build/types/entities/DereferenceOperatorEntity.d.ts +4 -4
  56. package/build/types/entities/DestructorEntity.d.ts +4 -4
  57. package/build/types/entities/{MethodEntity.d.ts → FunctionEntity.d.ts} +36 -36
  58. package/build/types/entities/{MethodTypeEntity.d.ts → FunctionTypeEntity.d.ts} +23 -23
  59. package/build/types/entities/GetterEntity.d.ts +9 -9
  60. package/build/types/entities/IndexerEntity.d.ts +4 -4
  61. package/build/types/entities/SetterEntity.d.ts +9 -9
  62. package/build/types/entities/TypeEntity.d.ts +3 -3
  63. package/build/types/entities/TypeEntityMembers.d.ts +3 -3
  64. package/build/types/entities/TypeParameterEntity.d.ts +2 -2
  65. package/build/types/entities/VariableEntity.d.ts +32 -32
  66. package/build/types/entities/index.d.ts +14 -14
  67. package/build/types/services/CompletionService.d.ts +8 -9
  68. package/build/types/services/DisplayService.d.ts +72 -69
  69. package/build/types/services/HoverService.d.ts +1 -1
  70. package/build/types/services/NodeSemanticInfo.d.ts +26 -21
  71. package/build/types/services/SemanticTokensService.d.ts +6 -6
  72. package/build/types/services/SourceFileItemsService.d.ts +11 -11
  73. package/build/types/services/TypeDefinitionService.d.ts +2 -2
  74. package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +10 -10
  75. package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -1
  76. package/build/types/services/source-generation/EntityToSyntax.d.ts +10 -9
  77. package/build/types/tree/NodeKind.d.ts +27 -27
  78. package/build/types/tree/green/Nodes.d.ts +127 -128
  79. package/build/types/tree/green/SyntaxFactory.d.ts +20 -19
  80. package/build/types/tree/green/SyntaxToCode.d.ts +23 -21
  81. package/build/types/tree/red/Nodes.d.ts +173 -172
  82. package/build/types/ts-interop/Entities.d.ts +28 -28
  83. package/build/types/ts-interop/TsInteropContext.d.ts +2 -1
  84. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
  85. package/build/types/ts-interop/TsTypeMembersCreator.d.ts +1 -1
  86. package/build/types/types/{MethodType.d.ts → FunctionType.d.ts} +6 -6
  87. package/build/types/types/IntersectionType.d.ts +20 -0
  88. package/build/types/types/ParameterType.d.ts +6 -3
  89. package/build/types/types/StandardTypes.d.ts +2 -2
  90. package/build/types/types/Type.d.ts +3 -2
  91. package/build/types/types/TypeFactory.d.ts +8 -6
  92. package/build/types/types/TypeMembers.d.ts +8 -8
  93. package/build/types/types/index.d.ts +2 -1
  94. package/package.json +1 -1
  95. package/build/types/analysis/AccessedMethod.d.ts +0 -53
  96. package/build/types/analysis/ControlFlowGraphBuilder.d.ts +0 -129
@@ -14,14 +14,13 @@ import * as tree from '../tree/index.js';
14
14
  import { TsInteropContext, TsProgramState } from '../ts-interop/TsInteropContext.js';
15
15
  import * as types from '../types/index.js';
16
16
  import { TypeFactory } from '../types/index.js';
17
- import { AccessedMethod } from './AccessedMethod.js';
17
+ import { AccessedFunction } from './AccessedFunction.js';
18
18
  import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
19
19
  import { ArgumentToParameterMatchResult, MatchResultValueParameter } from './ArgumentToParameterMatchResult.js';
20
20
  import * as autotypeCallExpressionMeaning from './AutotypeCallExpressionMeaning.js';
21
21
  import * as baseExpressionMeaning from './BaseExpressionMeaning.js';
22
22
  import * as callExpressionMeaning from './CallExpressionMeaning.js';
23
23
  import * as constructorOverloadResolver from './ConstructorOverloadResolver.js';
24
- import { ControlFlowGraphBuildResult } from './ControlFlowGraphBuilder.js';
25
24
  import { DeclarationsUsageCountResult } from './DeclarationsUsageCounter.js';
26
25
  import * as dereferenceExpressionMeaning from './DereferenceExpressionMeaning.js';
27
26
  import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
@@ -30,12 +29,12 @@ import { ImportedPackageNameTree, PackageNameTreeNode } from './ImportedPackageN
30
29
  import * as indexedAccessExpressionMeaning from './IndexedAccessExpressionMeaning.js';
31
30
  import { WithLocalization } from './Localization.js';
32
31
  import { LocalizationContext } from './LocalizationContext.js';
32
+ import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
33
33
  import { ModifierFlags } from './ModifierFlags.js';
34
34
  import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
35
- import { GetterDeclaration, MethodTypeDeclaration, PackageVariableAccessorDeclaration, SetterDeclaration, StructuredTypeDeclaration, TypeDereferencedVariableAccessorDeclaration, TypeIndexedAccessorDeclaration, TypeVariableAccessorDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
35
+ import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, SetterDeclaration, StructuredTypeDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
36
36
  import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
37
37
  import * as operationOverloadResolver from './OperationOverloadResolver.js';
38
- import * as propertyAccessExpressionResolution from './PropertyAccessExpressionMeaning.js';
39
38
  import * as scope from './Scope.js';
40
39
  import { SemanticContextBuilder } from './SemanticContextBuilder.js';
41
40
  import { SourceFileMembers as ActualSourceFileMembers } from './SourceFileMembers.js';
@@ -43,10 +42,11 @@ import * as tagMeaning from './TagMeaning.js';
43
42
  import * as tags from './Tags.js';
44
43
  import { TargetTypeHint } from './TargetTypeHint.js';
45
44
  import * as typeOverloadResolver from './TypeOverloadResolver.js';
45
+ import * as controlFlow from './control-flow/index.js';
46
46
  import { WellKnownDeclarations } from './index.js';
47
47
  export declare class Analyzer {
48
48
  static readonly enumeratorMethodName = "\u043F\u0435\u0440\u0435\u0431\u043E\u0440";
49
- static readonly methodTypeInvokeMethodName = "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C";
49
+ static readonly functionTypeInvokeMethodName = "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C";
50
50
  readonly compilation: project.Compilation;
51
51
  /**
52
52
  * Пакет с именем 'Артель', содержащий стандартные типы.
@@ -69,11 +69,12 @@ export declare class Analyzer {
69
69
  readonly linkedEntity: LinkedEntity;
70
70
  readonly owningPlainObjectModificationCheck: OwningPlainObjectModificationCheck;
71
71
  readonly packageImports: PackageImports;
72
+ readonly typeUtils: TypeUtils;
72
73
  private readonly _tsInteropInputs;
73
74
  private readonly _targetType;
74
75
  private readonly _typeAssignabilityCheck;
75
76
  private readonly _tsInterop;
76
- private readonly _propertyAccessExpressionResolutionResults;
77
+ private readonly _memberAccessExpressionResolutionResults;
77
78
  private readonly _sourceFileMembers;
78
79
  private readonly _callExpressionMeanings;
79
80
  private readonly _indexedAccessExpressionResolutionResults;
@@ -87,8 +88,8 @@ export declare class Analyzer {
87
88
  private readonly _prefixUnaryExpressionOperatorResolutionResults;
88
89
  private readonly _binaryExpressionUserDefinableOperatorResolutionResults;
89
90
  private readonly _assignmentStatementOperatorResolutionResults;
90
- private readonly _methodEntitySignatureTypes;
91
- private readonly _valueParametersOfMethodBlockLiterals;
91
+ private readonly _functionEntitySignatureTypes;
92
+ private readonly _valueParametersOfFunctionBlockLiterals;
92
93
  private readonly _extendedTypes;
93
94
  private readonly _analyzedTranslationPackages;
94
95
  private readonly _linkedMultiPlatformPackagesByPlatform;
@@ -112,14 +113,14 @@ export declare class Analyzer {
112
113
  getSyntacticAccessKind(node: tree.Expression): SyntacticAccessKind;
113
114
  getTypeMemberEntityContainer(node: tree.TypeMemberDeclaration): e.TypeMemberEntityContainer;
114
115
  getTargetTypeOfExpression(node: tree.Expression, hint?: TargetTypeHint): types.Type | undefined;
115
- getUnambiguousTargetMethodType(targetType: types.Type | undefined): types.MethodType | undefined;
116
+ getUnambiguousTargetFunctionType(targetType: types.Type | undefined): types.FunctionType | undefined;
116
117
  getUnambiguousTargetArrayType(targetType: types.Type | undefined): types.Type | undefined;
117
118
  getEnumeratorElementType(node: tree.Node): types.Type | undefined;
118
- resolveMethodOverloadByCallExpression<TCandidate extends operationOverloadResolver.ICandidate<TValueParameter>, TValueParameter extends operationOverloadResolver.IValueParameter>(candidates: readonly TCandidate[], node: tree.CallExpression): readonly TCandidate[];
119
- resolveMethodOverloadByTargetType<TCandidate extends operationOverloadResolver.ICandidate<TValueParameter>, TValueParameter extends operationOverloadResolver.IValueParameter>(candidates: readonly TCandidate[], targetType: types.MethodType): readonly TCandidate[];
119
+ resolveFunctionOverloadByCallExpression<TCandidate extends operationOverloadResolver.ICandidate<TValueParameter>, TValueParameter extends operationOverloadResolver.IValueParameter>(candidates: readonly TCandidate[], node: tree.CallExpression): readonly TCandidate[];
120
+ resolveFunctionOverloadByTargetType<TCandidate extends operationOverloadResolver.ICandidate<TValueParameter>, TValueParameter extends operationOverloadResolver.IValueParameter>(candidates: readonly TCandidate[], targetType: types.FunctionType): readonly TCandidate[];
120
121
  resolveConstructorOverload<TCandidate extends constructorOverloadResolver.ICandidate<TValueParameter>, TValueParameter extends constructorOverloadResolver.IValueParameter>(candidates: readonly TCandidate[], args: readonly tree.Argument[]): readonly TCandidate[];
121
122
  resolveTypeOverloadByArgumentCount<TCandidate extends typeOverloadResolver.ICandidate>(candidates: readonly TCandidate[], argumentCount: number): readonly TCandidate[];
122
- resolvePropertyAccessExpression(node: tree.PropertyAccessExpression, targetTypeHint?: TargetTypeHint): propertyAccessExpressionResolution.ResolutionResult;
123
+ resolveMemberAccessExpression(node: tree.MemberAccessExpression, targetTypeHint?: TargetTypeHint): memberAccessExpressionResolution.ResolutionResult;
123
124
  enumeratePackageImports(packageImportDirectives: Iterable<tree.PackageImportDirective>): Iterable<tree.PackageImport>;
124
125
  getSourceFileMembers(node: tree.SourceFile): ActualSourceFileMembers;
125
126
  getCallExpressionMeaning(node: tree.CallExpression): callExpressionMeaning.Meaning;
@@ -161,7 +162,7 @@ export declare class Analyzer {
161
162
  */
162
163
  isExpressionOptionalChainingSyntactically(node: tree.Expression): boolean;
163
164
  isExpressionValidOutermostOptionalChaining(node: tree.Expression): boolean;
164
- makeNoneAssignableToTypeIfExpressionValidOutermostOptionalChaining(type: types.Type, node: tree.Expression): types.Type;
165
+ includeNoneToTypeIfExpressionValidOutermostOptionalChaining(type: types.Type, node: tree.Expression): types.Type;
165
166
  checkIdentifierNameIsReserved(name: string, locale: PackageLocale): ReservedIdentifierKind | undefined;
166
167
  getReservedIdentifierName(reservedIdentifierKind: ReservedIdentifierKind, locale: PackageLocale): string;
167
168
  createNameFromIdentifier(node: tree.Identifier): Name;
@@ -171,7 +172,7 @@ export declare class Analyzer {
171
172
  typeIsValidBaseAspectType(type: types.Type): boolean;
172
173
  getImplicitBaseTypeForStructuredType(entity: e.StructuredTypeEntity): types.StructuredType | undefined;
173
174
  getImplicitBaseTypeForVariantType(): types.StructuredType;
174
- getImplicitBaseTypeForMethodType(): types.StructuredType;
175
+ getImplicitBaseTypeForFunctionType(): types.StructuredType;
175
176
  resolveNamedTypeSpecifier(node: tree.NamedTypeSpecifier): NamedTypeSpecifierResolutionResult;
176
177
  checkExpressionDenotesType(expression: tree.Expression): {
177
178
  type: types.Type | undefined;
@@ -179,7 +180,7 @@ export declare class Analyzer {
179
180
  checkExpressionDenotesPackageAlias(expression: tree.Expression): {
180
181
  packageAlias: e.PackageAliasEntity;
181
182
  } | undefined;
182
- checkExpressionDenotesMethod(expression: tree.Expression): ExpressionDenotesMethodCheckResult | undefined;
183
+ checkExpressionDenotesFunction(expression: tree.Expression): ExpressionDenotesFunctionCheckResult | undefined;
183
184
  checkExpressionDenotesOperator(expression: tree.Expression): ExpressionDenotesOperatorCheckResult | undefined;
184
185
  checkExpressionDenotesPackageNameSegment(expression: tree.Expression): {
185
186
  packageTreeNode: PackageNameTreeNode;
@@ -194,7 +195,7 @@ export declare class Analyzer {
194
195
  getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
195
196
  getPackageEntities(): readonly e.PackageEntity[];
196
197
  getPackageEntity(name: PackageName): e.PackageEntity | undefined;
197
- createMethodTypeInvokeMethod(entity: e.MethodTypeEntity): e.TypeMethodEntity;
198
+ createFunctionTypeInvokeMethod(entity: e.FunctionTypeEntity): e.MethodEntity;
198
199
  /**
199
200
  * Преобразует тип таким образом, чтобы он не мог содержать значение `пусто`.
200
201
  * После преобразования метод `canTypeBeNone` вернёт `true` для полученного типа.
@@ -223,7 +224,7 @@ export declare class Analyzer {
223
224
  * - Т: Объект? -> (Т: Объект?) | Пусто (см. метод isNoneAssignableToType)
224
225
  * - Т: Объект -> (Т: Объект) | Пусто
225
226
  */
226
- makeNoneAssignableToType(type: types.Type): types.Type;
227
+ includeNoneToType(type: types.Type): types.Type;
227
228
  /**
228
229
  * Отвечает на вопрос "Совместим ли тип `Пусто` с данным типом?" (Можно ли присвоить `пусто` в переменную с данным типом?).
229
230
  * @example Для следующих типов метод вернёт:
@@ -233,15 +234,14 @@ export declare class Analyzer {
233
234
  */
234
235
  isNoneAssignableToType(type: types.Type): boolean;
235
236
  excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
236
- isMethodValueParameterVariadic(entity: e.VariableEntity): boolean;
237
+ isValueParameterVariadic(entity: e.VariableEntity): boolean;
237
238
  getDefaultTypeParameterConstraint(): types.Type;
238
- getOriginalSignatureTypeOfMethodEntity(entity: e.MethodEntity): types.MethodType;
239
- getMethodBlockLiteralValueParameters(node: tree.MethodBlockLiteral): readonly e.VariableEntity[];
239
+ getOriginalSignatureTypeOfFunctionEntity(entity: e.FunctionEntity): types.FunctionType;
240
+ getFunctionBlockLiteralValueParameters(node: tree.FunctionBlockLiteral): readonly e.VariableEntity[];
240
241
  getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
241
242
  getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
242
243
  getAnalyzedTranslationPackageForPackage(entity: e.PackageEntity, locale: PackageLocale): AnalyzedTranslationPackage | undefined;
243
244
  enumerateAnalyzedTranslationPackages(): Iterable<AnalyzedTranslationPackage>;
244
- getCommonObjectAndAspectTypesOfUnion(_unionType: types.UnionType): readonly types.StructuredType[];
245
245
  getLinkedMultiPlatformPackagesByPlatform(entity: e.PackageEntity): ReadonlyMap<PlatformKind, LinkedMultiPlatformPackage> | undefined;
246
246
  getLinkedMultiPlatformPackage(entity: e.PackageEntity, platform: PlatformKind): LinkedMultiPlatformPackage | undefined;
247
247
  createPackageMembers(pkg: SourcePackage): OriginalPackageMembers;
@@ -253,17 +253,21 @@ export declare class Analyzer {
253
253
  isFunctionResultNone(node: tree.FunctionBlock): boolean;
254
254
  isExpressionImplicitlyReturnedFromSubprogram(node: tree.ExpressionStatement): boolean;
255
255
  createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
256
- createBackingTypeVariables(declaredMembers: readonly NamedTypeMemberEntity[], type: e.TypeEntity): e.TypeVariableEntity[];
256
+ createBackingFields(declaredMembers: readonly NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
257
257
  createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
258
258
  createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
259
259
  createDiagnostic(code: DiagnosticCode, location: DiagnosticLocation | undefined, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
260
260
  createNodeDiagnosticLocation(node: tree.Node): DiagnosticLocation;
261
261
  getDeclaredTypeMemberEntities(node: tree.TypeMemberDeclarationBlock): DeclaredTypeMemberEntities;
262
- getRedefinableMethodOfOriginalTypeForRedefinableMethodOfAliasType(entity: e.TypeMethodEntity): e.TypeMethodEntity | undefined;
263
- checkBodyOfRedefinableAliasTypeMethod(node: tree.TypeMethodDeclaration, diagnostics?: DiagnosticAcceptor): {
264
- redefinableMethodOfOriginalType: e.TypeMethodEntity;
262
+ getRedefinableMethodOfOriginalTypeForRedefinableMethodOfAliasType(entity: e.MethodEntity): e.MethodEntity | undefined;
263
+ checkBodyOfRedefinableAliasTypeMethod(node: tree.MethodDeclaration, diagnostics?: DiagnosticAcceptor): {
264
+ redefinableMethodOfOriginalType: e.MethodEntity;
265
265
  } | undefined;
266
- getControlFlowGraph(sourceFile: project.SourceFile): ControlFlowGraphBuildResult;
266
+ getControlFlowGraph(sourceFile: project.SourceFile): controlFlow.GraphBuildResult;
267
+ createAmbiguousEntityAccessDiagnostic(entities: readonly WithLocalization<e.Entity>[], lctx: LocalizationContext, node: tree.Node): Diagnostic;
268
+ createAmbiguousFunctionAccessDiagnostic(functions: readonly WithLocalization<AccessedFunction>[], lctx: LocalizationContext, node: tree.Node): Diagnostic;
269
+ createAmbiguousTypeMemberAccessDiagnostic(members: readonly WithLocalization<types.TypeMember>[], lctx: LocalizationContext, node: tree.Node): Diagnostic;
270
+ createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly WithLocalization<scope.NamedDeclaration>[], lctx: LocalizationContext, node: tree.Node): Diagnostic;
267
271
  private createTsInterop;
268
272
  }
269
273
  export declare class TsInteropInputs {
@@ -292,15 +296,16 @@ export declare const enum SyntacticAccessKind {
292
296
  declare class Type {
293
297
  private readonly _analyzer;
294
298
  private readonly _unionTypeSpecifierTypes;
295
- private readonly _methodLiteralTypes;
296
- private readonly _methodBlockLiteralTypes;
299
+ private readonly _intersectionTypeSpecifierTypes;
300
+ private readonly _functionLiteralTypes;
301
+ private readonly _functionBlockLiteralTypes;
297
302
  constructor(_analyzer: Analyzer);
298
303
  ofExpression(node: tree.Expression, targetTypeHint?: TargetTypeHint): types.Type;
299
304
  ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
300
- ofAccessedMethod(accessedMethod: WithLocalization<AccessedMethod>): types.Type;
305
+ ofAccessedFunction(accessedFunction: WithLocalization<AccessedFunction>): types.Type;
301
306
  ofAccessedOperator(operator: WithLocalization<types.Operator>): types.Type;
302
- ofMethodBlockLiteral(node: tree.MethodBlockLiteral, targetTypeHint?: TargetTypeHint): types.MethodType;
303
- ofMethodLiteral(node: tree.MethodLiteral, targetTypeHint?: TargetTypeHint): types.MethodType;
307
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral, targetTypeHint?: TargetTypeHint): types.FunctionType;
308
+ ofFunctionLiteral(node: tree.FunctionLiteral, targetTypeHint?: TargetTypeHint): types.FunctionType;
304
309
  private ofArrayLiteral;
305
310
  private ofAssertionExpression;
306
311
  private ofAssumptionExpression;
@@ -313,7 +318,7 @@ declare class Type {
313
318
  private ofIsExpression;
314
319
  private ofParenthesizedExpression;
315
320
  private ofPrefixUnaryExpression;
316
- private ofPropertyAccessExpression;
321
+ private ofMemberAccessExpression;
317
322
  private ofReferenceExpression;
318
323
  private ofDereferenceExpression;
319
324
  private ofWhenTernaryExpression;
@@ -330,29 +335,30 @@ declare class Type {
330
335
  private ofParenthesizedTypeSpecifier;
331
336
  private ofNullableTypeSpecifier;
332
337
  private ofUnionTypeSpecifier;
338
+ private ofIntersectionTypeSpecifier;
333
339
  private ofInvalidTypeSpecifier;
334
- private getTargetlessMethodBlockLiteralType;
335
- private inferMethodLiteralTypeFromNodeWithFallbackToTargetType;
336
- private inferMethodLiteralTypeFromNode;
340
+ private getTargetlessFunctionBlockLiteralType;
341
+ private inferFunctionLiteralTypeFromNodeWithFallbackToTargetType;
342
+ private inferFunctionLiteralTypeFromNode;
337
343
  private getNarrowedTypeIfNarrowableReference;
338
344
  }
339
345
  declare class ReturnType {
340
346
  private readonly _analyzer;
341
347
  constructor(_analyzer: Analyzer);
342
- ofAnonymousMethodTypeDeclaration(node: tree.AnonymousMethodTypeDeclaration): types.Type;
343
- ofMethodBlockLiteral(node: tree.MethodBlockLiteral): types.Type;
344
- ofPackageMethodDeclaration(node: tree.PackageMethodDeclaration): types.Type;
345
- ofPackageMethodTypeDeclaration(node: tree.PackageMethodTypeDeclaration): types.Type;
346
- ofNestedMethodDeclaration(node: tree.NestedMethodDeclaration): types.Type;
347
- ofMethodLiteral(node: tree.MethodLiteral): types.Type;
348
- ofTypeMethodDeclaration(node: tree.TypeMethodDeclaration): types.Type;
348
+ ofAnonymousFunctionTypeDeclaration(node: tree.AnonymousFunctionTypeDeclaration): types.Type;
349
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): types.Type;
350
+ ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): types.Type;
351
+ ofPackageFunctionTypeDeclaration(node: tree.PackageFunctionTypeDeclaration): types.Type;
352
+ ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): types.Type;
353
+ ofFunctionLiteral(node: tree.FunctionLiteral): types.Type;
354
+ ofMethodDeclaration(node: tree.MethodDeclaration): types.Type;
349
355
  ofOperatorDeclaration(node: tree.OperatorDeclaration): types.Type;
350
356
  }
351
357
  declare class Entity {
352
358
  private readonly _analyzer;
353
359
  private readonly _packageEntities;
354
360
  private readonly _packageVariableEntities;
355
- private readonly _typeVariableEntities;
361
+ private readonly _fieldEntities;
356
362
  private readonly _parameterVariableEntities;
357
363
  private readonly _localVariableEntities;
358
364
  private readonly _typeParameterEntities;
@@ -362,12 +368,12 @@ declare class Entity {
362
368
  private readonly _anonymousStructuredTypeEntities;
363
369
  private readonly _packageVariantTypeEntities;
364
370
  private readonly _anonymousVariantTypeEntities;
365
- private readonly _packageMethodTypeEntities;
366
- private readonly _anonymousMethodTypeEntities;
371
+ private readonly _packageFunctionTypeEntities;
372
+ private readonly _anonymousFunctionTypeEntities;
367
373
  private readonly _aliasTypeEntities;
368
- private readonly _packageMethodEntities;
369
- private readonly _typeMethodEntities;
370
- private readonly _nestedMethodEntities;
374
+ private readonly _packageFunctionEntities;
375
+ private readonly _methodEntities;
376
+ private readonly _nestedFunctionEntities;
371
377
  private readonly _constructorEntities;
372
378
  private readonly _operatorEntities;
373
379
  private readonly _destructorEntities;
@@ -379,49 +385,49 @@ declare class Entity {
379
385
  ofPackage(pkg: SourcePackage): e.PackageEntity;
380
386
  ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
381
387
  ofComputedPackageVariableDeclaration(node: PackageVariableAccessorDeclaration): e.PackageVariableEntity;
382
- ofTypeVariableDeclaration(node: tree.TypeVariableDeclaration): e.TypeVariableEntity;
383
- ofComputedTypeVariableDeclaration(node: TypeVariableAccessorDeclaration): e.TypeVariableEntity;
388
+ ofFieldDeclaration(node: tree.FieldDeclaration): e.FieldEntity;
389
+ ofComputedFieldDeclaration(node: FieldAccessorDeclaration): e.FieldEntity;
384
390
  ofLocalVariableDeclaration(node: tree.LocalVariableDeclaration): e.LocalVariableEntity;
385
391
  ofEnumerationVariableDeclaration(node: tree.EnumerationVariableDeclaration): e.LocalVariableEntity;
386
392
  ofErrorVariableDeclaration(node: tree.ErrorVariableDeclaration): e.LocalVariableEntity;
387
393
  ofParameterDeclaration(node: tree.ParameterDeclaration): e.ParameterVariableEntity;
388
394
  ofTypeParameterDeclaration(node: tree.TypeParameterDeclaration): e.TypeParameterEntity;
389
- ofTypeIndexerDeclaration(node: TypeIndexedAccessorDeclaration): e.SourceIndexerEntity;
390
- ofTypeDereferenceOperatorDeclaration(node: TypeDereferencedVariableAccessorDeclaration): e.DereferenceOperatorEntity;
395
+ ofIndexerDeclaration(node: IndexedElementAccessorDeclaration): e.SourceIndexerEntity;
396
+ ofDereferenceOperatorDeclaration(node: DereferencedVariableAccessorDeclaration): e.DereferenceOperatorEntity;
391
397
  ofPackageStructuredTypeDeclaration(node: tree.PackageStructuredTypeDeclaration): e.PackageStructuredTypeEntity;
392
398
  ofAnonymousStructuredTypeDeclaration(node: tree.AnonymousStructuredTypeDeclaration): e.AnonymousStructuredTypeEntity;
393
399
  ofStructuredTypeDeclaration(node: StructuredTypeDeclaration): e.StructuredTypeEntity;
394
- ofPackageMethodTypeDeclaration(node: tree.PackageMethodTypeDeclaration): e.PackageMethodTypeEntity;
395
- ofAnonymousMethodTypeDeclaration(node: tree.AnonymousMethodTypeDeclaration): e.AnonymousMethodTypeEntity;
396
- ofMethodTypeDeclaration(node: MethodTypeDeclaration): e.MethodTypeEntity;
400
+ ofPackageFunctionTypeDeclaration(node: tree.PackageFunctionTypeDeclaration): e.PackageFunctionTypeEntity;
401
+ ofAnonymousFunctionTypeDeclaration(node: tree.AnonymousFunctionTypeDeclaration): e.AnonymousFunctionTypeEntity;
402
+ ofFunctionTypeDeclaration(node: FunctionTypeDeclaration): e.FunctionTypeEntity;
397
403
  ofPackageVariantTypeDeclaration(node: tree.PackageVariantTypeDeclaration): e.PackageVariantTypeEntity;
398
404
  ofAnonymousVariantTypeDeclaration(node: tree.AnonymousVariantTypeDeclaration): e.AnonymousVariantTypeEntity;
399
405
  ofVariantTypeDeclaration(node: VariantTypeDeclaration): e.VariantTypeEntity;
400
406
  ofPackageAliasTypeDeclaration(node: tree.PackageAliasTypeDeclaration): e.AliasTypeEntity;
401
- ofPackageMethodDeclaration(node: tree.PackageMethodDeclaration): e.PackageMethodEntity;
402
- ofTypeMethodDeclaration(node: tree.TypeMethodDeclaration): e.TypeMethodEntity;
403
- ofNestedMethodDeclaration(node: tree.NestedMethodDeclaration): e.NestedMethodEntity;
407
+ ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.PackageFunctionEntity;
408
+ ofMethodDeclaration(node: tree.MethodDeclaration): e.MethodEntity;
409
+ ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.NestedFunctionEntity;
404
410
  ofOperatorDeclaration(node: tree.OperatorDeclaration): e.OperatorEntity;
405
411
  ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.GetterEntity;
406
- ofTypeVariableGetterDeclaration(node: tree.TypeVariableGetterDeclaration): e.GetterEntity;
407
- ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration): e.GetterEntity;
408
- ofTypeDereferencedVariableGetterDeclaration(node: tree.TypeDereferencedVariableGetterDeclaration): e.GetterEntity;
412
+ ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.GetterEntity;
413
+ ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.GetterEntity;
414
+ ofDereferencedVariableGetterDeclaration(node: tree.DereferencedVariableGetterDeclaration): e.GetterEntity;
409
415
  ofGetterDeclaration(node: GetterDeclaration): e.GetterEntity;
410
416
  ofPackageVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration): e.SetterEntity;
411
- ofTypeVariableSetterDeclaration(node: tree.TypeVariableSetterDeclaration): e.SetterEntity;
412
- ofTypeIndexedSetterDeclaration(node: tree.TypeIndexedSetterDeclaration): e.SetterEntity;
413
- ofTypeDereferencedVariableSetterDeclaration(node: tree.TypeDereferencedVariableSetterDeclaration): e.SetterEntity;
417
+ ofFieldSetterDeclaration(node: tree.FieldSetterDeclaration): e.SetterEntity;
418
+ ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.SetterEntity;
419
+ ofDereferencedVariableSetterDeclaration(node: tree.DereferencedVariableSetterDeclaration): e.SetterEntity;
414
420
  ofSetterDeclaration(node: SetterDeclaration): e.SetterEntity;
415
- ofTypeConstructorDeclaration(node: tree.TypeConstructorDeclaration): e.ConstructorEntity;
416
- ofTypeDestructorDeclaration(node: tree.TypeDestructorDeclaration): e.DestructorEntity;
417
- ofVariantDeclaration(node: tree.VariantDeclaration): e.TypeVariableEntity;
421
+ ofConstructorDeclaration(node: tree.ConstructorDeclaration): e.ConstructorEntity;
422
+ ofDestructorDeclaration(node: tree.DestructorDeclaration): e.DestructorEntity;
423
+ ofVariantDeclaration(node: tree.VariantDeclaration): e.FieldEntity;
418
424
  ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): e.TypeExtensionEntity;
419
425
  ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
420
426
  private getContainingPackageLoadedFromDts;
421
- private createComputedTypeVariableEntities;
422
- private createTypeDereferenceOperatorEntities;
423
- private createTypeIndexerEntities;
424
- private areTypeIndexedAccessorDeclarationsEqual;
427
+ private createComputedFieldEntities;
428
+ private createDereferenceOperatorEntities;
429
+ private createIndexerEntities;
430
+ private areIndexedElementAccessorDeclarationsEqual;
425
431
  }
426
432
  type EntityClassMembers = Entity[keyof Entity];
427
433
  type GetNodesFromMethodsParameter<T> = T extends (node: infer TNode) => e.Entity ? (TNode extends tree.Node ? TNode : never) : never;
@@ -430,16 +436,16 @@ declare class ResultLocalVariableEntity {
430
436
  private readonly _analyzer;
431
437
  private readonly _entities;
432
438
  constructor(_analyzer: Analyzer);
433
- ofPackageMethodDeclaration(node: tree.PackageMethodDeclaration): e.LocalVariableEntity;
434
- ofTypeMethodDeclaration(node: tree.TypeMethodDeclaration): e.LocalVariableEntity;
435
- ofNestedMethodDeclaration(node: tree.NestedMethodDeclaration): e.LocalVariableEntity;
436
- ofMethodLiteral(node: tree.MethodLiteral): e.LocalVariableEntity;
437
- ofMethodBlockLiteral(node: tree.MethodBlockLiteral): e.LocalVariableEntity;
439
+ ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.LocalVariableEntity;
440
+ ofMethodDeclaration(node: tree.MethodDeclaration): e.LocalVariableEntity;
441
+ ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.LocalVariableEntity;
442
+ ofFunctionLiteral(node: tree.FunctionLiteral): e.LocalVariableEntity;
443
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.LocalVariableEntity;
438
444
  ofOperatorDeclaration(node: tree.OperatorDeclaration): e.LocalVariableEntity;
439
445
  ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.LocalVariableEntity;
440
- ofTypeVariableGetterDeclaration(node: tree.TypeVariableGetterDeclaration): e.LocalVariableEntity;
441
- ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration): e.LocalVariableEntity;
442
- ofTypeDereferencedVariableGetterDeclaration(node: tree.TypeDereferencedVariableGetterDeclaration): e.LocalVariableEntity;
446
+ ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.LocalVariableEntity;
447
+ ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.LocalVariableEntity;
448
+ ofDereferencedVariableGetterDeclaration(node: tree.DereferencedVariableGetterDeclaration): e.LocalVariableEntity;
443
449
  private createResultLocalVariableEntity;
444
450
  }
445
451
  declare class ValueLocalVariableEntity {
@@ -447,64 +453,64 @@ declare class ValueLocalVariableEntity {
447
453
  private readonly _entities;
448
454
  constructor(_analyzer: Analyzer);
449
455
  ofPackageVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration): e.VariableEntity;
450
- ofTypeVariableSetterDeclaration(node: tree.TypeVariableSetterDeclaration): e.VariableEntity;
451
- ofTypeIndexedSetterDeclaration(node: tree.TypeIndexedSetterDeclaration): e.VariableEntity;
452
- ofTypeDereferencedVariableSetterDeclaration(node: tree.TypeDereferencedVariableSetterDeclaration): e.VariableEntity;
456
+ ofFieldSetterDeclaration(node: tree.FieldSetterDeclaration): e.VariableEntity;
457
+ ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.VariableEntity;
458
+ ofDereferencedVariableSetterDeclaration(node: tree.DereferencedVariableSetterDeclaration): e.VariableEntity;
453
459
  }
454
460
  declare class Scope {
455
461
  private readonly _analyzer;
456
462
  private readonly _sourceFileScopes;
457
- private readonly _methodBlockLiteralScopes;
458
- private readonly _packageMethodDeclarationTypeParametersScopes;
459
- private readonly _packageMethodDeclarationValueParametersScopes;
460
- private readonly _structuredTypeMethodDeclarationTypeParametersScopes;
461
- private readonly _structuredTypeMethodDeclarationValueParametersScopes;
462
- private readonly _nestedMethodDeclarationTypeParametersScopes;
463
- private readonly _nestedMethodDeclarationValueParametersScopes;
464
- private readonly _methodLiteralScopes;
463
+ private readonly _functionBlockLiteralScopes;
464
+ private readonly _packageFunctionDeclarationTypeParametersScopes;
465
+ private readonly _packageFunctionDeclarationValueParametersScopes;
466
+ private readonly _structuredMethodDeclarationTypeParametersScopes;
467
+ private readonly _structuredMethodDeclarationValueParametersScopes;
468
+ private readonly _nestedFunctionDeclarationTypeParametersScopes;
469
+ private readonly _nestedFunctionDeclarationValueParametersScopes;
470
+ private readonly _functionLiteralScopes;
465
471
  private readonly _functionBlockScopes;
466
472
  private readonly _statementBlockScopes;
467
473
  private readonly _forEachStatementScopes;
468
474
  private readonly _catchClauseScopes;
469
475
  private readonly _packageStructuredTypeDeclarationTypeParametersScopes;
470
476
  private readonly _structuredTypeDeclarationBodyScopes;
471
- private readonly _packageMethodTypeDeclarationTypeParametersScopes;
472
- private readonly _methodTypeDeclarationBodyScopes;
477
+ private readonly _packageFunctionTypeDeclarationTypeParametersScopes;
478
+ private readonly _functionTypeDeclarationBodyScopes;
473
479
  private readonly _packageVariantTypeDeclarationTypeParametersScopes;
474
480
  private readonly _variantTypeDeclarationBodyScopes;
475
481
  private readonly _aliasTypeDeclarationBodyScopes;
476
482
  private readonly _packageAliasTypeDeclarationTypeParametersScopes;
477
483
  private readonly _operatorDeclarationScopes;
478
- private readonly _structuredTypeConstructorDeclarationScopes;
479
- private readonly _structuredTypeDestructorDeclarationScopes;
480
- private readonly _typeIndexedAccessorDeclarationParametersScopes;
484
+ private readonly _structuredConstructorDeclarationScopes;
485
+ private readonly _structuredDestructorDeclarationScopes;
486
+ private readonly _indexedElementAccessorDeclarationParametersScopes;
481
487
  private readonly _typeExtensionDeclarationScopes;
482
488
  constructor(_analyzer: Analyzer);
483
489
  ofSourceFile(node: tree.SourceFile): scope.IScope;
484
- ofMethodBlockLiteral(node: tree.MethodBlockLiteral): scope.IScope;
485
- ofPackageMethodDeclarationTypeParameters(node: tree.PackageMethodDeclaration): scope.IScope;
486
- ofPackageMethodDeclarationValueParameters(node: tree.PackageMethodDeclaration): scope.IScope;
487
- ofTypeMethodDeclarationTypeParameters(node: tree.TypeMethodDeclaration): scope.IScope;
488
- ofTypeMethodDeclarationValueParameters(node: tree.TypeMethodDeclaration): scope.IScope;
489
- ofNestedMethodDeclarationTypeParameters(node: tree.NestedMethodDeclaration): scope.IScope;
490
- ofNestedMethodDeclarationValueParameters(node: tree.NestedMethodDeclaration): scope.IScope;
491
- ofMethodLiteral(node: tree.MethodLiteral): scope.IScope;
490
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): scope.IScope;
491
+ ofPackageFunctionDeclarationTypeParameters(node: tree.PackageFunctionDeclaration): scope.IScope;
492
+ ofPackageFunctionDeclarationValueParameters(node: tree.PackageFunctionDeclaration): scope.IScope;
493
+ ofMethodDeclarationTypeParameters(node: tree.MethodDeclaration): scope.IScope;
494
+ ofMethodDeclarationValueParameters(node: tree.MethodDeclaration): scope.IScope;
495
+ ofNestedFunctionDeclarationTypeParameters(node: tree.NestedFunctionDeclaration): scope.IScope;
496
+ ofNestedFunctionDeclarationValueParameters(node: tree.NestedFunctionDeclaration): scope.IScope;
497
+ ofFunctionLiteral(node: tree.FunctionLiteral): scope.IScope;
492
498
  ofFunctionBlock(node: tree.FunctionBlock): scope.IScope;
493
499
  ofStatementBlock(node: tree.StatementBlock): scope.IScope;
494
500
  ofForStatement(node: tree.ForStatement): scope.IScope;
495
501
  ofCatchClause(node: tree.CatchClause): scope.IScope;
496
502
  ofPackageStructuredTypeDeclarationTypeParameters(node: tree.PackageStructuredTypeDeclaration): scope.IScope;
497
503
  ofStructuredTypeDeclarationBody(node: tree.StructuredTypeDeclarationBody): scope.IScope;
498
- ofPackageMethodTypeDeclarationTypeParameters(node: tree.PackageMethodTypeDeclaration): scope.IScope;
499
- ofMethodTypeDeclarationBody(node: tree.MethodTypeDeclarationBody): scope.IScope;
504
+ ofPackageFunctionTypeDeclarationTypeParameters(node: tree.PackageFunctionTypeDeclaration): scope.IScope;
505
+ ofFunctionTypeDeclarationBody(node: tree.FunctionTypeDeclarationBody): scope.IScope;
500
506
  ofPackageVariantTypeDeclarationTypeParameters(node: tree.PackageVariantTypeDeclaration): scope.IScope;
501
507
  ofVariantTypeDeclarationBody(node: tree.VariantTypeDeclarationBody): scope.IScope;
502
508
  ofAliasTypeDeclarationBody(node: tree.AliasTypeDeclarationBody): scope.IScope;
503
509
  ofPackageAliasTypeDeclarationTypeParameters(node: tree.PackageAliasTypeDeclaration): scope.IScope;
504
510
  ofOperatorDeclaration(node: tree.OperatorDeclaration): scope.IScope;
505
- ofTypeConstructorDeclaration(node: tree.TypeConstructorDeclaration): scope.IScope;
506
- ofTypeDestructorDeclaration(node: tree.TypeDestructorDeclaration): scope.IScope;
507
- ofTypeIndexedAccessorDeclarationParameters(node: TypeIndexedAccessorDeclaration): scope.IScope;
511
+ ofConstructorDeclaration(node: tree.ConstructorDeclaration): scope.IScope;
512
+ ofDestructorDeclaration(node: tree.DestructorDeclaration): scope.IScope;
513
+ ofIndexedElementAccessorDeclarationParameters(node: IndexedElementAccessorDeclaration): scope.IScope;
508
514
  ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): scope.IScope;
509
515
  }
510
516
  declare class DefaultConstructors {
@@ -518,11 +524,11 @@ declare class DefaultConstructors {
518
524
  declare class OverriddenMember {
519
525
  private readonly _analyzer;
520
526
  constructor(_analyzer: Analyzer);
521
- getOverriddenVariables(node: tree.TypeVariableDeclaration | TypeVariableAccessorDeclaration): types.Variable[];
522
- getOverriddenMethods(node: tree.TypeMethodDeclaration): types.Method[];
527
+ getOverriddenVariables(node: tree.FieldDeclaration | FieldAccessorDeclaration): types.Variable[];
528
+ getOverriddenMethods(node: tree.MethodDeclaration): types.Method[];
523
529
  getOverriddenOperators(node: tree.OperatorDeclaration): types.Operator[];
524
- getOverriddenIndexers(node: TypeIndexedAccessorDeclaration): types.Indexer[];
525
- getOverriddenDereferenceOperators(node: TypeDereferencedVariableAccessorDeclaration): types.DereferenceOperator[];
530
+ getOverriddenIndexers(node: IndexedElementAccessorDeclaration): types.Indexer[];
531
+ getOverriddenDereferenceOperators(node: DereferencedVariableAccessorDeclaration): types.DereferenceOperator[];
526
532
  private findOverriddenVariableInType;
527
533
  private findOverriddenMethodInType;
528
534
  private findOverriddenOperatorInType;
@@ -555,9 +561,9 @@ declare class LinkedEntity {
555
561
  ofTypeWithMembers(entity: e.TypeEntityWithMembers, platform: PlatformKind): e.TypeEntityWithMembers | undefined;
556
562
  ofParameterType(entity: e.TypeParameterEntity, platform: PlatformKind): e.TypeParameterEntity | undefined;
557
563
  ofPackageVariable(entity: e.PackageVariableEntity, platform: PlatformKind): e.PackageVariableEntity | undefined;
558
- ofPackageMethod(entity: e.PackageMethodEntity, platform: PlatformKind): e.PackageMethodEntity | undefined;
559
- ofTypeVariable(entity: e.TypeVariableEntity, platform: PlatformKind): e.TypeVariableEntity | undefined;
560
- ofTypeMethod(entity: e.TypeMethodEntity, platform: PlatformKind): e.TypeMethodEntity | undefined;
564
+ ofPackageFunction(entity: e.PackageFunctionEntity, platform: PlatformKind): e.PackageFunctionEntity | undefined;
565
+ ofField(entity: e.FieldEntity, platform: PlatformKind): e.FieldEntity | undefined;
566
+ ofMethod(entity: e.MethodEntity, platform: PlatformKind): e.MethodEntity | undefined;
561
567
  ofOperator(entity: e.OperatorEntity, platform: PlatformKind): e.OperatorEntity | undefined;
562
568
  ofConstructor(entity: e.ConstructorEntity, platform: PlatformKind): e.ConstructorEntity | undefined;
563
569
  ofIndexer(entity: e.IndexerEntity, platform: PlatformKind): e.IndexerEntity | undefined;
@@ -576,7 +582,7 @@ export declare class LinkedMultiPlatformPackage {
576
582
  private get memberLookup();
577
583
  constructor(analyzer: Analyzer, pkg: e.PackageEntity, implementationPackage: e.PackageEntity, targetPlatform: PlatformKind);
578
584
  getLinkedVariable(entity: e.PackageVariableEntity): e.PackageVariableEntity | undefined;
579
- getLinkedMethod(entity: e.PackageMethodEntity): e.PackageMethodEntity | undefined;
585
+ getLinkedMethod(entity: e.PackageFunctionEntity): e.PackageFunctionEntity | undefined;
580
586
  getLinkedTypeWithMembers(entity: e.TypeEntityWithMembers): LinkedTypeWithMembers | undefined;
581
587
  getLinkedParameterType(entity: e.TypeParameterEntity): e.TypeParameterEntity | undefined;
582
588
  /**
@@ -596,8 +602,8 @@ export declare class LinkedTypeWithMembers {
596
602
  private readonly _memberLookup;
597
603
  private get memberLookup();
598
604
  constructor(analyzer: Analyzer, externalType: e.TypeEntityWithMembers, targetType: e.TypeEntityWithMembers, linkedPackage: LinkedMultiPlatformPackage);
599
- getLinkedVariable(entity: e.TypeVariableEntity): e.TypeVariableEntity | undefined;
600
- getLinkedMethod(entity: e.TypeMethodEntity): e.TypeMethodEntity | undefined;
605
+ getLinkedVariable(entity: e.FieldEntity): e.FieldEntity | undefined;
606
+ getLinkedMethod(entity: e.MethodEntity): e.MethodEntity | undefined;
601
607
  getLinkedOperator(entity: e.OperatorEntity): e.OperatorEntity | undefined;
602
608
  getLinkedConstructor(entity: e.ConstructorEntity): e.ConstructorEntity | undefined;
603
609
  getLinkedIndexer(entity: e.IndexerEntity): e.IndexerEntity | undefined;
@@ -616,7 +622,7 @@ export declare enum TypeAssignabilityFlags {
616
622
  NotAssignable = 0,
617
623
  Identity = 1,
618
624
  DerivedToBase = 2,
619
- MethodTypes = 4,
625
+ FunctionTypes = 4,
620
626
  ImplicitConversion = 8,
621
627
  First = 1,
622
628
  Last = 8
@@ -652,11 +658,20 @@ export declare class PackageImportInfo {
652
658
  readonly isAliasedImport: e.PackageAliasEntity | undefined;
653
659
  constructor(entity: e.PackageEntity, translationPackage: AnalyzedTranslationPackage | undefined, isAliasedImport: e.PackageAliasEntity | undefined);
654
660
  }
655
- export declare class ExpressionDenotesMethodCheckResult {
656
- readonly candidates: readonly WithLocalization<AccessedMethod>[];
657
- readonly suitableMethods: readonly WithLocalization<AccessedMethod>[];
658
- get singleSuitableMethod(): WithLocalization<AccessedMethod> | undefined;
659
- constructor(candidates: readonly WithLocalization<AccessedMethod>[], suitableMethods: readonly WithLocalization<AccessedMethod>[]);
661
+ export declare class TypeUtils {
662
+ private readonly _analyzer;
663
+ constructor(_analyzer: Analyzer);
664
+ getCommonObjectAndAspectTypesOfUnion(unionType: types.UnionType): readonly types.StructuredType[];
665
+ private getTypesForCommonTypesSearch;
666
+ private addTypeAndCollectAllBaseTypes;
667
+ private addTypeIfUnique;
668
+ private removeBaseTypes;
669
+ }
670
+ export declare class ExpressionDenotesFunctionCheckResult {
671
+ readonly candidates: readonly WithLocalization<AccessedFunction>[];
672
+ readonly suitableFunctions: readonly WithLocalization<AccessedFunction>[];
673
+ get singleSuitableFunction(): WithLocalization<AccessedFunction> | undefined;
674
+ constructor(candidates: readonly WithLocalization<AccessedFunction>[], suitableFunctions: readonly WithLocalization<AccessedFunction>[]);
660
675
  }
661
676
  export declare class ExpressionDenotesOperatorCheckResult {
662
677
  readonly candidates: readonly WithLocalization<types.Operator>[];
@@ -693,14 +708,14 @@ declare namespace AvailablePackage {
693
708
  export {};
694
709
  }
695
710
  export declare class DeclaredTypeMemberEntities {
696
- readonly variables: readonly e.TypeVariableEntity[];
697
- readonly methods: readonly e.TypeMethodEntity[];
711
+ readonly variables: readonly e.FieldEntity[];
712
+ readonly methods: readonly e.MethodEntity[];
698
713
  readonly operators: readonly e.OperatorEntity[];
699
714
  readonly constructors: readonly e.ConstructorEntity[];
700
715
  readonly destructors: readonly e.DestructorEntity[];
701
716
  readonly indexers: readonly e.SourceIndexerEntity[];
702
717
  readonly dereferenceOperators: readonly e.DereferenceOperatorEntity[];
703
718
  get namedMembers(): NamedTypeMemberEntity[];
704
- constructor(variables: readonly e.TypeVariableEntity[], methods: readonly e.TypeMethodEntity[], operators: readonly e.OperatorEntity[], constructors: readonly e.ConstructorEntity[], destructors: readonly e.DestructorEntity[], indexers: readonly e.SourceIndexerEntity[], dereferenceOperators: readonly e.DereferenceOperatorEntity[]);
719
+ constructor(variables: readonly e.FieldEntity[], methods: readonly e.MethodEntity[], operators: readonly e.OperatorEntity[], constructors: readonly e.ConstructorEntity[], destructors: readonly e.DestructorEntity[], indexers: readonly e.SourceIndexerEntity[], dereferenceOperators: readonly e.DereferenceOperatorEntity[]);
705
720
  }
706
721
  export {};
@@ -1,7 +1,7 @@
1
1
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
2
  import { CallExpression } from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
- import { AccessedMethod } from './AccessedMethod.js';
4
+ import { AccessedFunction } from './AccessedFunction.js';
5
5
  import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
6
6
  import { WithLocalization } from './Localization.js';
7
7
  import { Analyzer } from './index.js';
@@ -14,21 +14,21 @@ export declare class Resolver {
14
14
  private resolveConstructorCallExpressionMeaning;
15
15
  private getNodeForDiagnostics;
16
16
  }
17
- export type Meaning = Meaning_methodCall | Meaning_operatorCall | Meaning_objectMethodCall | Meaning_constructorCall | Meaning_unresolved;
18
- declare class Meaning_methodCall {
19
- readonly method: WithLocalization<AccessedMethod>;
20
- readonly kind = "method-call";
21
- constructor(method: WithLocalization<AccessedMethod>);
17
+ export type Meaning = Meaning_functionCall | Meaning_operatorCall | Meaning_objectFunctionCall | Meaning_constructorCall | Meaning_unresolved;
18
+ declare class Meaning_functionCall {
19
+ readonly func: WithLocalization<AccessedFunction>;
20
+ readonly kind = "function-call";
21
+ constructor(func: WithLocalization<AccessedFunction>);
22
22
  }
23
23
  declare class Meaning_operatorCall {
24
24
  readonly operator: WithLocalization<types.Operator>;
25
25
  readonly kind = "operator-call";
26
26
  constructor(operator: WithLocalization<types.Operator>);
27
27
  }
28
- declare class Meaning_objectMethodCall {
29
- readonly type: types.MethodType;
30
- readonly kind = "object-method-call";
31
- constructor(type: types.MethodType);
28
+ declare class Meaning_objectFunctionCall {
29
+ readonly type: types.FunctionType;
30
+ readonly kind = "object-function-call";
31
+ constructor(type: types.FunctionType);
32
32
  }
33
33
  declare class Meaning_constructorCall {
34
34
  /**