@artel/artc 0.6.25255 → 0.6.25256

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 (41) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +10 -6
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +42 -27
  5. package/build/{chunk-R2AFVF7W.js → chunk-CTEZ5IHI.js} +2 -2
  6. package/build/{chunk-Y23FSWAN.js → chunk-ER3TEZSN.js} +1239 -1066
  7. package/build/{chunk-SSG7MY2R.js → chunk-IHZZGWNS.js} +1 -1
  8. package/build/types/analysis/AccessedFunction.d.ts +10 -3
  9. package/build/types/analysis/Analyzer.d.ts +20 -24
  10. package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +4 -4
  11. package/build/types/analysis/CallExpressionMeaning.d.ts +3 -3
  12. package/build/types/analysis/ConstructorCallResolver.d.ts +2 -2
  13. package/build/types/analysis/DiagnosticArgumentFactory.d.ts +3 -1
  14. package/build/types/analysis/DisplayableEntity.d.ts +12 -6
  15. package/build/types/analysis/FunctionAccessResolver.d.ts +4 -4
  16. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +3 -3
  17. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +3 -3
  18. package/build/types/analysis/OverloadResolver.d.ts +7 -7
  19. package/build/types/analysis/SourceFileMembers.d.ts +2 -0
  20. package/build/types/analysis/SubstitutedFunction.d.ts +18 -22
  21. package/build/types/analysis/TypeArgumentInferrer.d.ts +3 -3
  22. package/build/types/analysis/Visitor.d.ts +2 -2
  23. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +4 -0
  24. package/build/types/common/ArrayUtils.d.ts +2 -0
  25. package/build/types/common/Cached.d.ts +2 -0
  26. package/build/types/common/Lazy.d.ts +2 -0
  27. package/build/types/common/TreeQuery.d.ts +14 -47
  28. package/build/types/common/TreeTraversal.d.ts +1 -1
  29. package/build/types/common/index.d.ts +0 -1
  30. package/build/types/entities/PackageMembers.d.ts +1 -0
  31. package/build/types/entities/TypeEntityMembers.d.ts +2 -0
  32. package/build/types/entities/index.d.ts +1 -1
  33. package/build/types/services/DisplayService.d.ts +16 -10
  34. package/build/types/tree/BaseNode.d.ts +6 -0
  35. package/build/types/tree/Nodes.d.ts +3 -3
  36. package/build/types/types/IntersectionType.d.ts +1 -1
  37. package/build/types/types/Substitutions.d.ts +16 -4
  38. package/build/types/types/TypeMembers.d.ts +1 -1
  39. package/build/types/types/UnionType.d.ts +1 -1
  40. package/package.json +7 -1
  41. package/build/types/common/Errors.d.ts +0 -2
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-Y23FSWAN.js";
13
+ } from "./chunk-ER3TEZSN.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -8,6 +8,8 @@ export type NotSubstitutedAccessedFunction = AccessedFunction_entity | AccessedF
8
8
  export declare class AccessedFunction_entity implements IAccessedFunction {
9
9
  readonly value: PackageOrNestedFunctionEntity;
10
10
  readonly kind = "entity";
11
+ private readonly _valueParameters;
12
+ private readonly _signatureType;
11
13
  get debuggerDisplay(): string;
12
14
  constructor(value: PackageOrNestedFunctionEntity);
13
15
  getTypeParameters(): readonly TypeParameterEntity[];
@@ -16,11 +18,13 @@ export declare class AccessedFunction_entity implements IAccessedFunction {
16
18
  getEntity(): PackageOrNestedFunctionEntity;
17
19
  getName(): Name;
18
20
  getSignatureType(analyzer: Analyzer): types.FunctionType;
19
- applySubstitutions(analyzer: Analyzer, map: types.Substitutions): AccessedFunction;
21
+ applySubstitutions(substitutions: types.Substitutions): AccessedFunction;
22
+ getOuterSubstitutions(): types.Substitutions | undefined;
20
23
  }
21
24
  export declare class AccessedFunction_typeMember implements IAccessedFunction {
22
25
  readonly value: types.Method;
23
26
  readonly kind = "type-member";
27
+ private readonly _valueParameters;
24
28
  get debuggerDisplay(): string;
25
29
  constructor(value: types.Method);
26
30
  getTypeParameters(): readonly TypeParameterEntity[];
@@ -29,7 +33,8 @@ export declare class AccessedFunction_typeMember implements IAccessedFunction {
29
33
  getEntity(): MethodEntity;
30
34
  getName(): Name;
31
35
  getSignatureType(_analyzer: Analyzer): types.FunctionType;
32
- applySubstitutions(_analyzer: Analyzer, substitutions: types.Substitutions): AccessedFunction;
36
+ applySubstitutions(substitutions: types.Substitutions): AccessedFunction;
37
+ getOuterSubstitutions(): types.Substitutions | undefined;
33
38
  }
34
39
  export declare class AccessedFunction_substitutedFunction implements IAccessedFunction {
35
40
  readonly value: SubstitutedFunction;
@@ -41,7 +46,8 @@ export declare class AccessedFunction_substitutedFunction implements IAccessedFu
41
46
  getReturnType(): types.Type;
42
47
  getEntity(): FunctionEntity;
43
48
  getName(): Name;
44
- getSignatureType(_analyzer: Analyzer): types.FunctionType;
49
+ getSignatureType(analyzer: Analyzer): types.FunctionType;
50
+ getOuterSubstitutions(): types.Substitutions | undefined;
45
51
  }
46
52
  export declare class AccessedFunctionValueParameter {
47
53
  readonly entity: ParameterVariableEntity;
@@ -55,5 +61,6 @@ interface IAccessedFunction {
55
61
  getEntity(): FunctionEntity;
56
62
  getName(): Name;
57
63
  getSignatureType(analyzer: Analyzer): types.FunctionType;
64
+ getOuterSubstitutions(): types.Substitutions | undefined;
58
65
  }
59
66
  export {};
@@ -91,7 +91,6 @@ export declare class Analyzer {
91
91
  private readonly _prefixUnaryExpressionOperatorResolutionResults;
92
92
  private readonly _binaryExpressionUserDefinableOperatorResolutionResults;
93
93
  private readonly _assignmentStatementOperatorResolutionResults;
94
- private readonly _functionEntitySignatureTypes;
95
94
  private readonly _valueParametersOfFunctionBlockLiterals;
96
95
  private readonly _extendedTypes;
97
96
  private readonly _analyzedTranslationPackages;
@@ -111,6 +110,7 @@ export declare class Analyzer {
111
110
  private readonly _localizedStandardTypes;
112
111
  private readonly _ownAndBaseConstructorCallsCheckResults;
113
112
  private readonly _expressionCanBeUsedInForLoopCheckResults;
113
+ private readonly _nameByIdentifierText;
114
114
  get tsInterop(): TsInteropContext;
115
115
  constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
116
116
  getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
@@ -130,21 +130,21 @@ export declare class Analyzer {
130
130
  checkBlockInvokesAsyncMethods(node: tree.StatementBlock | tree.FunctionBlock): boolean;
131
131
  getSyntacticAccessKind(node: tree.Expression): SyntacticAccessKind;
132
132
  getTypeMemberEntityContainer(node: tree.TypeMemberDeclaration): e.TypeMemberEntityContainer;
133
- getTargetTypeOfExpression(node: tree.Expression, inferenceOptions?: InferenceOptions): types.Type | undefined;
133
+ getTargetTypeOfExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type | undefined;
134
134
  getUnambiguousTargetFunctionType(targetType: types.Type | undefined): types.FunctionType | undefined;
135
135
  getUnambiguousTargetArrayType(targetType: types.Type | undefined): types.Type | undefined;
136
136
  getEnumeratorElementType(node: tree.Node): types.Type | undefined;
137
137
  resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.FirstStageResolutionResult;
138
- resolveMemberAccessExpression(node: tree.MemberAccessExpression, inferenceOptions?: InferenceOptions): memberAccessExpressionResolution.ResolutionResult;
138
+ resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.ResolutionResult;
139
139
  enumeratePackageImports(packageImportDirectives: Iterable<tree.PackageImportDirective>): Iterable<tree.PackageImport>;
140
140
  getSourceFileMembers(node: tree.SourceFile): ActualSourceFileMembers;
141
- resolveCallExpression(node: tree.CallExpression, inferenceOptions?: InferenceOptions): callExpressionMeaning.ResolutionResult;
141
+ resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.ResolutionResult;
142
142
  getRespectiveParameter(node: tree.Argument): MatchResultValueParameter | undefined;
143
143
  resolveIndexedAccessExpression(node: tree.IndexedAccessExpression): indexedAccessExpressionMeaning.ResolutionResult;
144
144
  getDereferenceExpressionMeaning(node: tree.DereferenceExpression): dereferenceExpressionMeaning.Meaning;
145
- resolveAutotypeCallExpression(node: tree.AutotypeCallExpression, inferenceOptions?: InferenceOptions): autotypeCallExpressionMeaning.ResolutionResult;
145
+ resolveAutotypeCallExpression(node: tree.AutotypeCallExpression, analysisOptions?: ExpressionAnalysisOptions): autotypeCallExpressionMeaning.ResolutionResult;
146
146
  resolveIdentifierExpressionFirstStage(node: tree.IdentifierExpression): identifierExpressionResolution.FirstStageResolutionResult;
147
- resolveIdentifierExpression(node: tree.IdentifierExpression, inferenceOptions?: InferenceOptions): identifierExpressionResolution.ResolutionResult;
147
+ resolveIdentifierExpression(node: tree.IdentifierExpression, analysisOptions?: ExpressionAnalysisOptions): identifierExpressionResolution.ResolutionResult;
148
148
  resolveTag(node: tree.Tag): tagMeaning.ResolutionResult;
149
149
  resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.ResolutionResult;
150
150
  resolveBaseExpressionFirstStage(node: tree.BaseExpression): baseExpressionMeaning.FirstStageResolutionsResult;
@@ -262,7 +262,6 @@ export declare class Analyzer {
262
262
  excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
263
263
  isValueParameterVariadic(entity: e.VariableEntity): boolean;
264
264
  getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
265
- getSignatureTypeOfFunctionEntity(entity: e.FunctionEntity): types.FunctionType;
266
265
  getFunctionBlockLiteralValueParameters(node: tree.FunctionBlockLiteral): readonly e.ParameterVariableEntity[];
267
266
  getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
268
267
  getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
@@ -317,8 +316,6 @@ export declare class Analyzer {
317
316
  determineUnderlyingTypeOfSourceVariantType(memberList: tree.TypeMemberDeclarationList): types.Type;
318
317
  getOwnAndBaseConstructorCallsCheckResult(node: TypeWithMembersDeclaration): OwnAndBaseConstructorCallsCheckResult;
319
318
  isConstructorCallingOwnConstructor(node: tree.ConstructorDeclaration): boolean;
320
- createDiagnosticArgumentFactoryWithinPackage(entity: e.PackageEntity): DiagnosticArgumentFactory;
321
- createDiagnosticArgumentFactoryWithinEntityContext(context: e.EntityContext): DiagnosticArgumentFactory;
322
319
  ifCalleeThenCallExpression(node: tree.Expression): tree.CallExpression | undefined;
323
320
  getNodeForAmbiguousAccessDiagnostic(access: tree.Expression): tree.Node;
324
321
  isPossibleWrappedTargetTypeDependentFunctionLiteral(node: tree.Expression): boolean;
@@ -362,13 +359,12 @@ declare class Type {
362
359
  private readonly _functionLiteralTypes;
363
360
  private readonly _nodesForWhichReturnTypeInferenceDiagnosticHasBeenReported;
364
361
  constructor(_analyzer: Analyzer);
365
- ofExpression(node: tree.Expression, inferenceOptions?: InferenceOptions): types.Type;
362
+ ofExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type;
366
363
  ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
367
- ofAccessedFunction(accessedFunction: AccessedFunction): types.Type;
368
364
  ofAccessedOperator(operator: types.Operator): types.Type;
369
- ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral, inferenceOptions?: InferenceOptions): types.FunctionType;
370
- ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral, inferenceOptions?: InferenceOptions): types.FunctionType;
371
- ofFunctionLiteral(node: tree.FunctionLiteral, inferenceOptions?: InferenceOptions): types.FunctionType;
365
+ ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral, analysisOptions?: ExpressionAnalysisOptions): types.FunctionType;
366
+ ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral, analysisOptions?: ExpressionAnalysisOptions): types.FunctionType;
367
+ ofFunctionLiteral(node: tree.FunctionLiteral, analysisOptions?: ExpressionAnalysisOptions): types.FunctionType;
372
368
  private ofArrayLiteral;
373
369
  private ofAssertionExpression;
374
370
  private ofAssumptionExpression;
@@ -739,8 +735,8 @@ export declare class AnalyzedPackageImports {
739
735
  }
740
736
  export declare class PackageImportInfo {
741
737
  readonly entity: e.PackageEntity;
742
- readonly isAliasedImport: e.PackageAliasEntity | undefined;
743
- constructor(entity: e.PackageEntity, isAliasedImport: e.PackageAliasEntity | undefined);
738
+ readonly aliasEntity: e.PackageAliasEntity | undefined;
739
+ constructor(entity: e.PackageEntity, aliasEntity: e.PackageAliasEntity | undefined);
744
740
  }
745
741
  declare class TypeUtils {
746
742
  private readonly _analyzer;
@@ -855,15 +851,15 @@ export declare class DeclaredTypeMemberEntities {
855
851
  get namedMembers(): e.NamedTypeMemberEntity[];
856
852
  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[]);
857
853
  }
858
- export declare class InferenceOptions {
854
+ export declare class ExpressionAnalysisOptions {
859
855
  readonly targetType: types.Type | undefined;
860
856
  readonly allowCaching: boolean;
861
- readonly allowReportingDiagnostics: boolean;
862
- constructor(targetType: types.Type | undefined, allowCaching: boolean, allowReportingDiagnostics: boolean);
863
- static withTargetType(options: InferenceOptions | undefined, targetType: types.Type | undefined): InferenceOptions;
864
- withTargetType(targetType: types.Type | undefined): InferenceOptions;
865
- withAllowCaching(allowCaching: boolean): InferenceOptions;
866
- withAllowReportingDiagnostics(allowReportingDiagnostics: boolean): InferenceOptions;
867
- withTargetTypeAndAllowCaching(targetType: types.Type | undefined, allowCaching: boolean): InferenceOptions;
857
+ readonly isResolvingOverload: boolean;
858
+ constructor(targetType: types.Type | undefined, allowCaching: boolean, isResolvingOverload: boolean);
859
+ static withTargetType(options: ExpressionAnalysisOptions | undefined, targetType: types.Type | undefined): ExpressionAnalysisOptions;
860
+ withTargetType(targetType: types.Type | undefined): ExpressionAnalysisOptions;
861
+ withAllowCaching(allowCaching: boolean): ExpressionAnalysisOptions;
862
+ withIsResolvingOverload(isResolvingOverload: boolean): ExpressionAnalysisOptions;
863
+ withTargetTypeAndAllowCaching(targetType: types.Type | undefined, allowCaching: boolean): ExpressionAnalysisOptions;
868
864
  }
869
865
  export {};
@@ -1,12 +1,12 @@
1
1
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
2
  import { AutotypeCallExpression } from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
- import { Analyzer, InferenceOptions } from './index.js';
4
+ import { Analyzer, ExpressionAnalysisOptions } from './index.js';
5
5
  export declare class Resolver {
6
6
  private readonly _analyzer;
7
- readonly _node: AutotypeCallExpression;
8
- readonly _inferenceOptions: InferenceOptions | undefined;
9
- constructor(_analyzer: Analyzer, _node: AutotypeCallExpression, _inferenceOptions: InferenceOptions | undefined);
7
+ private readonly _node;
8
+ private readonly _analysisOptions;
9
+ constructor(_analyzer: Analyzer, _node: AutotypeCallExpression, _analysisOptions: ExpressionAnalysisOptions | undefined);
10
10
  resolve(): ResolutionResult;
11
11
  }
12
12
  export declare class ResolutionResult {
@@ -3,12 +3,12 @@ import { NamedTypeEntity } from '../entities/index.js';
3
3
  import * as tree from '../tree/index.js';
4
4
  import * as types from '../types/index.js';
5
5
  import { AccessedFunction, NotSubstitutedAccessedFunction } from './AccessedFunction.js';
6
- import { Analyzer, InferenceOptions } from './index.js';
6
+ import { Analyzer, ExpressionAnalysisOptions } from './index.js';
7
7
  export declare class Resolver {
8
8
  private readonly _analyzer;
9
9
  private readonly _node;
10
- private readonly _inferenceOptions;
11
- constructor(_analyzer: Analyzer, _node: tree.CallExpression, _inferenceOptions: InferenceOptions | undefined);
10
+ private readonly _analysisOptions;
11
+ constructor(_analyzer: Analyzer, _node: tree.CallExpression, _analysisOptions: ExpressionAnalysisOptions | undefined);
12
12
  private get callee();
13
13
  resolve(): ResolutionResult;
14
14
  private checkExpressionDenotesType;
@@ -3,11 +3,11 @@ import { DiagnosticAcceptorWithArgumentFactory } from '../diagnostic/Diagnostic.
3
3
  import { IEntityHidingMatcher, NamedTypeEntity } from '../entities/index.js';
4
4
  import * as tree from '../tree/index.js';
5
5
  import * as types from '../types/index.js';
6
- import { Analyzer, InferenceOptions } from './Analyzer.js';
6
+ import { Analyzer, ExpressionAnalysisOptions } from './Analyzer.js';
7
7
  import { SemanticContext } from './semantic-context/SemanticContext.js';
8
8
  export declare class Resolver {
9
9
  static resolve(analyzer: Analyzer, candidates: readonly types.Constructor[], argumentList: tree.ArgumentList | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): readonly types.Constructor[];
10
- static resolveByNamedTypes(analyzer: Analyzer, typeEntities: readonly NamedTypeEntity[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, inferenceOptions: InferenceOptions, locale: PackageLocale, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: SemanticContext | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
10
+ static resolveByNamedTypes(analyzer: Analyzer, typeEntities: readonly NamedTypeEntity[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, locale: PackageLocale, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: SemanticContext | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
11
11
  private static typeCanBeConstructed;
12
12
  }
13
13
  export declare class ResolutionResult {
@@ -1,5 +1,6 @@
1
1
  import { PackageDialect, PackageLocale } from '../common/index.js';
2
2
  import { Entity } from '../entities/index.js';
3
+ import { SourceFile } from '../project/index.js';
3
4
  import * as types from '../types/index.js';
4
5
  import { AccessedFunction } from './AccessedFunction.js';
5
6
  import { Analyzer } from './Analyzer.js';
@@ -9,7 +10,8 @@ export declare class DiagnosticArgumentFactory {
9
10
  readonly locale: PackageLocale;
10
11
  readonly dialect: PackageDialect;
11
12
  private readonly _analyzer;
12
- constructor(analyzer: Analyzer, locale: PackageLocale, dialect: PackageDialect);
13
+ private readonly _contextualSourceFile;
14
+ constructor(analyzer: Analyzer, locale: PackageLocale, dialect: PackageDialect, sourceFile: SourceFile | undefined);
13
15
  createDisplayableEntity(entity: Entity): DisplayableEntity;
14
16
  createDisplayableAccessedFunction(accessedFunction: AccessedFunction): DisplayableAccessedFunction;
15
17
  createDisplayableTypeMember(member: types.TypeMember): DisplayableTypeMember;
@@ -1,15 +1,17 @@
1
1
  import { Displayable, PackageDialect, PackageLocale } from '../common/index.js';
2
2
  import { Entity } from '../entities/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ import * as types from '../types/index.js';
3
5
  import { AccessedFunction } from './AccessedFunction.js';
4
6
  import { Analyzer } from './Analyzer.js';
5
- import * as types from '../types/index.js';
6
7
  import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
7
8
  export declare class DisplayableEntity implements Displayable {
8
9
  private readonly _analyzer;
9
10
  private readonly _entity;
10
11
  private readonly _locale;
11
12
  private readonly _dialect;
12
- constructor(_analyzer: Analyzer, _entity: Entity, _locale: PackageLocale, _dialect: PackageDialect | undefined);
13
+ private readonly _contextualSourceFile;
14
+ constructor(_analyzer: Analyzer, _entity: Entity, _locale: PackageLocale, _dialect: PackageDialect, _contextualSourceFile: SourceFile | undefined);
13
15
  getDisplayText(): string;
14
16
  }
15
17
  export declare class DisplayableAccessedFunction implements Displayable {
@@ -17,7 +19,8 @@ export declare class DisplayableAccessedFunction implements Displayable {
17
19
  private readonly _accessedFunction;
18
20
  private readonly _locale;
19
21
  private readonly _dialect;
20
- constructor(_analyzer: Analyzer, _accessedFunction: AccessedFunction, _locale: PackageLocale, _dialect: PackageDialect | undefined);
22
+ private readonly _contextualSourceFile;
23
+ constructor(_analyzer: Analyzer, _accessedFunction: AccessedFunction, _locale: PackageLocale, _dialect: PackageDialect, _contextualSourceFile: SourceFile | undefined);
21
24
  getDisplayText(): string;
22
25
  }
23
26
  export declare class DisplayableTypeMember implements Displayable {
@@ -25,7 +28,8 @@ export declare class DisplayableTypeMember implements Displayable {
25
28
  private readonly _member;
26
29
  private readonly _locale;
27
30
  private readonly _dialect;
28
- constructor(_analyzer: Analyzer, _member: types.TypeMember, _locale: PackageLocale, _dialect: PackageDialect | undefined);
31
+ private readonly _contextualSourceFile;
32
+ constructor(_analyzer: Analyzer, _member: types.TypeMember, _locale: PackageLocale, _dialect: PackageDialect, _contextualSourceFile: SourceFile | undefined);
29
33
  getDisplayText(): string;
30
34
  }
31
35
  export declare class DisplayablePackageNameTreeNode implements Displayable {
@@ -33,7 +37,8 @@ export declare class DisplayablePackageNameTreeNode implements Displayable {
33
37
  private readonly _node;
34
38
  private readonly _locale;
35
39
  private readonly _dialect;
36
- constructor(_analyzer: Analyzer, _node: PackageNameTreeNode, _locale: PackageLocale, _dialect: PackageDialect | undefined);
40
+ private readonly _contextualSourceFile;
41
+ constructor(_analyzer: Analyzer, _node: PackageNameTreeNode, _locale: PackageLocale, _dialect: PackageDialect, _contextualSourceFile: SourceFile | undefined);
37
42
  getDisplayText(): string;
38
43
  }
39
44
  export declare class DisplayableType implements Displayable {
@@ -41,6 +46,7 @@ export declare class DisplayableType implements Displayable {
41
46
  private readonly _type;
42
47
  private readonly _locale;
43
48
  private readonly _dialect;
44
- constructor(_analyzer: Analyzer, _type: types.Type, _locale: PackageLocale, _dialect: PackageDialect | undefined);
49
+ private readonly _contextualSourceFile;
50
+ constructor(_analyzer: Analyzer, _type: types.Type, _locale: PackageLocale, _dialect: PackageDialect, _contextualSourceFile: SourceFile | undefined);
45
51
  getDisplayText(): string;
46
52
  }
@@ -1,11 +1,11 @@
1
1
  import { DiagnosticAcceptorWithArgumentFactory } from '../diagnostic/Diagnostic.js';
2
2
  import * as tree from '../tree/index.js';
3
3
  import { AccessedFunction, NotSubstitutedAccessedFunction } from './AccessedFunction.js';
4
- import { Analyzer, InferenceOptions } from './Analyzer.js';
4
+ import { Analyzer, ExpressionAnalysisOptions } from './Analyzer.js';
5
5
  export declare class Resolver {
6
- static resolveByCallExpression(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], node: tree.CallExpression, inferenceOptions: InferenceOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined): ResolutionResult;
7
- static resolveByCallExpressionParts(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, inferenceOptions: InferenceOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
8
- static resolveByTargetType(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], typeArgumentClause: tree.TypeArgumentClause | undefined, inferenceOptions: InferenceOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
6
+ static resolveByCallExpression(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], node: tree.CallExpression, analysisOptions: ExpressionAnalysisOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined): ResolutionResult;
7
+ static resolveByCallExpressionParts(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
8
+ static resolveByTargetType(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): ResolutionResult;
9
9
  private static convertProcessedSignature;
10
10
  private static reportAmbiguousAccessDiagnostic;
11
11
  }
@@ -6,7 +6,7 @@ import * as types from '../types/index.js';
6
6
  import { AccessedFunction, NotSubstitutedAccessedFunction } from './AccessedFunction.js';
7
7
  import * as callExpressionMeaning from './CallExpressionMeaning.js';
8
8
  import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
9
- import { Analyzer, InferenceOptions } from './index.js';
9
+ import { Analyzer, ExpressionAnalysisOptions } from './index.js';
10
10
  import { NamedDeclaration } from './semantic-context/index.js';
11
11
  export declare class FirstStageResolver {
12
12
  private readonly _semanticContext;
@@ -24,8 +24,8 @@ export declare class SecondStageResolver {
24
24
  private readonly _analyzer;
25
25
  private readonly _node;
26
26
  private readonly _firstStageResolutionResult;
27
- private readonly _inferenceOptions;
28
- constructor(analyzer: Analyzer, node: tree.IdentifierExpression, firstStageResolutionResult: FirstStageResolutionResult, inferenceOptions: InferenceOptions | undefined);
27
+ private readonly _analysisOptions;
28
+ constructor(analyzer: Analyzer, node: tree.IdentifierExpression, firstStageResolutionResult: FirstStageResolutionResult, analysisOptions: ExpressionAnalysisOptions | undefined);
29
29
  resolve(): ResolutionResult;
30
30
  private resolveTypeAccessAtCalleePosition;
31
31
  private resolveFunctionAccess;
@@ -6,7 +6,7 @@ import * as types from '../types/index.js';
6
6
  import { AccessedFunction, NotSubstitutedAccessedFunction } from './AccessedFunction.js';
7
7
  import * as callExpressionMeaning from './CallExpressionMeaning.js';
8
8
  import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
9
- import { Analyzer, InferenceOptions } from './index.js';
9
+ import { Analyzer, ExpressionAnalysisOptions } from './index.js';
10
10
  export declare class FirstStageResolver {
11
11
  private readonly _semanticContext;
12
12
  private readonly _analyzer;
@@ -29,8 +29,8 @@ export declare class SecondStageResolver {
29
29
  private readonly _analyzer;
30
30
  private readonly _node;
31
31
  private readonly _firstStageResolutionResult;
32
- private readonly _inferenceOptions;
33
- constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, firstStageResolutionResult: FirstStageResolutionResult, inferenceOptions: InferenceOptions | undefined);
32
+ private readonly _analysisOptions;
33
+ constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, firstStageResolutionResult: FirstStageResolutionResult, analysisOptions: ExpressionAnalysisOptions | undefined);
34
34
  resolve(): ResolutionResult;
35
35
  private resolveTypeAccessAtCalleePosition;
36
36
  private resolvePackageFunctionAccess;
@@ -1,4 +1,4 @@
1
- import { Analyzer, InferenceOptions } from '../analysis/index.js';
1
+ import { Analyzer, ExpressionAnalysisOptions } from '../analysis/index.js';
2
2
  import { Displayable, Name } from '../common/index.js';
3
3
  import { DiagnosticAcceptorWithArgumentFactory, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
4
4
  import { TypeParameterEntity } from '../entities/index.js';
@@ -12,11 +12,11 @@ export declare class OverloadResolver<TSignature extends ISignature<TParameter>,
12
12
  private readonly _mode;
13
13
  private readonly _signatures;
14
14
  private readonly _arguments;
15
- private readonly _inferenceOptions;
15
+ private readonly _analysisOptions;
16
16
  private readonly _dataForTypeArgumentInference;
17
17
  private readonly _diagnostics;
18
18
  private readonly _nodesForDiagnostic;
19
- constructor(_analyzer: Analyzer, _mode: ResolutionMode, _signatures: readonly TSignature[], _arguments: readonly TArgument[], _inferenceOptions: InferenceOptions, _dataForTypeArgumentInference: DataForTypeArgumentInference | undefined, _diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, _nodesForDiagnostic: NodesForDiagnostic | undefined);
19
+ constructor(_analyzer: Analyzer, _mode: ResolutionMode, _signatures: readonly TSignature[], _arguments: readonly TArgument[], _analysisOptions: ExpressionAnalysisOptions, _dataForTypeArgumentInference: DataForTypeArgumentInference | undefined, _diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, _nodesForDiagnostic: NodesForDiagnostic | undefined);
20
20
  resolveOverload(): ProcessedSignature<TSignature, TParameter, TArgument>[];
21
21
  private areArgumentTypesAssignableToParameterTypes;
22
22
  private tryChooseBestSignature;
@@ -55,10 +55,10 @@ export declare class IntrinsicArgument implements matcher.IArgument, inferrer.In
55
55
  get name(): Name | undefined;
56
56
  constructor(type: types.Type);
57
57
  getDiagnosticLocation(): DiagnosticLocation | undefined;
58
- getType(_inferenceOptions: InferenceOptions | undefined): types.Type;
58
+ getType(_analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
59
59
  }
60
60
  interface IArgument {
61
- getType(inferenceOptions: InferenceOptions | undefined): types.Type;
61
+ getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
62
62
  }
63
63
  export declare class SourceNodeArgument implements SourceArgument {
64
64
  readonly kind = "source";
@@ -68,7 +68,7 @@ export declare class SourceNodeArgument implements SourceArgument {
68
68
  get expression(): tree.Expression;
69
69
  constructor(analyzer: Analyzer, node: tree.Argument);
70
70
  getDiagnosticLocation(): DiagnosticLocation;
71
- getType(inferenceOptions: InferenceOptions | undefined): types.Type;
71
+ getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
72
72
  }
73
73
  export declare class SourceExpressionArgument implements SourceArgument {
74
74
  private readonly _analyzer;
@@ -77,7 +77,7 @@ export declare class SourceExpressionArgument implements SourceArgument {
77
77
  get name(): Name | undefined;
78
78
  constructor(_analyzer: Analyzer, expression: tree.Expression);
79
79
  getDiagnosticLocation(): DiagnosticLocation;
80
- getType(inferenceOptions: InferenceOptions | undefined): types.Type;
80
+ getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
81
81
  }
82
82
  export declare class DataForTypeArgumentInference {
83
83
  readonly specifiedTypeArguments: readonly types.Type[];
@@ -3,6 +3,8 @@ import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
3
3
  import { PackageAliasEntity, PackageFunctionEntity, PackageTypeEntity, PackageVariableEntity, TypeExtensionEntity } from '../entities/index.js';
4
4
  import { Analyzer } from './Analyzer.js';
5
5
  export declare class SourceFileMembers {
6
+ private static readonly _emptyNamedMembers;
7
+ private static readonly _emptyPackageAliases;
6
8
  private readonly _analyzer;
7
9
  private readonly _namedMembers;
8
10
  private readonly _typeExtensions;
@@ -1,24 +1,24 @@
1
1
  import { Name } from '../common/index.js';
2
- import { FunctionEntity, PackageOrNestedFunctionEntity, ParameterVariableEntity } from '../entities/index.js';
2
+ import { FunctionEntity, PackageOrNestedFunctionEntity } from '../entities/index.js';
3
3
  import * as types from '../types/index.js';
4
+ import { AccessedFunctionValueParameter } from './AccessedFunction.js';
5
+ import { Analyzer } from './Analyzer.js';
4
6
  export type SubstitutedFunction = SubstitutedFunction_entity | SubstitutedFunction_typeMember;
5
7
  export declare class SubstitutedFunction_entity implements ISubstitutedFunction {
6
8
  readonly entity: PackageOrNestedFunctionEntity;
7
- readonly entitySignatureType: types.FunctionType;
8
9
  readonly substitutions: types.Substitutions;
9
10
  readonly kind = "entity";
10
11
  private readonly _signatureType;
12
+ private readonly _valueParameters;
11
13
  get debuggerDisplay(): string;
12
- constructor(entity: PackageOrNestedFunctionEntity, entitySignatureType: types.FunctionType, substitutions: types.Substitutions);
14
+ constructor(entity: PackageOrNestedFunctionEntity, substitutions: types.Substitutions);
13
15
  getEntity(): PackageOrNestedFunctionEntity;
14
16
  getName(): Name;
15
- getSignatureType(): types.FunctionType;
17
+ getSignatureType(analyzer: Analyzer): types.FunctionType;
16
18
  getSubstitutions(): types.Substitutions;
17
- getCombinedSubstitutions(): types.Substitutions;
18
- getValueParameters(): readonly {
19
- entity: ParameterVariableEntity;
20
- type: types.Type;
21
- }[];
19
+ getOuterSubstitutions(): types.Substitutions | undefined;
20
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
21
+ getReturnType(): types.Type;
22
22
  isAsync(): boolean;
23
23
  }
24
24
  export declare class SubstitutedFunction_typeMember implements ISubstitutedFunction {
@@ -26,30 +26,26 @@ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunct
26
26
  readonly substitutions: types.Substitutions;
27
27
  readonly kind = "type-member";
28
28
  private readonly _signatureType;
29
- private readonly _combinedSubstitutions;
29
+ private readonly _valueParameters;
30
30
  get debuggerDisplay(): string;
31
31
  constructor(method: types.Method, substitutions: types.Substitutions);
32
32
  getEntity(): FunctionEntity;
33
33
  getName(): Name;
34
- getSignatureType(): types.FunctionType;
34
+ getSignatureType(analyzer: Analyzer): types.FunctionType;
35
35
  getSubstitutions(): types.Substitutions;
36
- getCombinedSubstitutions(): types.Substitutions;
37
- getValueParameters(): readonly {
38
- entity: ParameterVariableEntity;
39
- type: types.Type;
40
- }[];
36
+ getOuterSubstitutions(): types.Substitutions | undefined;
37
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
38
+ getReturnType(): types.Type;
41
39
  isAsync(): boolean;
42
40
  }
43
41
  interface ISubstitutedFunction {
44
42
  getEntity(): FunctionEntity;
45
43
  getName(): Name;
46
- getSignatureType(): types.FunctionType;
44
+ getSignatureType(analyzer: Analyzer): types.FunctionType;
47
45
  getSubstitutions(): types.Substitutions;
48
- getCombinedSubstitutions(): types.Substitutions;
49
- getValueParameters(): readonly {
50
- entity: ParameterVariableEntity;
51
- type: types.Type;
52
- }[];
46
+ getOuterSubstitutions(): types.Substitutions | undefined;
47
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
48
+ getReturnType(): types.Type;
53
49
  isAsync(): boolean;
54
50
  }
55
51
  export {};
@@ -1,7 +1,7 @@
1
1
  import { TypeParameterEntity } from '../entities/index.js';
2
2
  import * as tree from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
- import { Analyzer, InferenceOptions } from './Analyzer.js';
4
+ import { Analyzer, ExpressionAnalysisOptions } from './Analyzer.js';
5
5
  export type Argument = SourceArgument | IntrinsicArgument;
6
6
  export interface SourceArgument {
7
7
  readonly kind: 'source';
@@ -20,7 +20,7 @@ export declare class TypeArgumentInferrer {
20
20
  private readonly _analyzer;
21
21
  private readonly _typeParameters;
22
22
  private readonly _arguments;
23
- private readonly _inferenceOptions;
23
+ private readonly _analysisOptions;
24
24
  private readonly _returnType;
25
25
  private readonly _outerSubstitutions;
26
26
  private readonly _inferenceStates;
@@ -29,7 +29,7 @@ export declare class TypeArgumentInferrer {
29
29
  */
30
30
  private readonly _unresolvedType;
31
31
  private _inferenceHasFailed;
32
- constructor(analyzer: Analyzer, typeParameters: readonly TypeParameterEntity[], args: readonly ArgumentWithTargetParameterInfo[], inferenceOptions: InferenceOptions, returnType: types.Type | undefined, outerTypeSubstitutions: types.Substitutions | undefined);
32
+ constructor(analyzer: Analyzer, typeParameters: readonly TypeParameterEntity[], args: readonly ArgumentWithTargetParameterInfo[], analysisOptions: ExpressionAnalysisOptions, returnType: types.Type | undefined, outerTypeSubstitutions: types.Substitutions | undefined);
33
33
  infer(): readonly types.Type[] | undefined;
34
34
  private inferFirstStage;
35
35
  private inferSecondStage;
@@ -2,6 +2,6 @@ import { Node, SourceFile } from '../tree/index.js';
2
2
  type ChildNodeVisitor = (syntaxNode: VisitedChildNode) => void;
3
3
  export type VisitedNode = Node;
4
4
  export type VisitedChildNode = Exclude<Node, SourceFile>;
5
- export declare function visitChildren(node: VisitedNode, visitChildCb: ChildNodeVisitor): void;
6
- export declare function visitChildrenRecursively(node: VisitedNode, visitChildCb: ChildNodeVisitor): void;
5
+ export declare function visitChildren(node: VisitedNode, visitTokens: boolean, visitChildCb: ChildNodeVisitor): void;
6
+ export declare function visitChildrenRecursively(node: VisitedNode, visitTokens: boolean, visitChildCb: ChildNodeVisitor): void;
7
7
  export {};
@@ -10,6 +10,10 @@ import { FunctionDeclaration, GetterDeclaration, RegularOrBlockFunctionLiteral,
10
10
  import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
11
11
  import { SemanticContext } from './SemanticContext.js';
12
12
  export declare abstract class SemanticContextBase {
13
+ protected static readonly _emptyTypesOrContainersWithTypes: readonly TypeOrContainerWithTypes[];
14
+ protected static readonly _emptyNamedDeclarations: readonly NamedDeclaration[];
15
+ protected static readonly _emptyOperators: readonly types.Operator[];
16
+ protected static readonly _emptyTypeExtensions: readonly TypeExtensionEntity[];
13
17
  abstract readonly outer: SemanticContext | undefined;
14
18
  protected abstract readonly asContext: SemanticContext;
15
19
  abstract getContainingSubprogram(): SubprogramInfo | undefined;
@@ -8,6 +8,8 @@ export declare class ArrayUtils {
8
8
  static pushElementIfUniqueComparingWithEquals<T extends WithEqualsMethod<T>>(array: T[] | undefined, element: T): boolean;
9
9
  static pushElementsIfUniqueComparingWithEquals<T extends WithEqualsMethod<T>>(array: T[] | undefined, elements: readonly T[]): void;
10
10
  static count<T>(array: readonly T[], cb: (v: T) => boolean): number;
11
+ static compareWithEqualsIgnoringOrder<T extends WithEqualsMethod<T>>(array1: readonly T[], array2: readonly T[]): boolean;
12
+ static compareWithComparatorIgnoringOrder<T1, T2>(array1: readonly T1[], array2: readonly T2[], comparator: (e1: T1, e2: T2) => boolean): boolean;
11
13
  }
12
14
  export type WithEqualsMethod<T> = {
13
15
  equals(t: T): boolean;
@@ -8,3 +8,5 @@ export declare class Cached<T> {
8
8
  clear(): void;
9
9
  getCachedValue(): T | undefined;
10
10
  }
11
+ export declare class RecursiveCachedValueEvaluationError extends Error {
12
+ }
@@ -7,6 +7,8 @@ export declare class Lazy<T> {
7
7
  get value(): T;
8
8
  getCachedValue(): T | undefined;
9
9
  }
10
+ export declare class RecursiveLazyValueEvaluationError extends Error {
11
+ }
10
12
  export type MaybeLazy<T> = Lazy<T> | T;
11
13
  export declare namespace MaybeLazy {
12
14
  function getValue<T>(maybeLazy: MaybeLazy<T>): T;