@artel/artc 0.6.25217 → 0.6.25219

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 (104) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +16 -66
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +930 -888
  5. package/build/{chunk-HN3XZZQX.js → chunk-AIY75NR5.js} +5 -4
  6. package/build/{chunk-TXAEJ2GI.js → chunk-IYSH7MAQ.js} +10562 -10629
  7. package/build/{chunk-CMPXXHBQ.js → chunk-QLTGS2V2.js} +13 -5
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +4 -26
  9. package/build/types/analysis/Analyzer.d.ts +27 -69
  10. package/build/types/analysis/{CallArgumentToParameterMatchResult.d.ts → ArgumentToParameterMatchResult.d.ts} +7 -7
  11. package/build/types/analysis/{CallArgumentsToParametersMatcher.d.ts → ArgumentsToParametersMatcher.d.ts} +14 -14
  12. package/build/types/analysis/ConstructorOverloadResolver.d.ts +1 -1
  13. package/build/types/analysis/DereferenceExpressionMeaning.d.ts +3 -3
  14. package/build/types/analysis/DiagnosticCollector.d.ts +2 -0
  15. package/build/types/analysis/FindModifier.d.ts +2 -0
  16. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +14 -12
  17. package/build/types/analysis/LocalizationContext.d.ts +4 -5
  18. package/build/types/analysis/Lookup.d.ts +8 -7
  19. package/build/types/analysis/ModifierFlags.d.ts +16 -0
  20. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +0 -1
  21. package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
  22. package/build/types/analysis/OperationOverloadResolver.d.ts +2 -2
  23. package/build/types/analysis/OverloadResolver.d.ts +4 -4
  24. package/build/types/analysis/PackageMemberLookup.d.ts +5 -6
  25. package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +18 -16
  26. package/build/types/analysis/Scope.d.ts +21 -116
  27. package/build/types/analysis/SemanticContext.d.ts +23 -13
  28. package/build/types/analysis/SemanticContextBuilder.d.ts +1 -1
  29. package/build/types/analysis/SourceFileMembers.d.ts +12 -99
  30. package/build/types/analysis/TagMeaning.d.ts +57 -9
  31. package/build/types/analysis/Tags.d.ts +18 -6
  32. package/build/types/analysis/TypeMemberLookup.d.ts +15 -15
  33. package/build/types/analysis/TypeOverloadResolver.d.ts +1 -1
  34. package/build/types/analysis/Utils.d.ts +4 -3
  35. package/build/types/analysis/WellKnownDeclarations.d.ts +1 -0
  36. package/build/types/analysis/index.d.ts +1 -1
  37. package/build/types/api/Api.d.ts +2 -6
  38. package/build/types/diagnostic/DiagnosticCode.d.ts +21 -17
  39. package/build/types/emitter/{EmitterGeneratedDeclarationKind.d.ts → EmitPhaseName.d.ts} +1 -44
  40. package/build/types/emitter/EmitterContext.d.ts +4 -1
  41. package/build/types/emitter/Entities.d.ts +52 -16
  42. package/build/types/emitter/EntityMap.d.ts +1 -3
  43. package/build/types/emitter/IrBuilder.d.ts +6 -2
  44. package/build/types/emitter/IrToJs.d.ts +6 -5
  45. package/build/types/emitter/Transformer.d.ts +20 -12
  46. package/build/types/emitter/ir/EmitOptions.d.ts +163 -0
  47. package/build/types/emitter/ir/Nodes.d.ts +215 -179
  48. package/build/types/emitter/ir/index.d.ts +1 -2
  49. package/build/types/emitter/ir/types.d.ts +4 -4
  50. package/build/types/entities/AliasTypeEntity.d.ts +8 -4
  51. package/build/types/entities/ConstructorEntity.d.ts +2 -0
  52. package/build/types/entities/DereferenceOperatorEntity.d.ts +5 -3
  53. package/build/types/entities/DestructorEntity.d.ts +2 -0
  54. package/build/types/entities/GetterEntity.d.ts +8 -0
  55. package/build/types/entities/IndexerEntity.d.ts +5 -3
  56. package/build/types/entities/MethodEntity.d.ts +9 -5
  57. package/build/types/entities/MethodTypeEntity.d.ts +10 -5
  58. package/build/types/entities/OperatorEntity.d.ts +5 -3
  59. package/build/types/entities/PackageEntity.d.ts +3 -3
  60. package/build/types/entities/PackageMembers.d.ts +4 -90
  61. package/build/types/entities/SetterEntity.d.ts +8 -0
  62. package/build/types/entities/StructuredTypeEntity.d.ts +11 -6
  63. package/build/types/entities/TypeEntity.d.ts +15 -0
  64. package/build/types/entities/TypeExtensionEntity.d.ts +2 -0
  65. package/build/types/entities/TypeParameterEntity.d.ts +11 -6
  66. package/build/types/entities/VariableEntity.d.ts +50 -41
  67. package/build/types/entities/VariantTypeEntity.d.ts +10 -11
  68. package/build/types/entities/index.d.ts +17 -25
  69. package/build/types/executor/Compiler.d.ts +1 -0
  70. package/build/types/executor/NodeCompiler.d.ts +1 -0
  71. package/build/types/parser/CharacterCodes.d.ts +8 -0
  72. package/build/types/parser/ReservedIdentifierDictionary.d.ts +1 -2
  73. package/build/types/project/FileSystemTree.d.ts +2 -2
  74. package/build/types/services/CompletionService.d.ts +4 -1
  75. package/build/types/services/DisplayService.d.ts +18 -2
  76. package/build/types/services/NodeSemanticInfo.d.ts +7 -5
  77. package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +7 -21
  78. package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -0
  79. package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -1
  80. package/build/types/services/source-generation/SourceGenerationService.d.ts +2 -2
  81. package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +5 -5
  82. package/build/types/services/workspace/CompilationController.d.ts +3 -3
  83. package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +4 -4
  84. package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +4 -4
  85. package/build/types/services/workspace/Workspace.d.ts +3 -3
  86. package/build/types/services/workspace/WorkspaceFiles.d.ts +7 -7
  87. package/build/types/tree/KeywordKind.d.ts +37 -37
  88. package/build/types/tree/NodeKind.d.ts +10 -12
  89. package/build/types/tree/green/Nodes.d.ts +57 -84
  90. package/build/types/tree/green/SyntaxFactory.d.ts +4 -5
  91. package/build/types/tree/green/SyntaxToCode.d.ts +1 -2
  92. package/build/types/tree/red/Nodes.d.ts +67 -97
  93. package/build/types/ts-interop/Entities.d.ts +51 -28
  94. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +0 -1
  95. package/build/types/types/TypeMembers.d.ts +9 -0
  96. package/package.json +2 -2
  97. package/build/types/analysis/DereferencedVariableAccess.d.ts +0 -14
  98. package/build/types/analysis/IndexedAccess.d.ts +0 -14
  99. package/build/types/analysis/VariableAccess.d.ts +0 -14
  100. package/build/types/analysis/VariantLookup.d.ts +0 -20
  101. package/build/types/emitter/ir/LoweringOptions.d.ts +0 -36
  102. package/build/types/emitter/ir/LoweringState.d.ts +0 -49
  103. package/build/types/entities/VariantEntity.d.ts +0 -31
  104. package/build/types/entities/Variants.d.ts +0 -10
