@artel/artc 0.6.25207 → 0.6.25209

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 (101) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +36 -20
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +9923 -9250
  5. package/build/{chunk-FYWHIGGV.js → chunk-4EDLYSNW.js} +11 -8
  6. package/build/{chunk-F6DF37J3.js → chunk-5SWGY25I.js} +39172 -46399
  7. package/build/{chunk-OORYH37I.js → chunk-GKEW2LBL.js} +27 -14
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +14 -10
  9. package/build/types/analysis/Analyzer.d.ts +27 -11
  10. package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +17 -1
  11. package/build/types/analysis/BaseExpressionMeaning.d.ts +17 -1
  12. package/build/types/analysis/CallExpressionMeaning.d.ts +17 -1
  13. package/build/types/analysis/DereferenceExpressionMeaning.d.ts +6 -1
  14. package/build/types/analysis/DereferencedVariableAccess.d.ts +14 -0
  15. package/build/types/analysis/DiagnosticCollector.d.ts +3 -0
  16. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +2 -5
  17. package/build/types/analysis/IndexedAccess.d.ts +14 -0
  18. package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +6 -3
  19. package/build/types/analysis/ObjectExpressionMeaning.d.ts +19 -3
  20. package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +2 -4
  21. package/build/types/analysis/SemanticContext.d.ts +4 -4
  22. package/build/types/analysis/VariableAccess.d.ts +6 -2
  23. package/build/types/analysis/WellKnownDeclarations.d.ts +1 -0
  24. package/build/types/analysis/index.d.ts +4 -2
  25. package/build/types/api/Api.d.ts +2 -2
  26. package/build/types/common/AccessKind.d.ts +2 -1
  27. package/build/types/common/Constants.d.ts +1 -1
  28. package/build/types/common/JavaScriptIdentifier.d.ts +6 -0
  29. package/build/types/common/Logger.d.ts +1 -0
  30. package/build/types/common/Name.d.ts +18 -21
  31. package/build/types/common/Query.d.ts +6 -1
  32. package/build/types/common/TreeQuery.d.ts +0 -2
  33. package/build/types/common/index.d.ts +2 -1
  34. package/build/types/emitter/Emitter.d.ts +50 -16
  35. package/build/types/emitter/EmitterContext.d.ts +42 -337
  36. package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +55 -17
  37. package/build/types/emitter/Entities.d.ts +144 -0
  38. package/build/types/emitter/EntityMap.d.ts +45 -0
  39. package/build/types/emitter/ExpressionTransformationResult.d.ts +1 -1
  40. package/build/types/emitter/GeneralLowering.d.ts +4 -68
  41. package/build/types/emitter/Internal.d.ts +0 -1
  42. package/build/types/emitter/IrBuilder.d.ts +27 -17
  43. package/build/types/emitter/IrToJs.d.ts +17 -11
  44. package/build/types/emitter/StatementTransformationResult.d.ts +5 -2
  45. package/build/types/emitter/Transformer.d.ts +21 -93
  46. package/build/types/emitter/ir/AccessedEntities.d.ts +5 -11
  47. package/build/types/emitter/ir/ComputedAccess.d.ts +19 -0
  48. package/build/types/emitter/ir/LoweringState.d.ts +25 -0
  49. package/build/types/emitter/ir/Nodes.d.ts +531 -1109
  50. package/build/types/emitter/ir/index.d.ts +3 -1
  51. package/build/types/emitter/ir/types.d.ts +6 -7
  52. package/build/types/entities/BinaryOperatorEntity.d.ts +3 -0
  53. package/build/types/entities/ConstructorEntity.d.ts +17 -21
  54. package/build/types/entities/PackageMembers.d.ts +2 -2
  55. package/build/types/entities/TypeEntityMembers.d.ts +2 -2
  56. package/build/types/entities/UnaryOperatorEntity.d.ts +3 -0
  57. package/build/types/entities/Variants.d.ts +2 -2
  58. package/build/types/entities/index.d.ts +4 -2
  59. package/build/types/executor/Compiler.d.ts +6 -1
  60. package/build/types/executor/NodeCompiler.d.ts +7 -3
  61. package/build/types/parser/Scanner.d.ts +1 -0
  62. package/build/types/project/CompilationLoader.d.ts +17 -22
  63. package/build/types/project/PackageContent.d.ts +16 -0
  64. package/build/types/project/PackageContentCreator.d.ts +3 -0
  65. package/build/types/project/SourceFile.d.ts +1 -1
  66. package/build/types/project/SourcePackage.d.ts +3 -3
  67. package/build/types/project/configuration/ConfigurationConverter.d.ts +2 -3
  68. package/build/types/project/configuration/ConfigurationTranslator.d.ts +23 -0
  69. package/build/types/project/configuration/PackageConfigurationInterpreter.d.ts +1 -27
  70. package/build/types/project/index.d.ts +3 -1
  71. package/build/types/services/AddPropertyAssignmentService.d.ts +2 -2
  72. package/build/types/services/CodeActionsService.d.ts +22 -0
  73. package/build/types/services/DefinitionService.d.ts +2 -2
  74. package/build/types/services/LanguageServer.d.ts +11 -2
  75. package/build/types/services/NodeSemanticInfo.d.ts +13 -7
  76. package/build/types/services/ReferencesService.d.ts +1 -3
  77. package/build/types/services/TranslationsGenerationService.d.ts +7 -0
  78. package/build/types/services/Types.d.ts +10 -0
  79. package/build/types/services/source-generation/SourceGenerationService.d.ts +6 -4
  80. package/build/types/services/workspace/CompilationController.d.ts +4 -3
  81. package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +5 -2
  82. package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +1 -1
  83. package/build/types/services/workspace/Workspace.d.ts +6 -2
  84. package/build/types/services/workspace/WorkspaceFiles.d.ts +2 -2
  85. package/build/types/tree/KeywordKind.d.ts +47 -46
  86. package/build/types/tree/green/SyntaxToCode.d.ts +4 -3
  87. package/build/types/ts-interop/TsInteropContext.d.ts +2 -2
  88. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +3 -3
  89. package/build/types/ts-interop/Utils.d.ts +39 -33
  90. package/package.json +6 -6
  91. package/build/types/analysis/IndexerAccess.d.ts +0 -10
  92. package/build/types/emitter/EmitterPackage.d.ts +0 -60
  93. package/build/types/emitter/EntityNameProviders.d.ts +0 -33
  94. package/build/types/generated/BuiltInSystemPackages.d.ts +0 -3
  95. package/build/types/old/Executor.d.ts +0 -14
  96. package/build/types/old/JavaScriptEmittingVisitor.d.ts +0 -1
  97. package/build/types/old/NzonParser.d.ts +0 -1
  98. package/build/types/old/NzonScanner.d.ts +0 -1
  99. package/build/types/old/NzonSyntax.d.ts +0 -1
  100. package/build/types/old/RemoteWorkspaceFileSystem.d.ts +0 -1
  101. /package/build/types/{old/JavaScriptEmitter.d.ts → emitter/EmitterContextOld.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-FYWHIGGV.js";
3
+ } from "./chunk-4EDLYSNW.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-F6DF37J3.js";
17
+ } from "./chunk-5SWGY25I.js";
18
18
 
