@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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-LG4Z4SWO.js";
3
+ } from "./chunk-Z6TZA6SN.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -14,7 +14,7 @@ import {
14
14
  __async,
15
15
  performanceMeasurementStageNames,
16
16
  performanceMeasurementStages
17
- } from "./chunk-DZNNWICP.js";
17
+ } from "./chunk-TFTCV5R5.js";
18
18
 
19
19
  // source/executor/FileSystemUri.ts
20
20
  import { platform } from "os";
@@ -216,7 +216,7 @@ var NodeCompiler = class {
216
216
  const standardLibraryUri = yield this.findStandardTypeScriptLibrary(nodeModulesSearchPaths, defaultTsLibraryPath);
217
217
  if (standardLibraryUri === void 0) {
218
218
  const diagnostic = new Diagnostic(DiagnosticData.withCode(
219
- 125 /* CanNotFindTsLibDirectoryBaseSearchPaths0 */,
219
+ 2089 /* CanNotFindTsLibDirectoryBaseSearchPaths0 */,
220
220
  [nodeModulesSearchPaths.map((p) => `'${p}'`).join(", ")]
221
221
  ), void 0);
222
222
  diagnostics?.addDiagnostic(diagnostic);
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-DZNNWICP.js";
13
+ } from "./chunk-TFTCV5R5.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -69,7 +69,7 @@ var Compiler = class {
69
69
  return __async(this, null, function* () {
70
70
  if (analyzer.compilation.mainPackage === void 0) {
71
71
  _diagnostics?.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
72
- 127 /* ProgramWithoutMainPackageCanNotBeCompiled */
72
+ 2091 /* ProgramWithoutMainPackageCanNotBeCompiled */
73
73
  ), void 0));
74
74
  return void 0;
75
75
  }
@@ -83,7 +83,7 @@ var Compiler = class {
83
83
  return __async(this, null, function* () {
84
84
  if (analyzer.compilation.mainPackage === void 0) {
85
85
  _diagnostics?.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
86
- 127 /* ProgramWithoutMainPackageCanNotBeCompiled */
86
+ 2091 /* ProgramWithoutMainPackageCanNotBeCompiled */
87
87
  ), void 0));
88
88
  return "";
89
89
  }
@@ -0,0 +1,53 @@
1
+ import { Name } from '../common/index.js';
2
+ import { FunctionEntity, ParameterVariableEntity, TypeParameterEntity } from '../entities/index.js';
3
+ import * as types from '../types/index.js';
4
+ import { Analyzer } from './Analyzer.js';
5
+ import { SubstitutedFunction } from './SubstitutedFunction.js';
6
+ export type AccessedFunction = AccessedFunction_entity | AccessedFunction_typeMember | AccessedFunction_substitutedFunction;
7
+ export declare class AccessedFunction_entity implements IAccessedFunction {
8
+ readonly value: FunctionEntity;
9
+ readonly kind = "entity";
10
+ constructor(value: FunctionEntity);
11
+ getTypeParameters(): readonly TypeParameterEntity[];
12
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
13
+ getReturnType(): types.Type;
14
+ getEntity(): FunctionEntity;
15
+ getName(): Name;
16
+ getSignatureType(analyzer: Analyzer): types.FunctionType;
17
+ }
18
+ export declare class AccessedFunction_typeMember implements IAccessedFunction {
19
+ readonly value: types.Method;
20
+ readonly kind = "type-member";
21
+ constructor(value: types.Method);
22
+ getTypeParameters(): readonly TypeParameterEntity[];
23
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
24
+ getReturnType(): types.Type;
25
+ getEntity(): FunctionEntity;
26
+ getName(): Name;
27
+ getSignatureType(_analyzer: Analyzer): types.FunctionType;
28
+ }
29
+ export declare class AccessedFunction_substitutedFunction implements IAccessedFunction {
30
+ readonly value: SubstitutedFunction;
31
+ readonly kind = "substituted-function";
32
+ constructor(value: SubstitutedFunction);
33
+ getTypeParameters(): readonly TypeParameterEntity[];
34
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
35
+ getReturnType(): types.Type;
36
+ getEntity(): FunctionEntity;
37
+ getName(): Name;
38
+ getSignatureType(_analyzer: Analyzer): types.FunctionType;
39
+ }
40
+ export declare class AccessedFunctionValueParameter {
41
+ readonly entity: ParameterVariableEntity;
42
+ readonly type: types.Type;
43
+ constructor(entity: ParameterVariableEntity, type: types.Type);
44
+ }
45
+ interface IAccessedFunction {
46
+ getTypeParameters(): readonly TypeParameterEntity[];
47
+ getValueParameters(): readonly AccessedFunctionValueParameter[];
48
+ getReturnType(): types.Type;
49
+ getEntity(): FunctionEntity;
50
+ getName(): Name;
51
+ getSignatureType(analyzer: Analyzer): types.FunctionType;
52
+ }
53
+ export {};
@@ -2,8 +2,8 @@ import { Name, PackageLocale } from '../common/index.js';
2
2
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
3
3
  import { PackageEntity } from '../entities/PackageEntity.js';