@@ -7,13 +7,13 @@ export declare class Lookup {
7
7
  private readonly _scopeChain;
8
8
  private readonly _hidingMatcher;
9
9
  constructor(_scopeChain: ScopeChain, _hidingMatcher: IEntityHidingMatcher);
10
- getTypesOrContainersWithTypes(): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
11
- getTypesOrContainersWithTypesByName(name: SearchName): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
12
- getNamedDeclarations(): FoundNamedDeclaration<NamedDeclaration>[];
13
- getNamedDeclarationsByName(name: SearchName): FoundNamedDeclaration<NamedDeclaration>[];
14
- getOperators(): FoundAnonymousDeclaration<types.Operator>[];
15
- getOperatorsByKind(kind: OperatorKind): FoundAnonymousDeclaration<types.Operator>[];
16
- getTypeExtensionsByType(type: TypeEntity): TypeExtensionEntity[];
10
+ getTypesOrContainersWithTypes(): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
11
+ getTypesOrContainersWithTypesByName(name: SearchName): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
12
+ getNamedDeclarations(): readonly FoundNamedDeclaration<NamedDeclaration>[];
13
+ getNamedDeclarationsByName(name: SearchName): readonly FoundNamedDeclaration<NamedDeclaration>[];
14
+ getOperators(): readonly FoundAnonymousDeclaration<types.Operator>[];
15
+ getOperatorsByKind(kind: OperatorKind): readonly FoundAnonymousDeclaration<types.Operator>[];
16
+ getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
17
17
  private checkTypeOrPackageDeclarationShadowing;
18
18
  private checkNamedDeclarationShadowing;
19
19
  private checkOperatorShadowing;
@@ -23,5 +23,6 @@ export declare class ScopeChain {
23
23
  private constructor();
24
24
  addFirst(scope: IScope): ScopeChain;
25
25
  toQuery(): Query<IScope>;
26
+ enumerateScopes(): Iterable<IScope>;
26
27
  static withSingleScope(scope: IScope): ScopeChain;
27
28
  }
@@ -0,0 +1,16 @@
1
+ export declare enum ModifierFlags {
2
+ None = 0,
3
+ HiddenWithoutLevel = 1,
4
+ HiddenInType = 2,
5
+ HiddenInHierarchy = 4,
6
+ HiddenInFile = 8,
7
+ HiddenInPackage = 16,
8
+ Basic = 32,
9
+ Static = 64,
10
+ Redefinable = 128,
11
+ Abstract = 256,
12
+ Redefined = 512,
13
+ Async = 1024,
14
+ Const = 2048,
15
+ NotComputed = 4096
16
+ }
@@ -9,7 +9,6 @@ export declare class NamedTypeSpecifierResolver {
9
9
  private readonly _node;
10
10
  constructor(_analyzer: Analyzer, _node: NamedTypeSpecifier);
11
11
  resolve(): NamedTypeSpecifierResolutionResult;
12
- private convertNamedTypeToTypeDeclaration;
13
12
  private resolveTypeOverload;
14
13
  }
15
14
  export declare class NamedTypeSpecifierResolutionResult {
@@ -15,6 +15,7 @@ export declare class NodeTypeUtils {
15
15
  export type PackageTypeDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageMethodTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration;
16
16
  export type StructuredTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.AnonymousStructuredTypeDeclaration;
17
17
  export type VariantTypeDeclaration = tree.PackageVariantTypeDeclaration | tree.AnonymousVariantTypeDeclaration;
18
+ export declare function isVariantTypeDeclaration(node: tree.Node): node is VariantTypeDeclaration;
18
19
  export type MethodTypeDeclaration = tree.PackageMethodTypeDeclaration | tree.AnonymousMethodTypeDeclaration;
19
20
  export type MethodDeclaration = tree.PackageMethodDeclaration | tree.NestedMethodDeclaration | tree.TypeMethodDeclaration;
20
21
  export type TypeDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | MethodTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
@@ -5,8 +5,8 @@ import { Analyzer } from './Analyzer.js';
5
5
  export declare class Resolver<TCandidate extends ICandidate<TValueParameter>, TValueParameter extends IValueParameter> {
6
6
  private readonly _analyzer;
7
7
  constructor(_analyzer: Analyzer);
8
- resolveByCallExpression(candidates: Iterable<TCandidate>, node: CallExpression): Iterable<TCandidate>;
9
- resolveByTargetType(candidates: Iterable<TCandidate>, targetType: types.MethodType): Iterable<TCandidate>;
8
+ resolveByCallExpression(candidates: readonly TCandidate[], node: CallExpression): readonly TCandidate[];
9
+ resolveByTargetType(candidates: readonly TCandidate[], targetType: types.MethodType): readonly TCandidate[];
10
10
  }
11
11
  export interface ICandidate<TValueParameter extends IValueParameter> {
12
12
  getValueParameters(): readonly TValueParameter[];
@@ -1,10 +1,10 @@
1
1
  import { Analyzer } from '../analysis/index.js';
2
- import * as matcher from './CallArgumentsToParametersMatcher.js';
3
- export declare class OverloadResolver<TSignature extends matcher.ISignature<TParameter>, TParameter extends matcher.ISignatureParameter, TCallArgument extends matcher.ICallArgument> {
2
+ import * as matcher from './ArgumentsToParametersMatcher.js';
3
+ export declare class OverloadResolver<TSignature extends matcher.ISignature<TParameter>, TParameter extends matcher.ISignatureParameter, TArgument extends matcher.IArgument> {
4
4
  private readonly _analyzer;
5
5
  private readonly _signatures;
6
- private readonly _callArguments;
7
- constructor(_analyzer: Analyzer, _signatures: readonly TSignature[], _callArguments: readonly TCallArgument[]);
6
+ private readonly _arguments;
7
+ constructor(_analyzer: Analyzer, _signatures: readonly TSignature[], _arguments: readonly TArgument[]);
8
8
  resolveOverload(): TSignature[];
9
9
  private tryChooseBestSignature;
10
10
  private chooseBetterTargetType;
@@ -1,6 +1,5 @@
1
- import { Query, SearchName } from '../common/index.js';
2
- import { NamedMember } from '../entities/PackageMembers.js';
3
- import { IEntityHidingMatcher, PackageEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
1
+ import { SearchName } from '../common/index.js';
2
+ import { IEntityHidingMatcher, NamedPackageMemberEntity, PackageEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
4
3
  import { FoundNamedDeclaration } from './FoundDeclaration.js';
5
4
  import { LocalizationContext } from './LocalizationContext.js';
6
5
  export declare class PackageMemberLookup {
@@ -9,7 +8,7 @@ export declare class PackageMemberLookup {
9
8
  private readonly _translatedMembers;
10
9
  private get translatedMembers();
11
10
  constructor(_package: PackageEntity, _localizationContext: LocalizationContext | undefined);
12
- getNamedMembers(hidingMatcher?: IEntityHidingMatcher): Query<FoundNamedDeclaration<NamedMember>>;
13
- getNamedMembersByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): Query<FoundNamedDeclaration<NamedMember>>;
14
- getTypeExtensions(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): Query<TypeExtensionEntity>;
11
+ getNamedMembers(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedPackageMemberEntity>[];
12
+ getNamedMembersByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedPackageMemberEntity>[];
13
+ getTypeExtensions(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): readonly TypeExtensionEntity[];
15
14
  }
@@ -1,11 +1,11 @@
1
+ import { AccessKind } from '../common/index.js';
1
2
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
- import { PackageTypeEntity, PackageVariableEntity, VariantEntity } from '../entities/index.js';
3
+ import { PackageTypeEntity, PackageVariableEntity } from '../entities/index.js';
3
4
  import * as tree from '../tree/index.js';
4
5
  import * as types from '../types/index.js';
5
6
  import { AccessedMethod } from './AccessedMethod.js';
6
7
  import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
7
8
  import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
8
- import * as variableAccess from './VariableAccess.js';
9
9
  import { Analyzer, TargetTypeHint } from './index.js';
10
10
  export declare class Resolver {
11
11
  private readonly _semanticContext;
@@ -31,14 +31,22 @@ export declare class Resolver {
31
31
  export declare class ResolutionResult {
32
32
  readonly meaning: Meaning;
33
33
  readonly diagnostic?: Diagnostic | undefined;
34
- constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined);
34
+ /**
35
+ * Может ли измениться результат, если посчитать его с другим целевым типом?
36
+ */
37
+ readonly dependsOnTargetType: boolean;
38
+ constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
39
+ /**
40
+ * Может ли измениться результат, если посчитать его с другим целевым типом?
41
+ */
42
+ dependsOnTargetType?: boolean);
35
43
  }
36
- export type Meaning = Meaning_packageVariableAccess | Meaning_packageMethodAccess | Meaning_packageTypeAccess | Meaning_packageNameSegmentAccess | Meaning_variantAccess | Meaning_staticVariableAccess | Meaning_staticMethodAccess | Meaning_instanceVariableAccess | Meaning_instanceMethodAccess | Meaning_operatorAccess | Meaning_unresolved;
44
+ export type Meaning = Meaning_packageVariableAccess | Meaning_packageMethodAccess | Meaning_packageTypeAccess | Meaning_packageNameSegmentAccess | Meaning_staticVariableAccess | Meaning_staticMethodAccess | Meaning_instanceVariableAccess | Meaning_instanceMethodAccess | Meaning_operatorAccess | Meaning_unresolved;
37
45
  declare class Meaning_packageVariableAccess {
38
46
  readonly variable: FoundNamedDeclaration<PackageVariableEntity>;
39
- readonly access: variableAccess.VariableAccess;
47
+ readonly accessKind: AccessKind;
40
48
  readonly kind = "package-variable-access";
41
- constructor(variable: FoundNamedDeclaration<PackageVariableEntity>, access: variableAccess.VariableAccess);
49
+ constructor(variable: FoundNamedDeclaration<PackageVariableEntity>, accessKind: AccessKind);
42
50
  }
43
51
  declare class Meaning_packageMethodAccess {
44
52
  readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
@@ -59,18 +67,12 @@ declare class Meaning_packageNameSegmentAccess {
59
67
  readonly kind = "package-name-segment-access";
60
68
  constructor(packageTreeNode: PackageNameTreeNode);
61
69
  }
62
- declare class Meaning_variantAccess {
63
- readonly type: types.VariantType;
64
- readonly variant: FoundNamedDeclaration<VariantEntity>;
65
- readonly kind = "variant-access";
66
- constructor(type: types.VariantType, variant: FoundNamedDeclaration<VariantEntity>);
67
- }
68
70
  declare class Meaning_staticVariableAccess {
69
71
  readonly type: types.Type;
70
72
  readonly variable: FoundNamedDeclaration<types.Variable>;
71
- readonly access: variableAccess.VariableAccess;
73
+ readonly accessKind: AccessKind;
72
74
  readonly kind = "static-variable-access";
73
- constructor(type: types.Type, variable: FoundNamedDeclaration<types.Variable>, access: variableAccess.VariableAccess);
75
+ constructor(type: types.Type, variable: FoundNamedDeclaration<types.Variable>, accessKind: AccessKind);
74
76
  }
75
77
  declare class Meaning_staticMethodAccess {
76
78
  readonly type: types.Type;
@@ -82,9 +84,9 @@ declare class Meaning_staticMethodAccess {
82
84
  }
83
85
  declare class Meaning_instanceVariableAccess {
84
86
  readonly variable: FoundNamedDeclaration<types.Variable>;
85
- readonly access: variableAccess.VariableAccess;
87
+ readonly accessKind: AccessKind;
86
88
  readonly kind = "instance-variable-access";
87
- constructor(variable: FoundNamedDeclaration<types.Variable>, access: variableAccess.VariableAccess);
89
+ constructor(variable: FoundNamedDeclaration<types.Variable>, accessKind: AccessKind);
88
90
  }
89
91
  declare class Meaning_instanceMethodAccess {
90
92
  readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
@@ -1,5 +1,5 @@
1
1
  import { Name, PackageLocale, SearchName } from '../common/index.js';
2
- import { AliasTypeEntity, EntityHidingLevel, IEntityHidingMatcher, MethodEntity, NamedTypeEntity, OperatorKind, PackageAliasEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity, TypeEntity, TypeExtensionEntity, TypeParameterEntity, VariableEntity, VariantEntity } from '../entities/index.js';
2
+ import { EntityHidingLevel, IEntityHidingMatcher, MethodEntity, NamedTypeEntity, OperatorKind, PackageAliasEntity, TypeEntity, TypeExtensionEntity, VariableEntity } 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 { Analyzer } from './Analyzer.js';
@@ -8,105 +8,16 @@ import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
8
8
  import { Lookup } from './Lookup.js';
9
9
  import { TypeMemberLookup } from './TypeMemberLookup.js';
10
10
  export interface IScope {
11
- getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
12
- getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
13
- getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
14
- getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
15
- getOperators(hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
16
- getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
17
- getTypeExtensionsByType(typeEntity: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
18
- }
19
- export type TypeOrContainerWithTypes = TypeOrContainerWithTypes_type | TypeOrContainerWithTypes_packageAlias | TypeOrContainerWithTypes_packageNameSegment;
20
- export declare class TypeOrContainerWithTypes_type implements ITypeOrContainerWithTypes {
21
- readonly value: TypeDeclaration;
22
- readonly kind = "type";
23
- constructor(value: TypeDeclaration);
24
- getName(): Name;
25
- isHidden(): EntityHidingLevel | undefined;
26
- }
27
- export declare class TypeOrContainerWithTypes_packageAlias implements ITypeOrContainerWithTypes {
28
- readonly value: PackageAliasEntity;
29
- readonly kind = "package-alias";
30
- constructor(value: PackageAliasEntity);
31
- getName(): Name;
32
- isHidden(): EntityHidingLevel | undefined;
33
- }
34
- export declare class TypeOrContainerWithTypes_packageNameSegment implements ITypeOrContainerWithTypes {
35
- readonly value: PackageNameTreeNode;
36
- readonly kind = "package-name-segment";
37
- constructor(value: PackageNameTreeNode);
38
- getName(): Name;
39
- isHidden(): EntityHidingLevel | undefined;
40
- }
41
- interface ITypeOrContainerWithTypes {
42
- getName(): Name;
43
- isHidden(): EntityHidingLevel | undefined;
44
- }
45
- export type TypeDeclaration = TypeDeclaration_structured | TypeDeclaration_variant | TypeDeclaration_method | TypeDeclaration_parameter | TypeDeclaration_alias;
46
- export declare class TypeDeclaration_structured implements ITypeDeclaration {
47
- readonly value: PackageStructuredTypeEntity;
48
- readonly kind = "structured";
49
- constructor(value: PackageStructuredTypeEntity);
50
- getArity(): number;
51
- getTypeParameters(): readonly TypeParameterEntity[];
52
- getName(): Name;
53
- getEntity(): NamedTypeEntity;
54
- isHidden(): EntityHidingLevel | undefined;
55
- instantiate(analyzer: Analyzer, typeArguments: readonly types.Type[]): types.Type;
56
- }
57
- export declare class TypeDeclaration_variant implements ITypeDeclaration {
58
- readonly value: PackageVariantTypeEntity;
59
- readonly kind = "variant";
60
- constructor(value: PackageVariantTypeEntity);
61
- getArity(): number;
62
- getTypeParameters(): readonly TypeParameterEntity[];
63
- getName(): Name;
64
- getEntity(): NamedTypeEntity;
65
- isHidden(): EntityHidingLevel | undefined;
66
- instantiate(analyzer: Analyzer, typeArguments: readonly types.Type[]): types.Type;
67
- }
68
- export declare class TypeDeclaration_method implements ITypeDeclaration {
69
- readonly value: PackageMethodTypeEntity;
70
- readonly kind = "method";
71
- constructor(value: PackageMethodTypeEntity);
72
- getArity(): number;
73
- getTypeParameters(): readonly TypeParameterEntity[];
74
- getName(): Name;
75
- getEntity(): NamedTypeEntity;
76
- isHidden(): EntityHidingLevel | undefined;
77
- instantiate(analyzer: Analyzer, typeArguments: readonly types.Type[]): types.Type;
78
- }
79
- export declare class TypeDeclaration_parameter implements ITypeDeclaration {
80
- readonly value: TypeParameterEntity;
81
- readonly kind = "parameter";
82
- constructor(value: TypeParameterEntity);
83
- getArity(): number;
84
- getTypeParameters(): readonly TypeParameterEntity[];
85
- getName(): Name;
86
- getEntity(): NamedTypeEntity;
87
- isHidden(): EntityHidingLevel | undefined;
88
- instantiate(analyzer: Analyzer, _typeArguments: readonly types.Type[]): types.Type;
89
- }
90
- export declare class TypeDeclaration_alias implements ITypeDeclaration {
91
- readonly value: AliasTypeEntity;
92
- readonly kind = "alias";
93
- constructor(value: AliasTypeEntity);
94
- getArity(): number;
95
- getTypeParameters(): readonly TypeParameterEntity[];
96
- getName(): Name;
97
- getEntity(): NamedTypeEntity;
98
- isHidden(): EntityHidingLevel | undefined;
99
- instantiate(analyzer: Analyzer, typeArguments: readonly types.Type[]): types.Type;
100
- }
101
- interface ITypeDeclaration {
102
- getArity(): number;
103
- getTypeParameters(): readonly TypeParameterEntity[];
104
- getName(): Name;
105
- getEntity(): NamedTypeEntity;
106
- isHidden(): EntityHidingLevel | undefined;
107
- instantiate(analyzer: Analyzer, typeArguments: readonly types.Type[]): types.Type;
108
- }
109
- export type NamedDeclaration = NamedDeclaration_method | NamedDeclaration_variable | NamedDeclaration_type | NamedDeclaration_variant | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
11
+ getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
12
+ getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
13
+ getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
14
+ getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
15
+ getOperators(hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
16
+ getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
17
+ getTypeExtensionsByType(typeEntity: TypeEntity, hidingMatcher?: IEntityHidingMatcher): readonly TypeExtensionEntity[];
18
+ }
19
+ export type TypeOrContainerWithTypes = NamedDeclaration_type | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
20
+ export type NamedDeclaration = NamedDeclaration_method | NamedDeclaration_variable | NamedDeclaration_type | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
110
21
  export declare class NamedDeclaration_method implements INamedDeclaration {
111
22
  readonly value: NamedDeclarationMethod;
112
23
  readonly kind = "method";
@@ -193,16 +104,9 @@ interface INamedDeclarationVariable {
193
104
  isHidden(): EntityHidingLevel | undefined;
194
105
  }
195
106
  export declare class NamedDeclaration_type implements INamedDeclaration {
196
- readonly value: TypeDeclaration;
107
+ readonly value: NamedTypeEntity;
197
108
  readonly kind = "type";
198
- constructor(value: TypeDeclaration);
199
- getName(): Name;
200
- isHidden(): EntityHidingLevel | undefined;
201
- }
202
- export declare class NamedDeclaration_variant implements INamedDeclaration {
203
- readonly value: VariantEntity;
204
- readonly kind = "variant";
205
- constructor(value: VariantEntity);
109
+ constructor(value: NamedTypeEntity);
206
110
  getName(): Name;
207
111
  isHidden(): EntityHidingLevel | undefined;
208
112
  }
@@ -229,7 +133,9 @@ export declare class SourceFileScope implements IScope {
229
133
  private readonly _containingPackageMemberLookup;
230
134
  private readonly _importedPackageMemberLookups;
231
135
  private readonly _packageNameSegments;
136
+ private readonly _packageNameSegmentsByKey;
232
137
  private readonly _locale;
138
+ private get packageNameSegmentsByKey();
233
139
  constructor(analyzer: Analyzer, node: tree.SourceFile);
234
140
  getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
235
141
  getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
@@ -238,7 +144,6 @@ export declare class SourceFileScope implements IScope {
238
144
  getOperators(_hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
239
145
  getOperatorsByKind(_kind: OperatorKind, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
240
146
  getTypeExtensionsByType(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
241
- private convertPackageMembersTypeDeclaration;
242
147
  private convertPackageMemberToNamedDeclaration;
243
148
  private convertPackageAliasToTypeOrContainerWithTypes;
244
149
  private convertPackageMemberToTypeOrContainerWithTypes;
@@ -247,15 +152,15 @@ export declare class SourceFileScope implements IScope {
247
152
  private checkNamedDeclarationShadowing;
248
153
  }
249
154
  export declare class GenericScope implements IScope {
250
- private readonly _typeOrContainerWithTypes;
251
155
  private readonly _namedDeclarations;
156
+ private readonly _typeOrContainerWithTypes;
252
157
  private readonly _typeExtensionEntities;
253
158
  private readonly _locale;
254
159
  private readonly _namedDeclarationsByName;
255
160
  private readonly _typesOrContainerWithTypesByName;
256
161
  private get namedDeclarationsByName();
257
162
  private get typesOrContainerWithTypesByName();
258
- constructor(typeOrContainerWithTypes: readonly TypeOrContainerWithTypes[], namedDeclarations: readonly NamedDeclaration[], typeExtensionEntities: readonly TypeExtensionEntity[], locale: PackageLocale);
163
+ constructor(namedDeclarations: readonly NamedDeclaration[], typeExtensionEntities: readonly TypeExtensionEntity[], locale: PackageLocale);
259
164
  getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
260
165
  getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
261
166
  getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
@@ -284,7 +189,7 @@ export declare class ParameterDeclarationsScope implements IScope {
284
189
  getTypeExtensionsByType(typeEntity: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
285
190
  private checkHiding;
286
191
  }
287
- export declare class StructuredTypeBodyScope implements IScope {
192
+ export declare class TypeWithMembersBodyScope implements IScope {
288
193
  private readonly _memberLookup;
289
194
  private readonly _typeExtensionsLookup;
290
195
  constructor(_memberLookup: TypeMemberLookup, _typeExtensionsLookup: Lookup);
@@ -292,8 +197,8 @@ export declare class StructuredTypeBodyScope implements IScope {
292
197
  getTypesOrContainersWithTypesByName(_name: SearchName, _hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
293
198
  getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
294
199
  getNamedDeclarationsByName(name: SearchName, hidingMatcher: IEntityHidingMatcher | undefined): FoundNamedDeclaration<NamedDeclaration>[];
295
- getOperators(hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
296
- getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
200
+ getOperators(hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
201
+ getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
297
202
  getTypeExtensionsByType(_typeEntity: TypeEntity, _hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
298
203
  private convertNamedMember;
299
204
  }
@@ -312,7 +217,7 @@ export declare class TypeExtensionBodyScope implements IScope {
312
217
  getNamedDeclarations(hidingMatcher: IEntityHidingMatcher | undefined): FoundNamedDeclaration<NamedDeclaration>[];
313
218
  getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
314
219
  getOperators(hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
315
- getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
220
+ getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
316
221
  getTypeExtensionsByType(_typeEntity: TypeEntity, _hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
317
222
  private convertNamedTypeExtensionMember;
318
223
  private convertTypeExtensionOperator;
@@ -21,7 +21,7 @@ export interface SemanticContext {
21
21
  getContainingSourceFile(): SourceFile;
22
22
  getContainingPackage(): PackageEntity;
23
23
  getLocalizationContext(): LocalizationContext;
24
- isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
24
+ isInTryStatement(): TryStatementClausesInfo | undefined;
25
25
  isInFinallyClause(): boolean;
26
26
  getScopeLookup(): Lookup;
27
27
  getHidingMatcher(): IEntityHidingMatcher;
@@ -35,6 +35,8 @@ export declare namespace SubprogramInfo {
35
35
  constructor(analyzer: Analyzer, node: MethodDeclaration);
36
36
  getReturnType(): types.Type | undefined;
37
37
  isGenerator(): boolean;
38
+ allowsAsyncCalls(): boolean;
39
+ private getEntity;
38
40
  }
39
41
  export class Operator implements ISubprogramInfo {
40
42
  readonly kind = "operator";
@@ -43,6 +45,7 @@ export declare namespace SubprogramInfo {
43
45
  constructor(analyzer: Analyzer, node: tree.OperatorDeclaration);
44
46
  getReturnType(): types.Type | undefined;
45
47
  isGenerator(): boolean;
48
+ allowsAsyncCalls(): boolean;
46
49
  }
47
50
  export class Constructor implements ISubprogramInfo {
48
51
  readonly kind = "constructor";
@@ -51,6 +54,7 @@ export declare namespace SubprogramInfo {
51
54
  constructor(analyzer: Analyzer, node: tree.TypeConstructorDeclaration);
52
55
  getReturnType(): types.Type | undefined;
53
56
  isGenerator(): boolean;
57
+ allowsAsyncCalls(): boolean;
54
58
  getEntity(): ConstructorEntity;
55
59
  }
56
60
  export class Destructor implements ISubprogramInfo {
@@ -60,6 +64,7 @@ export declare namespace SubprogramInfo {
60
64
  constructor(analyzer: Analyzer, node: tree.TypeDestructorDeclaration);
61
65
  getReturnType(): types.Type | undefined;
62
66
  isGenerator(): boolean;
67
+ allowsAsyncCalls(): boolean;
63
68
  }
64
69
  export class Getter implements ISubprogramInfo {
65
70
  readonly kind = "getter";
@@ -68,6 +73,7 @@ export declare namespace SubprogramInfo {
68
73
  constructor(analyzer: Analyzer, node: GetterDeclaration);
69
74
  getReturnType(): types.Type | undefined;
70
75
  isGenerator(): boolean;
76
+ allowsAsyncCalls(): boolean;
71
77
  }
72
78
  export class Setter implements ISubprogramInfo {
73
79
  readonly kind = "setter";
@@ -76,6 +82,7 @@ export declare namespace SubprogramInfo {
76
82
  constructor(analyzer: Analyzer, node: SetterDeclaration);
77
83
  getReturnType(): types.Type | undefined;
78
84
  isGenerator(): boolean;
85
+ allowsAsyncCalls(): boolean;
79
86
  }
80
87
  export class PackageConstructor implements ISubprogramInfo {
81
88
  readonly kind = "package-constructor";
@@ -84,6 +91,7 @@ export declare namespace SubprogramInfo {
84
91
  constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration);
85
92
  getReturnType(): types.Type | undefined;
86
93
  isGenerator(): boolean;
94
+ allowsAsyncCalls(): boolean;
87
95
  getPackageEntity(): PackageEntity;
88
96
  }
89
97
  export class PackageEntryPoint implements ISubprogramInfo {
@@ -93,6 +101,7 @@ export declare namespace SubprogramInfo {
93
101
  constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration);
94
102
  getReturnType(): types.Type | undefined;
95
103
  isGenerator(): boolean;
104
+ allowsAsyncCalls(): boolean;
96
105
  getPackageEntity(): PackageEntity;
97
106
  }
98
107
  export class MethodLiteral implements ISubprogramInfo {
@@ -102,10 +111,13 @@ export declare namespace SubprogramInfo {
102
111
  constructor(analyzer: Analyzer, node: RegularOrBlockMethodLiteral);
103
112
  getReturnType(): types.Type | undefined;
104
113
  isGenerator(): boolean;
114
+ allowsAsyncCalls(): boolean;
115
+ private getSignatureType;
105
116
  }
106
117
  interface ISubprogramInfo {
107
118
  getReturnType(): types.Type | undefined;
108
119
  isGenerator(): boolean;
120
+ allowsAsyncCalls(): boolean;
109
121
  }
110
122
  export {};
111
123
  }
@@ -131,10 +143,10 @@ export declare namespace TypeOrTypeExtension {
131
143
  }
132
144
  export {};
133
145
  }
134
- export declare class RunStatementClausesInfo {
135
- readonly hasOnErrorClause: boolean;
146
+ export declare class TryStatementClausesInfo {
147
+ readonly hasCatchClause: boolean;
136
148
  readonly hasFinallyClause: boolean;
137
- constructor(hasOnErrorClause: boolean, hasFinallyClause: boolean);
149
+ constructor(hasCatchClause: boolean, hasFinallyClause: boolean);
138
150
  }
139
151
  declare abstract class SemanticContextWithParent implements SemanticContext {
140
152
  protected readonly _parentContext: SemanticContext;
@@ -145,7 +157,7 @@ declare abstract class SemanticContextWithParent implements SemanticContext {
145
157
  getContainingSourceFile(): SourceFile;
146
158
  getContainingPackage(): PackageEntity;
147
159
  getLocalizationContext(): LocalizationContext;
148
- isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
160
+ isInTryStatement(): TryStatementClausesInfo | undefined;
149
161
  isInFinallyClause(): boolean;
150
162
  getScopeLookup(): Lookup;
151
163
  getHidingMatcher(): IEntityHidingMatcher;
@@ -161,7 +173,7 @@ export declare class SourceFileSemanticContext implements SemanticContext {
161
173
  getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
162
174
  getContainingSourceFile(): SourceFile;
163
175
  getContainingPackage(): PackageEntity;
164
- isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
176
+ isInTryStatement(): TryStatementClausesInfo | undefined;
165
177
  isInFinallyClause(): boolean;
166
178
  getScopeLookup(): Lookup;
167
179
  getLocalizationContext(): LocalizationContext;
@@ -178,7 +190,7 @@ export declare class LastSemanticContextOfType extends SemanticContextWithParent
178
190
  constructor(analyzer: Analyzer, node: TypeDeclarationCreatingSemanticContext, parentContext: SemanticContext);
179
191
  getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
180
192
  getContainingSubprogram(): SubprogramInfo | undefined;
181
- isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
193
+ isInTryStatement(): TryStatementClausesInfo | undefined;
182
194
  isInFinallyClause(): boolean;
183
195
  private getContainingType;
184
196
  }
@@ -217,7 +229,7 @@ export declare class LastSemanticContextOfMethod extends SemanticContextWithPare
217
229
  private readonly _subprogramInfo;
218
230
  constructor(analyzer: Analyzer, node: MethodDeclaration, parentContext: SemanticContext);
219
231
  getContainingSubprogram(): SubprogramInfo | undefined;
220
- isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
232
+ isInTryStatement(): TryStatementClausesInfo | undefined;
221
233
  isInFinallyClause(): boolean;
222
234
  }
223
235
  export declare class MethodTypeParameterSemanticContext extends SemanticContextWithParent {
@@ -295,10 +307,8 @@ export declare class GetterSemanticContext extends SemanticContextWithParent {
295
307
  export declare class SetterSemanticContext extends SemanticContextWithParent {
296
308
  private readonly _analyzer;
297
309
  private readonly _node;
298
- private readonly _scopeChain;
299
310
  private readonly _subprogramInfo;
300
311
  constructor(analyzer: Analyzer, node: SetterDeclaration, parentContext: SemanticContext);
301
- getScopeChain(): ScopeChain;
302
312
  getContainingSubprogram(): SubprogramInfo | undefined;
303
313
  }
304
314
  export declare class StatementBlockSemanticContext extends SemanticContextWithParent {
@@ -307,7 +317,7 @@ export declare class StatementBlockSemanticContext extends SemanticContextWithPa
307
317
  private readonly _scopeChain;
308
318
  constructor(analyzer: Analyzer, node: tree.StatementBlock, parentContext: SemanticContext);
309
319
  getScopeChain(): ScopeChain;
310
- isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
320
+ isInTryStatement(): TryStatementClausesInfo | undefined;
311
321
  isInFinallyClause(): boolean;
312
322
  }
313
323
  export type RegularOrBlockMethodLiteral = tree.MethodLiteral | tree.MethodBlockLiteral;
@@ -327,11 +337,11 @@ export declare class ForStatementSemanticContext extends SemanticContextWithPare
327
337
  constructor(analyzer: Analyzer, node: tree.ForStatement, parentContext: SemanticContext);
328
338
  getScopeChain(): ScopeChain;
329
339
  }
330
- export declare class OnErrorClauseSemanticContext extends SemanticContextWithParent {
340
+ export declare class CatchClauseSemanticContext extends SemanticContextWithParent {
331
341
  private readonly _analyzer;
332
342
  private readonly _node;
333
343
  private readonly _scopeChain;
334
- constructor(analyzer: Analyzer, node: tree.OnErrorClause, parentContext: SemanticContext);
344
+ constructor(analyzer: Analyzer, node: tree.CatchClause, parentContext: SemanticContext);
335
345
  getScopeChain(): ScopeChain;
336
346
  }
337
347
  export {};
@@ -38,7 +38,7 @@ export declare class SemanticContextBuilder {
38
38
  ofTypeDestructorDeclaration(node: tree.TypeDestructorDeclaration): SemanticContext;
39
39
  ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
40
40
  ofTypeIndexedSetterDeclaration(node: tree.TypeIndexedSetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
41
- ofOnErrorClause(node: tree.OnErrorClause): SemanticContext;
41
+ ofCatchClause(node: tree.CatchClause): SemanticContext;
42
42
  private containingInternal;
43
43
  private ofChildOfMethodDeclaration;
44
44
  private ofChildOfTypeDeclarationWithMemberBlock;