19
19
  // source/executor/FileSystemUri.ts
20
20
  import { platform } from "os";
@@ -224,18 +224,20 @@ var NodeCompiler = class {
224
224
  return new PhysicalTypeScriptLibrariesProvider(standardLibraryUri);
225
225
  });
226
226
  }
227
- static loadCompilation(projectPath, tsLibrariesProvider, diagnostics, workspacePath, standardPackagesPath, cancellationToken) {
227
+ static loadCompilation(projectPath, tsLibrariesProvider, diagnostics, options, cancellationToken) {
228
228
  return __async(this, null, function* () {
229
229
  const projectUri = FileSystemUri.pathToUri(projectPath);
230
- const workspaceUri = workspacePath !== void 0 ? FileSystemUri.pathToUri(workspacePath) : void 0;
231
- const standardPackagesUri = standardPackagesPath !== void 0 ? FileSystemUri.pathToUri(standardPackagesPath) : void 0;
230
+ const loadCompilationOptions = {
231
+ workspaceUri: options?.workspacePath !== void 0 ? FileSystemUri.pathToUri(options.workspacePath) : void 0,
232
+ builtInsStandardPackagesUri: options?.builtInsStandardPackagesPath !== void 0 ? FileSystemUri.pathToUri(options.builtInsStandardPackagesPath) : void 0,
233
+ userStandardPackagesUri: options?.userStandardPackagesPath !== void 0 ? FileSystemUri.pathToUri(options.userStandardPackagesPath) : void 0
234
+ };
232
235
  return yield Compiler.loadCompilation(
233
236
  projectUri,
234
237
  this.fileSystem,
235
238
  tsLibrariesProvider,
236
239
  diagnostics,
237
- workspaceUri,
238
- standardPackagesUri,
240
+ loadCompilationOptions,
239
241
  cancellationToken
240
242
  );
241
243
  });
@@ -282,8 +284,7 @@ var NodeCompiler = class {
282
284
  task.projectPath,
283
285
  typeScriptLibrariesProvider,
284
286
  task.diagnostics,
285
- task.workspacePath,
286
- task.standardPackagesPath,
287
+ task.loadCompilationOptions,
287
288
  task.cancellationToken
288
289
  );
289
290
  if (compilation === void 0) {
@@ -386,16 +387,18 @@ var CommandLineCompiler = class {
386
387
  fileURLToPath(new URL("..", import.meta.url))
387
388
  ],
388
389
  projectPath: parsedArguments.projectPath,
390
+ loadCompilationOptions: {
391
+ workspacePath: parsedArguments.workspacePath,
392
+ userStandardPackagesPath: parsedArguments.standardPackagesPath,
393
+ builtInsStandardPackagesPath: parsedArguments.builtInStandardPackagesPath
394
+ },
389
395
  outputPath: parsedArguments.outputPath,
390
- workspacePath: parsedArguments.workspacePath,
391
- standardPackagesPath: parsedArguments.standardPackagesPath,
392
396
  diagnostics,
393
397
  defaultTsLibraryPath: parsedArguments.defaultTsLibraryPath,
394
398
  emitOptions: {
395
399
  sourceMap: {
396
400
  mode: "linked" /* Linked */,
397
- includeSourcesContent: true,
398
- justApplicationCode: false
401
+ includeSourcesContent: false
399
402
  }
400
403
  }
401
404
  };
@@ -465,7 +468,8 @@ var ArgumentsParser = class {
465
468
  measurePerformance: false,
466
469
  defaultTsLibraryPath: void 0,
467
470
  workspacePath: void 0,
468
- standardPackagesPath: void 0
471
+ standardPackagesPath: void 0,
472
+ builtInStandardPackagesPath: void 0
469
473
  };
470
474
  const index = this.parseMainCommand(0, args, result);
471
475
  this.parseNamedArguments(index, args, result);
@@ -563,6 +567,15 @@ var ArgumentsParser = class {
563
567
  }
564
568
  break;
565
569
  }
570
+ case "--built-in-standard-packages":
571
+ case "--\u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0435-\u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u044B\u0435-\u043F\u0430\u043A\u0435\u0442\u044B": {
572
+ const path = this.tryParseStringArgument(index + 1, args);
573
+ if (path !== void 0) {
574
+ result.builtInStandardPackagesPath = resolve(cwd, path);
575
+ index++;
576
+ }
577
+ break;
578
+ }
566
579
  case "--\u0431\u0435\u0437-\u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439":
567
580
  case "--no-warnings": {
568
581
  result.noWarnings = true;
@@ -35,7 +35,10 @@ export declare class AnalyzedTranslationPackage {
35
35
  getPackageMethodTranslationTargets(node: tree.PackageMethodTranslation): GetMultipleTranslationTargetsResult<PackageMethodEntity>;
36
36
  getMethodTypeTranslationTarget(node: tree.MethodTypeTranslation): GetSingleTranslationTargetResult<PackageMethodTypeEntity>;
37
37
  getTypeTranslationTarget(node: tree.TypeTranslation): GetSingleTranslationTargetResult<PackageTypeEntity>;
38
- getTypeVariableOrVariantTranslationTarget(node: tree.TypeVariableOrVariantTranslation): GetSingleTranslationTargetResult<TypeVariableEntity | VariantEntity>;
38
+ /**
39
+ * В случае, когда имя переменной экземпляра совпадает с именем статической переменной, перевод будет иметь две цели.
40
+ */
41
+ getTypeVariableOrVariantTranslationTargets(node: tree.TypeVariableOrVariantTranslation): GetMultipleTranslationTargetsResult<TypeVariableEntity | VariantEntity>;
39
42
  getTypeMethodTranslationTargets(node: tree.TypeMethodTranslation): GetMultipleTranslationTargetsResult<TypeMethodEntity>;
40
43
  getConstructorTranslationTargets(node: tree.ConstructorTranslation): GetMultipleTranslationTargetsResult<ConstructorEntity>;
41
44
  getIndexerTranslationTargets(node: tree.IndexerTranslation): GetMultipleTranslationTargetsResult<IndexerEntity>;
@@ -53,18 +56,19 @@ export declare class AnalyzedTranslationPackage {
53
56
  private createVariants;
54
57
  private createTranslatedSubprogramSignatureFromPackageMethodTranslation;
55
58
  private createTranslatedSubprogramSignatureFromTypeMethodTranslation;
56
- private createTranslatedSubprogramSignatureFromMethodTypeAlias;
57
- private createTranslatedSubprogramSignatureFromConstructorAlias;
58
- private createTranslatedSubprogramSignatureFromIndexerAlias;
59
+ private createTranslatedSubprogramSignatureFromMethodTypeTranslation;
60
+ private createTranslatedSubprogramSignatureFromConstructorTranslation;
61
+ private createTranslatedSubprogramSignatureFromIndexerTranslation;
62
+ private createTranslatedSubprogramSignatureForDefaultConstructor;
59
63
  private createTranslatedTypeSignature;
60
64
  private enumerateTranslationsDeclarations;
61
65
  private findTypeTranslation;
62
66
  }
63
67
  export declare class TranslatedPackageMembers {
64
68
  private readonly _namedMembers;
65
- private readonly _membersByUniversalName;
69
+ private readonly _membersByNameKey;
66
70
  private readonly _nameByEntity;
67
- private get membersByUniversalName();
71
+ private get membersByNameKey();
68
72
  private get nameByEntity();
69
73
  constructor(_namedMembers: readonly TranslatedNamedPackageMember[]);
70
74
  getNamedMembers(): readonly TranslatedNamedPackageMember[];
@@ -79,9 +83,9 @@ export declare class TranslatedNamedPackageMember {
79
83
  export declare class TranslatedTypeEntityMembers {
80
84
  private readonly _namedMembers;
81
85
  readonly translationPackage: AnalyzedTranslationPackage;
82
- private readonly _membersByUniversalName;
86
+ private readonly _membersByNameKey;
83
87
  private readonly _nameByEntity;
84
- private get membersByUniversalName();
88
+ private get membersByNameKey();
85
89
  private get nameByEntity();
86
90
  constructor(_namedMembers: readonly TranslatedNamedTypeEntityMember[], translationPackage: AnalyzedTranslationPackage);
87
91
  getNamedMembers(): readonly TranslatedNamedTypeEntityMember[];
@@ -96,9 +100,9 @@ export declare class TranslatedNamedTypeEntityMember {
96
100
  export declare class TranslatedVariants {
97
101
  private readonly _variants;
98
102
  readonly translationPackage: AnalyzedTranslationPackage;
99
- private readonly _variantsByUniversalName;
103
+ private readonly _variantsByNameKey;
100
104
  private readonly _nameByEntity;
101
- private get variantsByUniversalName();
105
+ private get variantsByNameKey();
102
106
  private get nameByEntity();
103
107
  constructor(_variants: readonly TranslatedVariant[], translationPackage: AnalyzedTranslationPackage);
104
108
  get(): readonly TranslatedVariant[];
@@ -1,9 +1,10 @@
1
1
  import ts from 'typescript';
2
- import { AccessKind, CancellationToken, Name, PackageLocale, Range, SearchName, WithDiagnostics } from '../common/index.js';
2
+ import { CancellationToken, Name, PackageLocale, Range, SearchName, WithDiagnostics } from '../common/index.js';
3
3
  import { Diagnostic, DiagnosticAcceptor, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
4
4
  import { DiagnosticCode } from '../diagnostic/DiagnosticCode.js';
5
5
  import { DiagnosticFlags, DiagnosticKind } from '../diagnostic/DiagnosticData.js';
6
6
  import * as packageMembers from '../entities/PackageMembers.js';
7
+ import { NamedTypeMemberEntity } from '../entities/TypeEntityMembers.js';
7
8
  import * as entities from '../entities/index.js';
8
9
  import { AliasTypeEntity, AnonymousMethodTypeEntity, AnonymousStructuredTypeEntity, AnonymousVariantTypeEntity, BinaryOperatorEntity, BinaryOperatorKind, ConstructorEntity, DereferenceOperatorEntity, DestructorEntity, GetterEntity, IEntityHidingMatcher, LocalVariableEntity, MethodEntity, MethodTypeEntity, NamedTypeEntity, NestedMethodEntity, PackageAliasEntity, PackageEntity, PackageMethodEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariableEntity, PackageVariantTypeEntity, SetterEntity, SourceIndexerEntity, StructuredTypeEntity, TypeEntity, TypeExtensionEntity, TypeMemberEntityContainer, TypeMethodEntity, TypeParameterEntity, TypeVariableEntity, UnaryOperatorEntity, VariableEntity, VariantEntity, VariantTypeEntity } from '../entities/index.js';
9
10
  import { ReservedIdentifierKind } from '../parser/ReservedIdentifierDictionary.js';
@@ -42,7 +43,6 @@ import * as tags from './Tags.js';
42
43
  import { TargetTypeHint } from './TargetTypeHint.js';
43
44
  import * as typeOverloadResolver from './TypeOverloadResolver.js';
44
45
  import { WellKnownDeclarations } from './index.js';
45
- import { NamedTypeMemberEntity } from '../entities/TypeEntityMembers.js';
46
46
  export declare class Analyzer {
47
47
  static readonly enumeratorMethodName = "\u043F\u0435\u0440\u0435\u0431\u043E\u0440";
48
48
  static readonly methodTypeInvokeMethodName = "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C";
@@ -110,7 +110,7 @@ export declare class Analyzer {
110
110
  } | undefined;
111
111
  isTypeAssignableTo(source: types.Type, target: types.Type): boolean;
112
112
  checkStatementBlockInvokesAsyncMethods(node: tree.StatementBlock): boolean;
113
- getExpressionAccessKind(node: tree.Expression): AccessKind;
113
+ getSyntacticAccessKind(node: tree.Expression): SyntacticAccessKind;
114
114
  getTypeMemberEntityContainer(node: tree.TypeMemberDeclaration): TypeMemberEntityContainer;
115
115
  getTargetTypeOfExpression(node: tree.Expression, hint?: TargetTypeHint): types.Type | undefined;
116
116
  getUnambiguousTargetMethodType(targetType: types.Type | undefined): types.MethodType | undefined;
@@ -249,6 +249,12 @@ export type BinaryExpressionOperatorClassificationResult = {
249
249
  } | {
250
250
  kind: 'question-question';
251
251
  };
252
+ export declare const enum SyntacticAccessKind {
253
+ Get = 0,
254
+ Set = 1,
255
+ GetSet = 2,
256
+ ReferencedValue = 3
257
+ }
252
258
  declare class Type {
253
259
  private readonly _analyzer;
254
260
  private readonly _unionTypeSpecifierTypes;
@@ -387,11 +393,11 @@ declare class ResultLocalVariableEntity {
387
393
  private readonly _analyzer;
388
394
  private readonly _entities;
389
395
  constructor(_analyzer: Analyzer);
390
- ofPackageMethodDeclaration(node: tree.PackageMethodDeclaration): LocalVariableEntity | undefined;
391
- ofTypeMethodDeclaration(node: tree.TypeMethodDeclaration): LocalVariableEntity | undefined;
392
- ofNestedMethodDeclaration(node: tree.NestedMethodDeclaration): LocalVariableEntity | undefined;
393
- ofMethodLiteral(node: tree.MethodLiteral): LocalVariableEntity | undefined;
394
- ofMethodBlockLiteral(node: tree.MethodBlockLiteral): LocalVariableEntity | undefined;
396
+ ofPackageMethodDeclaration(node: tree.PackageMethodDeclaration): LocalVariableEntity;
397
+ ofTypeMethodDeclaration(node: tree.TypeMethodDeclaration): LocalVariableEntity;
398
+ ofNestedMethodDeclaration(node: tree.NestedMethodDeclaration): LocalVariableEntity;
399
+ ofMethodLiteral(node: tree.MethodLiteral): LocalVariableEntity;
400
+ ofMethodBlockLiteral(node: tree.MethodBlockLiteral): LocalVariableEntity;
395
401
  ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): LocalVariableEntity;
396
402
  ofTypeVariableGetterDeclaration(node: tree.TypeVariableGetterDeclaration): LocalVariableEntity;
397
403
  ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration): LocalVariableEntity;
@@ -497,7 +503,6 @@ declare class DefaultConstructors {
497
503
  private readonly _defaultConstructorEntities;
498
504
  constructor(_analyzer: Analyzer);
499
505
  ofStructuredType(type: StructuredTypeDeclaration): readonly ConstructorEntity[];
500
- createAliasTypeDefaultConstructors(aliasTypeEntity: AliasTypeEntity, hasDeclaredConstructors: boolean): readonly ConstructorEntity[];
501
506
  private createDefaultConstructors;
502
507
  private getPublicInstanceStoredVariables;
503
508
  }
@@ -525,6 +530,7 @@ declare class Tags {
525
530
  declare class LinkedEntity {
526
531
  private readonly _analyzer;
527
532
  constructor(_analyzer: Analyzer);
533
+ entityCanBeLinked(entity: entities.Entity): boolean;
528
534
  ofType(entity: TypeEntity, platform: PlatformKind): TypeEntity | undefined;
529
535
  ofTypeWithMembers(entity: entities.TypeEntityWithMembers, platform: PlatformKind): entities.TypeEntityWithMembers | undefined;
530
536
  ofParameterType(entity: TypeParameterEntity, platform: PlatformKind): TypeParameterEntity | undefined;
@@ -535,6 +541,11 @@ declare class LinkedEntity {
535
541
  ofConstructor(entity: entities.ConstructorEntity, platform: PlatformKind): entities.ConstructorEntity | undefined;
536
542
  ofIndexer(entity: entities.IndexerEntity, platform: PlatformKind): entities.IndexerEntity | undefined;
537
543
  ofDereferenceOperator(entity: entities.DereferenceOperatorEntity, platform: PlatformKind): entities.DereferenceOperatorEntity | undefined;
544
+ ofUnaryOperator(entity: entities.UnaryOperatorEntity, platform: PlatformKind): entities.UnaryOperatorEntity | undefined;
545
+ ofBinaryOperator(entity: entities.BinaryOperatorEntity, platform: PlatformKind): entities.BinaryOperatorEntity | undefined;
546
+ ofVariant(entity: VariantEntity, platform: PlatformKind): VariantEntity | undefined;
547
+ ofGetter(entity: entities.GetterEntity, platform: PlatformKind): entities.GetterEntity | undefined;
548
+ ofSetter(entity: entities.SetterEntity, platform: PlatformKind): entities.SetterEntity | undefined;
538
549
  }
539
550
  export declare class LinkedMultiPlatformPackage {
540
551
  readonly analyzer: Analyzer;
@@ -565,13 +576,18 @@ export declare class LinkedTypeWithMembers {
565
576
  readonly targetType: entities.TypeEntityWithMembers;
566
577
  readonly linkedPackage: LinkedMultiPlatformPackage;
567
578
  private readonly _memberLookup;
579
+ private readonly _variantLookup;
568
580
  private get memberLookup();
581
+ private get variantLookup();
569
582
  constructor(analyzer: Analyzer, externalType: entities.TypeEntityWithMembers, targetType: entities.TypeEntityWithMembers, linkedPackage: LinkedMultiPlatformPackage);
570
583
  getLinkedVariable(entity: entities.TypeVariableEntity): entities.TypeVariableEntity | undefined;
571
584
  getLinkedMethod(entity: entities.TypeMethodEntity): entities.TypeMethodEntity | undefined;
572
585
  getLinkedConstructor(entity: entities.ConstructorEntity): entities.ConstructorEntity | undefined;
573
- getLinkedIndexerEntity(entity: entities.IndexerEntity): entities.IndexerEntity | undefined;
574
- getLinkedDereferenceOperatorEntity(entity: entities.DereferenceOperatorEntity): entities.DereferenceOperatorEntity | undefined;
586
+ getLinkedIndexer(entity: entities.IndexerEntity): entities.IndexerEntity | undefined;
587
+ getLinkedDereferenceOperator(entity: entities.DereferenceOperatorEntity): entities.DereferenceOperatorEntity | undefined;
588
+ getLinkedUnaryOperator(entity: UnaryOperatorEntity): UnaryOperatorEntity | undefined;
589
+ getLinkedBinaryOperator(entity: BinaryOperatorEntity): BinaryOperatorEntity | undefined;
590
+ getLinkedVariant(entity: VariantEntity): VariantEntity | undefined;
575
591
  }
576
592
  declare class OwningPlainObjectModificationCheck {
577
593
  private _analyzer;
@@ -12,10 +12,26 @@ export declare class Resolver {
12
12
  }
13
13
  export type Meaning = Meaning_constructorCall | Meaning_unresolved;
14
14
  declare class Meaning_constructorCall {
15
+ /**
16
+ * Тип объекта, получаемого в результате вызова конструктора.
17
+ *
18
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
19
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
20
+ * с ним совместим.
21
+ */
22
+ readonly type: types.Type;
15
23
  readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
16
24
  readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
17
25
  readonly kind = "constructor-call";
18
- constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
26
+ constructor(
27
+ /**
28
+ * Тип объекта, получаемого в результате вызова конструктора.
29
+ *
30
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
31
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
32
+ * с ним совместим.
33
+ */
34
+ type: types.Type, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
19
35
  }
20
36
  declare class Meaning_unresolved {
21
37
  readonly diagnostics: readonly Diagnostic[];
@@ -29,10 +29,26 @@ declare class Meaning_baseObjectAccess {
29
29
  constructor(type: types.Type);
30
30
  }
31
31
  declare class Meaning_baseConstructorAccess {
32
+ /**
33
+ * Тип объекта, получаемого в результате вызова конструктора.
34
+ *
35
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
36
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
37
+ * с ним совместим.
38
+ */
39
+ readonly type: types.Type;
32
40
  readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
33
41
  readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
34
42
  readonly kind = "base-constructor-access";
35
- constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
43
+ constructor(
44
+ /**
45
+ * Тип объекта, получаемого в результате вызова конструктора.
46
+ *
47
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
48
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
49
+ * с ним совместим.
50
+ */
51
+ type: types.Type, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
36
52
  }
37
53
  declare class Meaning_overriddenMethodAccess {
38
54
  readonly method: types.Method;
@@ -26,10 +26,26 @@ declare class Meaning_objectMethodCall {
26
26
  constructor(type: types.MethodType);
27
27
  }
28
28
  declare class Meaning_constructorCall {
29
+ /**
30
+ * Тип объекта, получаемого в результате вызова конструктора.
31
+ *
32
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
33
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
34
+ * с ним совместим.
35
+ */
36
+ readonly type: types.Type;
29
37
  readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
30
38
  readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
31
39
  readonly kind = "constructor-call";
32
- constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
40
+ constructor(
41
+ /**
42
+ * Тип объекта, получаемого в результате вызова конструктора.
43
+ *
44
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
45
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
46
+ * с ним совместим.
47
+ */
48
+ type: types.Type, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
33
49
  }
34
50
  declare class Meaning_unresolved {
35
51
  readonly diagnostics: readonly Diagnostic[];
@@ -1,19 +1,24 @@
1
1
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
2
  import { DereferenceExpression } from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
+ import * as dereferencedVariableAccess from './DereferencedVariableAccess.js';
4
5
  import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
5
6
  import { Analyzer } from './index.js';
6
7
  export declare class Resolver {
7
8
  private readonly _analyzer;
8
9
  private readonly _node;
10
+ private readonly _semanticContext;
11
+ private get semanticContext();
9
12
  constructor(_analyzer: Analyzer, _node: DereferenceExpression);
10
13
  resolve(): Meaning;
14
+ private convertSyntacticAccessKind;
11
15
  }
12
16
  export type Meaning = Meaning_resolved | Meaning_unresolved;
13
17
  declare class Meaning_resolved {
14
18
  readonly operator: FoundAnonymousDeclaration<types.DereferenceOperator>;
19
+ readonly access: dereferencedVariableAccess.DereferencedVariableAccess;
15
20
  readonly kind = "resolved";
16
- constructor(operator: FoundAnonymousDeclaration<types.DereferenceOperator>);
21
+ constructor(operator: FoundAnonymousDeclaration<types.DereferenceOperator>, access: dereferencedVariableAccess.DereferencedVariableAccess);
17
22
  }
18
23
  declare class Meaning_unresolved {
19
24
  readonly diagnostic: Diagnostic | undefined;
@@ -0,0 +1,14 @@
1
+ import { AccessKind } from '../common/index.js';
2
+ import { DereferenceOperatorEntity, GetterEntity, SetterEntity } from '../entities/index.js';
3
+ export type DereferencedVariableAccess = {
4
+ kind: AccessKind.Get;
5
+ getAccessor: GetterEntity | undefined;
6
+ } | {
7
+ kind: AccessKind.Set;
8
+ setAccessor: SetterEntity | undefined;
9
+ } | {
10
+ kind: AccessKind.GetSet;
11
+ getAccessor: GetterEntity | undefined;
12
+ setAccessor: SetterEntity | undefined;
13
+ };
14
+ export declare function create(indexerEntity: DereferenceOperatorEntity, accessKind: AccessKind): DereferencedVariableAccess;
@@ -32,11 +32,14 @@ export declare class DiagnosticCollector {
32
32
  private checkTypeVariableSetterDeclaration;
33
33
  private checkTypeIndexedGetterDeclaration;
34
34
  private checkTypeIndexedSetterDeclaration;
35
+ private checkTypeDereferencedVariableGetterDeclaration;
36
+ private checkTypeDereferencedVariableSetterDeclaration;
35
37
  private checkNestedMethodDeclaration;
36
38
  private checkPossibleGeneratorMethodReturnType;
37
39
  private checkReturnStatement;
38
40
  private checkYieldStatement;
39
41
  private checkTypeMemberBodyPresence;
42
+ private tryGetTypeMemberDeclarationEntity;
40
43
  private isAspectTypeMemberDeclaration;
41
44
  private collectIdentifierExpressionDiagnostics;
42
45
  private collectPropertyAccessExpressionDiagnostics;
@@ -10,19 +10,16 @@ import * as scope from './Scope.js';
10
10
  import * as variableAccess from './VariableAccess.js';
11
11
  import { Analyzer, TargetTypeHint } from './index.js';
12
12
  export declare class Resolver {
13
- private readonly _identifierValue;
14
- private readonly _accessKind;
15
13
  private readonly _semanticContext;
16
14
  private readonly _analyzer;
17
15
  private readonly _node;
18
16
  private readonly _targetTypeHint;
19
- constructor(analyzer: Analyzer, node: IdentifierExpression, targetTypeHint: TargetTypeHint | undefined);
20
- private get identifierSearchName();
21
- private get accessKind();
22
17
  private get semanticContext();
18
+ constructor(analyzer: Analyzer, node: IdentifierExpression, targetTypeHint: TargetTypeHint | undefined);
23
19
  resolve(): ResolutionResult;
24
20
  private resolveMethodOverload;
25
21
  private createAccessedMethod;
22
+ private convertSyntacticAccessKind;
26
23
  }
27
24
  export declare class ResolutionResult {
28
25
  readonly meaning: Meaning;
@@ -0,0 +1,14 @@
1
+ import { AccessKind } from '../common/index.js';
2
+ import { GetterEntity, IndexerEntity, SetterEntity } from '../entities/index.js';
3
+ export type IndexedAccess = {
4
+ kind: AccessKind.Get;
5
+ getAccessor: GetterEntity | undefined;
6
+ } | {
7
+ kind: AccessKind.Set;
8
+ setAccessor: SetterEntity | undefined;
9
+ } | {
10
+ kind: AccessKind.GetSet;
11
+ getAccessor: GetterEntity | undefined;
12
+ setAccessor: SetterEntity | undefined;
13
+ };
14
+ export declare function create(indexerEntity: IndexerEntity, accessKind: AccessKind): IndexedAccess;
@@ -2,21 +2,24 @@ import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
2
  import { IndexedAccessExpression } from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
4
  import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
5
- import * as indexerAccess from './IndexerAccess.js';
5
+ import * as indexedAccess from './IndexedAccess.js';
6
6
  import { Analyzer } from './index.js';
7
7
  export declare class Resolver {
8
8
  private readonly _analyzer;
9
9
  private readonly _node;
10
+ private readonly _semanticContext;
11
+ private get semanticContext();
10
12
  constructor(_analyzer: Analyzer, _node: IndexedAccessExpression);
11
13
  resolve(): Meaning;
12
14
  private getArgumentsRangeWithBrackets;
15
+ private convertSyntacticAccessKind;
13
16
  }
14
17
  export type Meaning = Meaning_resolved | Meaning_unresolved;
15
18
  declare class Meaning_resolved {
16
19
  readonly indexer: FoundAnonymousDeclaration<types.Indexer>;
17
- readonly access: indexerAccess.IndexerAccess;
20
+ readonly access: indexedAccess.IndexedAccess;
18
21
  readonly kind = "resolved";
19
- constructor(indexer: FoundAnonymousDeclaration<types.Indexer>, access: indexerAccess.IndexerAccess);
22
+ constructor(indexer: FoundAnonymousDeclaration<types.Indexer>, access: indexedAccess.IndexedAccess);
20
23
  }
21
24
  declare class Meaning_unresolved {
22
25
  readonly diagnostic: Diagnostic | undefined;
@@ -20,10 +20,26 @@ export declare class Resolver {
20
20
  }
21
21
  export type Meaning = Meaning_ownConstructorAccess | Meaning_objectAccess | Meaning_unresolved;
22
22
  declare class Meaning_ownConstructorAccess {
23
+ /**
24
+ * Тип объекта, получаемого в результате вызова конструктора.
25
+ *
26
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
27
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
28
+ * с ним совместим.
29
+ */
30
+ readonly type: types.Type;
23
31
  readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
24
32
  readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
25
33
  readonly kind = "own-constructor-access";
26
- constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
34
+ constructor(
35
+ /**
36
+ * Тип объекта, получаемого в результате вызова конструктора.
37
+ *
38
+ * При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
39
+ * создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
40
+ * с ним совместим.
41
+ */
42
+ type: types.Type, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
27
43
  }
28
44
  declare class Meaning_objectAccess {
29
45
  readonly type: types.Type;
@@ -31,8 +47,8 @@ declare class Meaning_objectAccess {
31
47
  constructor(type: types.Type);
32
48
  }
33
49
  declare class Meaning_unresolved {
34
- readonly diagnostic: Diagnostic;
50
+ readonly diagnostic: Diagnostic | undefined;
35
51
  readonly kind = "unresolved";
36
- constructor(diagnostic: Diagnostic);
52
+ constructor(diagnostic: Diagnostic | undefined);
37
53
  }
38
54
  export {};
@@ -8,17 +8,14 @@ import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
8
8
  import * as variableAccess from './VariableAccess.js';
9
9
  import { Analyzer, TargetTypeHint } from './index.js';
10
10
  export declare class Resolver {
11
- private readonly _propertySearchName;
12
- private readonly _accessKind;
13
11
  private readonly _semanticContext;
14
12
  private readonly _analyzer;
15
13
  private readonly _node;
16
14
  private readonly _targetTypeHint;
17
- constructor(analyzer: Analyzer, node: PropertyAccessExpression, targetTypeHint: TargetTypeHint | undefined);
18
15
  private get propertySearchName();
19
- private get accessKind();
20
16
  private get semanticContext();
21
17
  private get receiver();
18
+ constructor(analyzer: Analyzer, node: PropertyAccessExpression, targetTypeHint: TargetTypeHint | undefined);
22
19
  resolve(): ResolutionResult;
23
20
  private resolvePackageAliasMemberAccessMeaning;
24
21
  private resolvePackageMemberAccessMeaning;
@@ -28,6 +25,7 @@ export declare class Resolver {
28
25
  private createAccessedMethodFromTypeMember;
29
26
  private resolveInstanceMemberAccessMeaning;
30
27
  private resolveMethodOverload;
28
+ private convertSyntacticAccessKind;
31
29
  }
32
30
  export declare class ResolutionResult {
33
31
  readonly meaning: Meaning;
@@ -1,5 +1,5 @@
1
1
  import { IEntityHidingMatcher } from '../entities/EntityHiding.js';
2
- import { ConstructorEntity, PackageEntity, TypeEntityWithMembers, TypeExtensionEntity } from '../entities/index.js';
2
+ import { ConstructorEntity, PackageEntity, TypeEntity, TypeEntityWithMembers, TypeExtensionEntity } from '../entities/index.js';
3
3
  import { SourceFile } from '../project/SourceFile.js';
4
4
  import * as tree from '../tree/index.js';
5
5
  import * as types from '../types/index.js';
@@ -107,18 +107,18 @@ export declare namespace TypeOrTypeExtension {
107
107
  readonly value: TypeEntityWithMembers;
108
108
  readonly kind = "type";
109
109
  constructor(value: TypeEntityWithMembers);
110
- getTypeEntity(): TypeEntityWithMembers | undefined;
110
+ getContextualTypeEntity(): TypeEntity | undefined;
111
111
  getEntity(): TypeEntityWithMembers;
112
112
  }
113
113
  export class TypeExtension implements ITypeOrTypeExtension {
114
114
  readonly value: TypeExtensionEntity;
115
115
  readonly kind = "type-extension";
116
116
  constructor(value: TypeExtensionEntity);
117
- getTypeEntity(): TypeEntityWithMembers | undefined;
117
+ getContextualTypeEntity(): TypeEntity | undefined;
118
118
  getEntity(): TypeExtensionEntity;
119
119
  }
120
120
  interface ITypeOrTypeExtension {
121
- getTypeEntity(): TypeEntityWithMembers | undefined;
121
+ getContextualTypeEntity(): TypeEntity | undefined;
122
122
  getEntity(): TypeEntityWithMembers | TypeExtensionEntity;
123
123
  }
124
124
  export {};
@@ -2,9 +2,13 @@ import { AccessKind } from '../common/index.js';
2
2
  import { GetterEntity, SetterEntity, VariableEntity } from '../entities/index.js';
3
3
  export type VariableAccess = {
4
4
  kind: AccessKind.Get;
5
- accessorEntity: GetterEntity | undefined;
5
+ getAccessor: GetterEntity | undefined;
6
6
  } | {
7
7
  kind: AccessKind.Set;
8
- accessorEntity: SetterEntity | undefined;
8
+ setAccessor: SetterEntity | undefined;
9
+ } | {
10
+ kind: AccessKind.GetSet;
11
+ getAccessor: GetterEntity | undefined;
12
+ setAccessor: SetterEntity | undefined;
9
13
  };
10
14
  export declare function create(entity: VariableEntity, accessKind: AccessKind): VariableAccess;
@@ -30,5 +30,6 @@ export declare class WellKnownDeclarations {
30
30
  parameterArray: AliasTypeEntity;
31
31
  defaultImport: StructuredTypeEntity;
32
32
  realName: StructuredTypeEntity;
33
+ builtIntoPlatform: StructuredTypeEntity;
33
34
  typeVariableProxy: StructuredTypeEntity;
34
35
  }
@@ -1,8 +1,10 @@
1
- export * from './CallArgumentsToParametersMatcher.js';
2
1
  export * from './Analyzer.js';
2
+ export * from './CallArgumentsToParametersMatcher.js';
3
+ export * from './DeclarationsUsageCounter.js';
4
+ export * from './DiagnosticCollector.js';
3
5
  export * from './FindModifier.js';
4
6
  export * from './OverloadResolver.js';
5
- export * from './DiagnosticCollector.js';
7
+ export * from './SourcePackageDependencyGraph.js';
6
8
  export * from './TargetTypeHint.js';
7
9
  export * from './Visitor.js';
8
10
  export * from './WellKnownDeclarations.js';