4
4
  import { NamedTypeMemberEntity } from '../entities/TypeEntityMembers.js';
5
- import { PackageVariableEntity, ParameterVariableEntity, TypeVariableEntity } from '../entities/VariableEntity.js';
6
- import { AliasTypeEntity, ConstructorEntity, DestructorEntity, IndexerEntity, MethodEntity, MethodTypeEntity, NamedPackageMemberEntity, OperatorEntity, PackageMethodEntity, PackageMethodTypeEntity, PackageTypeEntity, StructuredTypeEntity, TypeMethodEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
5
+ import { PackageVariableEntity, ParameterVariableEntity, FieldEntity } from '../entities/VariableEntity.js';
6
+ import { AliasTypeEntity, ConstructorEntity, DestructorEntity, IndexerEntity, FunctionEntity, FunctionTypeEntity, NamedPackageMemberEntity, OperatorEntity, PackageFunctionEntity, PackageFunctionTypeEntity, PackageTypeEntity, StructuredTypeEntity, MethodEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
7
7
  import { PackageName, TranslationPackage } from '../project/index.js';
8
8
  import * as tree from '../tree/index.js';
9
9
  import { Analyzer } from './Analyzer.js';
@@ -15,9 +15,9 @@ export declare class AnalyzedTranslationPackage {
15
15
  private readonly _translatedPackage;
16
16
  private readonly _members;
17
17
  private readonly _translatedTypeEntityMembers;
18
- private readonly _methodSignatureTranslations;
18
+ private readonly _functionSignatureTranslations;
19
19
  private readonly _operatorSignatureTranslations;
20
- private readonly _methodTypeSignatureTranslations;
20
+ private readonly _functionTypeSignatureTranslations;
21
21
  private readonly _constructorSignatureTranslations;
22
22
  private readonly _indexerSignatureTranslations;
23
23
  private readonly _translatedTypeHeaders;
@@ -29,21 +29,21 @@ export declare class AnalyzedTranslationPackage {
29
29
  getMembers(): TranslatedPackageMembers;
30
30
  getTypeEntityMembers(typeEntity: PackageTypeEntity): TranslatedTypeEntityMembers | undefined;
31
31
  getPackageVariableTranslationTarget(node: tree.PackageVariableTranslation): GetSingleTranslationTargetResult<PackageVariableEntity>;
32
- getPackageMethodTranslationTargets(node: tree.PackageMethodTranslation): GetMultipleTranslationTargetsResult<PackageMethodEntity>;
33
- getMethodTypeTranslationTarget(node: tree.MethodTypeTranslation): GetSingleTranslationTargetResult<PackageMethodTypeEntity>;
32
+ getPackageFunctionTranslationTargets(node: tree.PackageFunctionTranslation): GetMultipleTranslationTargetsResult<PackageFunctionEntity>;
33
+ getFunctionTypeTranslationTarget(node: tree.FunctionTypeTranslation): GetSingleTranslationTargetResult<PackageFunctionTypeEntity>;
34
34
  getTypeTranslationTarget(node: tree.TypeTranslation): GetSingleTranslationTargetResult<PackageTypeEntity>;
35
35
  /**
36
36
  * В случае, когда имя переменной экземпляра совпадает с именем статической переменной, перевод будет иметь две цели.
37
37
  */
38
- getTypeVariableOrVariantTranslationTargets(node: tree.TypeVariableOrVariantTranslation): GetMultipleTranslationTargetsResult<TypeVariableEntity>;
39
- getTypeMethodTranslationTargets(node: tree.TypeMethodTranslation): GetMultipleTranslationTargetsResult<TypeMethodEntity>;
38
+ getFieldOrVariantTranslationTargets(node: tree.FieldOrVariantTranslation): GetMultipleTranslationTargetsResult<FieldEntity>;
39
+ getMethodTranslationTargets(node: tree.MethodTranslation): GetMultipleTranslationTargetsResult<MethodEntity>;
40
40
  getConstructorTranslationTargets(node: tree.ConstructorTranslation): GetMultipleTranslationTargetsResult<ConstructorEntity>;
41
41
  getIndexerTranslationTargets(node: tree.IndexerTranslation): GetMultipleTranslationTargetsResult<IndexerEntity>;
42
- getMethodSignature(entity: MethodEntity): LocalizedSubprogramSignature.Translated | undefined;
42
+ getFunctionSignature(entity: FunctionEntity): LocalizedSubprogramSignature.Translated | undefined;
43
43
  getOperatorSignature(entity: OperatorEntity): LocalizedSubprogramSignature.Translated | undefined;
44
- getPackageMethodSignature(entity: PackageMethodEntity): LocalizedSubprogramSignature.Translated | undefined;
45
- getTypeMethodSignature(entity: TypeMethodEntity): LocalizedSubprogramSignature.Translated | undefined;
46
- getMethodTypeSignature(entity: MethodTypeEntity): LocalizedSubprogramSignature.Translated | undefined;
44
+ getPackageFunctionSignature(entity: PackageFunctionEntity): LocalizedSubprogramSignature.Translated | undefined;
45
+ getMethodSignature(entity: MethodEntity): LocalizedSubprogramSignature.Translated | undefined;
46
+ getFunctionTypeSignature(entity: FunctionTypeEntity): LocalizedSubprogramSignature.Translated | undefined;
47
47
  getConstructorSignature(entity: ConstructorEntity): LocalizedSubprogramSignature.Translated | undefined;
48
48
  getDestructorSignature(entity: DestructorEntity): LocalizedSubprogramSignature.Translated | undefined;
49
49
  getIndexerSignature(entity: IndexerEntity): LocalizedSubprogramSignature.Translated | undefined;
@@ -51,15 +51,16 @@ export declare class AnalyzedTranslationPackage {
51
51
  getEntityName(entity: NamedEntity): Name | undefined;
52
52
  private createPackageMembers;
53
53
  private createTypeEntityMembers;
54
- private createTranslatedSubprogramSignatureFromPackageMethodTranslation;
55
- private createTranslatedSubprogramSignatureFromTypeMethodTranslation;
56
- private createTranslatedSubprogramSignatureFromMethodTypeTranslation;
54
+ private createTranslatedSubprogramSignatureFromPackageFunctionTranslation;
55
+ private createTranslatedSubprogramSignatureFromMethodTranslation;
56
+ private createTranslatedSubprogramSignatureFromFunctionTypeTranslation;
57
57
  private createTranslatedSubprogramSignatureFromConstructorTranslation;
58
58
  private createTranslatedSubprogramSignatureFromIndexerTranslation;
59
59
  private createTranslatedSubprogramSignatureForDefaultConstructor;
60
60
  private createTranslatedTypeSignature;
61
61
  private enumerateTranslationsDeclarations;
62
62
  private findTypeTranslation;
63
+ private createAmbiguousAccessDiagnostic;
63
64
  }
64
65
  export declare class TranslatedPackageMembers {
65
66
  private readonly _namedMembers;