@artel/artc 0.6.25191

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 (281) hide show
  1. package/build/Cli.js +20 -0
  2. package/build/api/Api.js +664 -0
  3. package/build/api/ApiNodeJS.js +20 -0
  4. package/build/api/ApiServices.js +12847 -0
  5. package/build/chunk-BQHCAH6D.js +588 -0
  6. package/build/chunk-O2JKESUU.js +63219 -0
  7. package/build/chunk-QRBDQKYM.js +94 -0
  8. package/build/types/Cli.d.ts +3 -0
  9. package/build/types/analysis/AccessedMethod.d.ts +53 -0
  10. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +191 -0
  11. package/build/types/analysis/Analyzer.d.ts +665 -0
  12. package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +25 -0
  13. package/build/types/analysis/BaseExpressionMeaning.d.ts +47 -0
  14. package/build/types/analysis/BuiltInOperators.d.ts +14 -0
  15. package/build/types/analysis/CallArgumentToParameterMatchResult.d.ts +30 -0
  16. package/build/types/analysis/CallArgumentsToParametersMatcher.d.ts +44 -0
  17. package/build/types/analysis/CallExpressionMeaning.d.ts +39 -0
  18. package/build/types/analysis/ConstructorOverloadResolver.d.ts +34 -0
  19. package/build/types/analysis/DeclarationsUsageCounter.d.ts +18 -0
  20. package/build/types/analysis/DereferenceExpressionMeaning.d.ts +23 -0
  21. package/build/types/analysis/DiagnosticCollector.d.ts +68 -0
  22. package/build/types/analysis/EntityLocalizationHelper.d.ts +15 -0
  23. package/build/types/analysis/FindModifier.d.ts +4 -0
  24. package/build/types/analysis/FoundDeclaration.d.ts +19 -0
  25. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +98 -0
  26. package/build/types/analysis/ImportedPackageNameTree.d.ts +22 -0
  27. package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +26 -0
  28. package/build/types/analysis/IndexerAccess.d.ts +10 -0
  29. package/build/types/analysis/Localization.d.ts +54 -0
  30. package/build/types/analysis/LocalizationContext.d.ts +15 -0
  31. package/build/types/analysis/Lookup.d.ts +23 -0
  32. package/build/types/analysis/NamedTypeResolver.d.ts +42 -0
  33. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +20 -0
  34. package/build/types/analysis/NodeTypeUtils.d.ts +28 -0
  35. package/build/types/analysis/ObjectExpressionMeaning.d.ts +38 -0
  36. package/build/types/analysis/OperationOverloadResolver.d.ts +19 -0
  37. package/build/types/analysis/OverloadResolver.d.ts +12 -0
  38. package/build/types/analysis/PackageMemberLookup.d.ts +15 -0
  39. package/build/types/analysis/PrefixUnaryOperatorResolver.d.ts +27 -0
  40. package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +100 -0
  41. package/build/types/analysis/Scope.d.ts +309 -0
  42. package/build/types/analysis/SemanticContext.d.ts +320 -0
  43. package/build/types/analysis/SemanticContextBuilder.d.ts +54 -0
  44. package/build/types/analysis/SourceFileMembers.d.ts +92 -0
  45. package/build/types/analysis/SourcePackageDependencyGraph.d.ts +41 -0
  46. package/build/types/analysis/SourcePackageMembersCreator.d.ts +6 -0
  47. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +22 -0
  48. package/build/types/analysis/SubstitutedMethod.d.ts +49 -0
  49. package/build/types/analysis/TagMeaning.d.ts +26 -0
  50. package/build/types/analysis/Tags.d.ts +29 -0
  51. package/build/types/analysis/TargetTypeHint.d.ts +5 -0
  52. package/build/types/analysis/TypeInferrer.d.ts +9 -0
  53. package/build/types/analysis/TypeMemberLookup.d.ts +27 -0
  54. package/build/types/analysis/TypeOverloadResolver.d.ts +7 -0
  55. package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +37 -0
  56. package/build/types/analysis/Utils.d.ts +17 -0
  57. package/build/types/analysis/VariableAccess.d.ts +10 -0
  58. package/build/types/analysis/VariantLookup.d.ts +20 -0
  59. package/build/types/analysis/Visitor.d.ts +7 -0
  60. package/build/types/analysis/WellKnownDeclarations.d.ts +34 -0
  61. package/build/types/analysis/index.d.ts +8 -0
  62. package/build/types/api/Api.d.ts +59 -0
  63. package/build/types/api/ApiNodeJS.d.ts +5 -0
  64. package/build/types/api/ApiServices.d.ts +3 -0
  65. package/build/types/common/AccessKind.d.ts +4 -0
  66. package/build/types/common/ArtelFileCheck.d.ts +2 -0
  67. package/build/types/common/Cached.d.ts +6 -0
  68. package/build/types/common/CancellationToken.d.ts +13 -0
  69. package/build/types/common/Constants.d.ts +19 -0
  70. package/build/types/common/Debug.d.ts +10 -0
  71. package/build/types/common/Delayed.d.ts +7 -0
  72. package/build/types/common/ErrorHandlingStrategy.d.ts +3 -0
  73. package/build/types/common/FormatString.d.ts +5 -0
  74. package/build/types/common/HelperPhrases.d.ts +11 -0
  75. package/build/types/common/Interner.d.ts +4 -0
  76. package/build/types/common/L10nConfig.d.ts +1 -0
  77. package/build/types/common/Lazy.d.ts +9 -0
  78. package/build/types/common/LocalizationHelper.d.ts +10 -0
  79. package/build/types/common/Logger.d.ts +10 -0
  80. package/build/types/common/Name.d.ts +83 -0
  81. package/build/types/common/NameFormatConversion.d.ts +12 -0
  82. package/build/types/common/NonEmptyArray.d.ts +8 -0
  83. package/build/types/common/Option.d.ts +28 -0
  84. package/build/types/common/PackageDialect.d.ts +5 -0
  85. package/build/types/common/PackageLocale.d.ts +15 -0
  86. package/build/types/common/PackageLocaleGuard.d.ts +1 -0
  87. package/build/types/common/Path.d.ts +8 -0
  88. package/build/types/common/PerformanceMeasurement.d.ts +20 -0
  89. package/build/types/common/Query.d.ts +39 -0
  90. package/build/types/common/Range.d.ts +10 -0
  91. package/build/types/common/Result.d.ts +13 -0
  92. package/build/types/common/SearchName.d.ts +13 -0
  93. package/build/types/common/ThrottledCancellationToken.d.ts +17 -0
  94. package/build/types/common/TreeQuery.d.ts +53 -0
  95. package/build/types/common/TreeTraversal.d.ts +13 -0
  96. package/build/types/common/Uri.d.ts +28 -0
  97. package/build/types/common/UriTree.d.ts +41 -0
  98. package/build/types/common/UserLocale.d.ts +2 -0
  99. package/build/types/common/WithDiagnostics.d.ts +19 -0
  100. package/build/types/common/YieldExecution.d.ts +1 -0
  101. package/build/types/common/index.d.ts +32 -0
  102. package/build/types/diagnostic/Diagnostic.d.ts +21 -0
  103. package/build/types/diagnostic/DiagnosticCode.d.ts +146 -0
  104. package/build/types/diagnostic/DiagnosticData.d.ts +20 -0
  105. package/build/types/diagnostic/DiagnosticFormatter.d.ts +8 -0
  106. package/build/types/diagnostic/RangeDiagnostic.d.ts +19 -0
  107. package/build/types/emitter/BlockStatementTransformationResult.d.ts +10 -0
  108. package/build/types/emitter/CustomModuleLoader.d.ts +1 -0
  109. package/build/types/emitter/DebugStack.d.ts +10 -0
  110. package/build/types/emitter/Emitter.d.ts +61 -0
  111. package/build/types/emitter/EmitterContext.d.ts +342 -0
  112. package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +36 -0
  113. package/build/types/emitter/EmitterPackage.d.ts +60 -0
  114. package/build/types/emitter/EntityNameProviders.d.ts +33 -0
  115. package/build/types/emitter/ExpressionTransformationResult.d.ts +17 -0
  116. package/build/types/emitter/GeneralLowering.d.ts +72 -0
  117. package/build/types/emitter/Internal.d.ts +10 -0
  118. package/build/types/emitter/IntrinsicEntities.d.ts +118 -0
  119. package/build/types/emitter/IrBuilder.d.ts +108 -0
  120. package/build/types/emitter/IrToJs.d.ts +113 -0
  121. package/build/types/emitter/JavaScriptName.d.ts +1 -0
  122. package/build/types/emitter/PackageMemberDeclarationTransformationResult.d.ts +17 -0
  123. package/build/types/emitter/SimpleTransformationResult.d.ts +14 -0
  124. package/build/types/emitter/StatementTransformationResult.d.ts +16 -0
  125. package/build/types/emitter/StructuredTypeMemberDeclarationTransformationResult.d.ts +13 -0
  126. package/build/types/emitter/TransformationContinuationAction.d.ts +4 -0
  127. package/build/types/emitter/Transformer.d.ts +282 -0
  128. package/build/types/emitter/TypeAccessExpressionTransformationResult.d.ts +12 -0
  129. package/build/types/emitter/error-boundary.d.ts +10 -0
  130. package/build/types/emitter/index.d.ts +1 -0
  131. package/build/types/emitter/ir/AccessedEntities.d.ts +19 -0
  132. package/build/types/emitter/ir/LoweringOptions.d.ts +34 -0
  133. package/build/types/emitter/ir/Nodes.d.ts +1585 -0
  134. package/build/types/emitter/ir/SourceLocation.d.ts +10 -0
  135. package/build/types/emitter/ir/index.d.ts +5 -0
  136. package/build/types/emitter/ir/types.d.ts +10 -0
  137. package/build/types/entities/AliasTypeEntity.d.ts +84 -0
  138. package/build/types/entities/BinaryOperatorEntity.d.ts +48 -0
  139. package/build/types/entities/ConstructorEntity.d.ts +99 -0
  140. package/build/types/entities/DereferenceOperatorEntity.d.ts +40 -0
  141. package/build/types/entities/DestructorEntity.d.ts +31 -0
  142. package/build/types/entities/EntityHiding.d.ts +27 -0
  143. package/build/types/entities/EntityNaming.d.ts +12 -0
  144. package/build/types/entities/GetterEntity.d.ts +86 -0
  145. package/build/types/entities/IndexerEntity.d.ts +51 -0
  146. package/build/types/entities/MethodEntity.d.ts +174 -0
  147. package/build/types/entities/MethodTypeEntity.d.ts +98 -0
  148. package/build/types/entities/PackageAliasEntity.d.ts +30 -0
  149. package/build/types/entities/PackageEntity.d.ts +56 -0
  150. package/build/types/entities/PackageMembers.d.ts +98 -0
  151. package/build/types/entities/SetterEntity.d.ts +78 -0
  152. package/build/types/entities/StructuredTypeEntity.d.ts +199 -0
  153. package/build/types/entities/SubstitutionApplicationMode.d.ts +4 -0
  154. package/build/types/entities/TypeEntityMembers.d.ts +36 -0
  155. package/build/types/entities/TypeExtensionEntity.d.ts +33 -0
  156. package/build/types/entities/TypeMemberContainer.d.ts +23 -0
  157. package/build/types/entities/TypeParameterEntity.d.ts +94 -0
  158. package/build/types/entities/UnaryOperatorEntity.d.ts +33 -0
  159. package/build/types/entities/VariableEntity.d.ts +423 -0
  160. package/build/types/entities/VariantEntity.d.ts +31 -0
  161. package/build/types/entities/VariantTypeEntity.d.ts +83 -0
  162. package/build/types/entities/Variants.d.ts +10 -0
  163. package/build/types/entities/index.d.ts +87 -0
  164. package/build/types/executor/CommandLineCompiler.d.ts +8 -0
  165. package/build/types/executor/Compiler.d.ts +15 -0
  166. package/build/types/executor/FileSystemUri.d.ts +5 -0
  167. package/build/types/executor/NodeCompiler.d.ts +39 -0
  168. package/build/types/executor/PhysicalFileSystem.d.ts +12 -0
  169. package/build/types/executor/PhysicalTypeScriptLibrariesProvider.d.ts +12 -0
  170. package/build/types/generated/BuiltInSystemPackages.d.ts +3 -0
  171. package/build/types/old/Executor.d.ts +14 -0
  172. package/build/types/old/JavaScriptEmitter.d.ts +1 -0
  173. package/build/types/old/JavaScriptEmittingVisitor.d.ts +1 -0
  174. package/build/types/old/NzonParser.d.ts +1 -0
  175. package/build/types/old/NzonScanner.d.ts +1 -0
  176. package/build/types/old/NzonSyntax.d.ts +1 -0
  177. package/build/types/old/RemoteWorkspaceFileSystem.d.ts +1 -0
  178. package/build/types/parser/CharacterCodes.d.ts +21 -0
  179. package/build/types/parser/ConvertTokenKind.d.ts +3 -0
  180. package/build/types/parser/KeywordDictionary.d.ts +12 -0
  181. package/build/types/parser/ParseNumber.d.ts +5 -0
  182. package/build/types/parser/Parser.d.ts +7 -0
  183. package/build/types/parser/ParserDiagnostic.d.ts +7 -0
  184. package/build/types/parser/ReservedIdentifierDictionary.d.ts +12 -0
  185. package/build/types/parser/Scanner.d.ts +60 -0
  186. package/build/types/parser/TokenKind.d.ts +73 -0
  187. package/build/types/parser/UnescapeText.d.ts +2 -0
  188. package/build/types/project/Compilation.d.ts +21 -0
  189. package/build/types/project/CompilationLoader.d.ts +104 -0
  190. package/build/types/project/FileSystemTree.d.ts +70 -0
  191. package/build/types/project/PackageConfigurationSerializer.d.ts +1 -0
  192. package/build/types/project/Position.d.ts +5 -0
  193. package/build/types/project/SourceFile.d.ts +21 -0
  194. package/build/types/project/SourcePackage.d.ts +151 -0
  195. package/build/types/project/TextFile.d.ts +11 -0
  196. package/build/types/project/configuration/BuildPackageApi.d.ts +75 -0
  197. package/build/types/project/configuration/ConfigurationConverter.d.ts +25 -0
  198. package/build/types/project/configuration/ConfigurationFileParser.d.ts +26 -0
  199. package/build/types/project/configuration/PackageConfigurationInterpreter.d.ts +27 -0
  200. package/build/types/project/configuration/types/PackageConfigurationEn.d.ts +90 -0
  201. package/build/types/project/configuration/types/PackageConfigurationRu.d.ts +91 -0
  202. package/build/types/project/index.d.ts +12 -0
  203. package/build/types/services/AddPropertyAssignmentService.d.ts +15 -0
  204. package/build/types/services/CompletionService.d.ts +95 -0
  205. package/build/types/services/CustomCommand.d.ts +120 -0
  206. package/build/types/services/DefinitionService.d.ts +19 -0
  207. package/build/types/services/DisplayService.d.ts +830 -0
  208. package/build/types/services/DocumentHighlightsService.d.ts +18 -0
  209. package/build/types/services/EvaluatableExpressionService.d.ts +15 -0
  210. package/build/types/services/FileSystemTreeDisplayService.d.ts +7 -0
  211. package/build/types/services/HoverService.d.ts +17 -0
  212. package/build/types/services/LanguageServer.d.ts +125 -0
  213. package/build/types/services/NodeSemanticInfo.d.ts +132 -0
  214. package/build/types/services/ProjectItemsService.d.ts +6 -0
  215. package/build/types/services/ReferencesService.d.ts +30 -0
  216. package/build/types/services/RenameService.d.ts +16 -0
  217. package/build/types/services/SelectionRangeService.d.ts +12 -0
  218. package/build/types/services/SemanticTokensService.d.ts +40 -0
  219. package/build/types/services/SourceFileItemsService.d.ts +42 -0
  220. package/build/types/services/TranslationService.d.ts +23 -0
  221. package/build/types/services/TreeUtils.d.ts +58 -0
  222. package/build/types/services/TypeDefinitionService.d.ts +9 -0
  223. package/build/types/services/Types.d.ts +22 -0
  224. package/build/types/services/Utils.d.ts +5 -0
  225. package/build/types/services/signature-help/SignatureHelpService.d.ts +17 -0
  226. package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +114 -0
  227. package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +20 -0
  228. package/build/types/services/signature-help/ValueParametersSignatureHelpProvider.d.ts +15 -0
  229. package/build/types/services/signature-help/utils.d.ts +9 -0
  230. package/build/types/services/source-generation/EntityToSyntax.d.ts +47 -0
  231. package/build/types/services/source-generation/SourceGenerationService.d.ts +22 -0
  232. package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +41 -0
  233. package/build/types/services/workspace/CompilationController.d.ts +108 -0
  234. package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +61 -0
  235. package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +21 -0
  236. package/build/types/services/workspace/Workspace.d.ts +59 -0
  237. package/build/types/services/workspace/WorkspaceFileSystem.d.ts +5 -0
  238. package/build/types/services/workspace/WorkspaceFiles.d.ts +35 -0
  239. package/build/types/services/workspace/index.d.ts +7 -0
  240. package/build/types/tree/KeywordKind.d.ts +64 -0
  241. package/build/types/tree/NodeKind.d.ts +163 -0
  242. package/build/types/tree/TokenKind.d.ts +132 -0
  243. package/build/types/tree/TriviaKind.d.ts +7 -0
  244. package/build/types/tree/green/BaseNode.d.ts +12 -0
  245. package/build/types/tree/green/Nodes.d.ts +2235 -0
  246. package/build/types/tree/green/SyntaxFactory.d.ts +67 -0
  247. package/build/types/tree/green/SyntaxToCode.d.ts +116 -0
  248. package/build/types/tree/green/Token.d.ts +37 -0
  249. package/build/types/tree/green/Utils.d.ts +2 -0
  250. package/build/types/tree/green/index.d.ts +7 -0
  251. package/build/types/tree/index.d.ts +4 -0
  252. package/build/types/tree/red/BaseNode.d.ts +15 -0
  253. package/build/types/tree/red/Internal.d.ts +2 -0
  254. package/build/types/tree/red/NodePath.d.ts +10 -0
  255. package/build/types/tree/red/Nodes.d.ts +2237 -0
  256. package/build/types/tree/red/Token.d.ts +29 -0
  257. package/build/types/tree/red/Utils.d.ts +6 -0
  258. package/build/types/tree/red/index.d.ts +6 -0
  259. package/build/types/ts-interop/Entities.d.ts +634 -0
  260. package/build/types/ts-interop/TsInteropContext.d.ts +179 -0
  261. package/build/types/ts-interop/TsLibrariesProvider.d.ts +12 -0
  262. package/build/types/ts-interop/TsPackageContents.d.ts +64 -0
  263. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +69 -0
  264. package/build/types/ts-interop/TsProgramLoader.d.ts +38 -0
  265. package/build/types/ts-interop/TsTypeMembersCreator.d.ts +45 -0
  266. package/build/types/ts-interop/Utils.d.ts +43 -0
  267. package/build/types/types/AliasType.d.ts +20 -0
  268. package/build/types/types/Internal.d.ts +1 -0
  269. package/build/types/types/MethodType.d.ts +23 -0
  270. package/build/types/types/ParameterType.d.ts +19 -0
  271. package/build/types/types/StandardTypes.d.ts +42 -0
  272. package/build/types/types/StructuredType.d.ts +25 -0
  273. package/build/types/types/Substitutions.d.ts +18 -0
  274. package/build/types/types/Type.d.ts +16 -0
  275. package/build/types/types/TypeFactory.d.ts +15 -0
  276. package/build/types/types/TypeMembers.d.ts +134 -0
  277. package/build/types/types/UnionType.d.ts +20 -0
  278. package/build/types/types/UnresolvedType.d.ts +16 -0
  279. package/build/types/types/VariantType.d.ts +19 -0
  280. package/build/types/types/index.d.ts +12 -0
  281. package/package.json +73 -0
@@ -0,0 +1,320 @@
1
+ import { IEntityHidingMatcher } from '../entities/EntityHiding.js';
2
+ import { ConstructorEntity, PackageEntity, TypeEntityWithMembers, TypeExtensionEntity } from '../entities/index.js';
3
+ import { SourceFile } from '../project/SourceFile.js';
4
+ import * as tree from '../tree/index.js';
5
+ import * as types from '../types/index.js';
6
+ import { Analyzer } from './Analyzer.js';
7
+ import { LocalizationContext } from './LocalizationContext.js';
8
+ import { Lookup, ScopeChain } from './Lookup.js';
9
+ import { GetterDeclaration, MethodDeclaration, MethodTypeDeclaration, SetterDeclaration, StructuredTypeDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
10
+ /**
11
+ * Позволяет получить информацию, общую для определённой области
12
+ * исходного кода (блока инструкций, списка членов типа и др.) с учётом
13
+ * всех вышестоящих (родительских) контекстов.
14
+ * Чтобы получить семантический контекст, в котором находится определённый узел,
15
+ * используйте `analyzer.semanticContext.containing(node)`.
16
+ */
17
+ export interface SemanticContext {
18
+ getScopeChain(): ScopeChain;
19
+ getContainingSubprogram(): SubprogramInfo | undefined;
20
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
21
+ getContainingSourceFile(): SourceFile;
22
+ getContainingPackage(): PackageEntity;
23
+ getLocalizationContext(): LocalizationContext;
24
+ isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
25
+ isInFinallyClause(): boolean;
26
+ getScopeLookup(): Lookup;
27
+ getHidingMatcher(): IEntityHidingMatcher;
28
+ }
29
+ export type SubprogramInfo = SubprogramInfo.Method | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.MethodLiteral;
30
+ export declare namespace SubprogramInfo {
31
+ export class Method implements ISubprogramInfo {
32
+ readonly kind = "method";
33
+ private readonly _analyzer;
34
+ private readonly _node;
35
+ constructor(analyzer: Analyzer, node: MethodDeclaration);
36
+ getReturnType(): types.Type | undefined;
37
+ isGenerator(): boolean;
38
+ }
39
+ export class Constructor implements ISubprogramInfo {
40
+ readonly kind = "constructor";
41
+ private readonly _analyzer;
42
+ private readonly _node;
43
+ constructor(analyzer: Analyzer, node: tree.TypeConstructorDeclaration);
44
+ getReturnType(): types.Type | undefined;
45
+ isGenerator(): boolean;
46
+ getEntity(): ConstructorEntity;
47
+ }
48
+ export class Destructor implements ISubprogramInfo {
49
+ readonly kind = "destructor";
50
+ private readonly _analyzer;
51
+ private readonly _node;
52
+ constructor(analyzer: Analyzer, node: tree.TypeDestructorDeclaration);
53
+ getReturnType(): types.Type | undefined;
54
+ isGenerator(): boolean;
55
+ }
56
+ export class Getter implements ISubprogramInfo {
57
+ readonly kind = "getter";
58
+ private readonly _analyzer;
59
+ private readonly _node;
60
+ constructor(analyzer: Analyzer, node: GetterDeclaration);
61
+ getReturnType(): types.Type | undefined;
62
+ isGenerator(): boolean;
63
+ }
64
+ export class Setter implements ISubprogramInfo {
65
+ readonly kind = "setter";
66
+ private readonly _analyzer;
67
+ private readonly _node;
68
+ constructor(analyzer: Analyzer, node: SetterDeclaration);
69
+ getReturnType(): types.Type | undefined;
70
+ isGenerator(): boolean;
71
+ }
72
+ export class PackageConstructor implements ISubprogramInfo {
73
+ readonly kind = "package-constructor";
74
+ private readonly _analyzer;
75
+ private readonly _node;
76
+ constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration);
77
+ getReturnType(): types.Type | undefined;
78
+ isGenerator(): boolean;
79
+ getPackageEntity(): PackageEntity;
80
+ }
81
+ export class PackageEntryPoint implements ISubprogramInfo {
82
+ readonly kind = "package-entry-point";
83
+ private readonly _analyzer;
84
+ private readonly _node;
85
+ constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration);
86
+ getReturnType(): types.Type | undefined;
87
+ isGenerator(): boolean;
88
+ getPackageEntity(): PackageEntity;
89
+ }
90
+ export class MethodLiteral implements ISubprogramInfo {
91
+ readonly kind = "method-literal";
92
+ private readonly _analyzer;
93
+ private readonly _node;
94
+ constructor(analyzer: Analyzer, node: RegularOrBlockMethodLiteral);
95
+ getReturnType(): types.Type | undefined;
96
+ isGenerator(): boolean;
97
+ }
98
+ interface ISubprogramInfo {
99
+ getReturnType(): types.Type | undefined;
100
+ isGenerator(): boolean;
101
+ }
102
+ export {};
103
+ }
104
+ export type TypeOrTypeExtension = TypeOrTypeExtension.Type | TypeOrTypeExtension.TypeExtension;
105
+ export declare namespace TypeOrTypeExtension {
106
+ export class Type implements ITypeOrTypeExtension {
107
+ readonly value: TypeEntityWithMembers;
108
+ readonly kind = "type";
109
+ constructor(value: TypeEntityWithMembers);
110
+ getTypeEntity(): TypeEntityWithMembers | undefined;
111
+ getEntity(): TypeEntityWithMembers;
112
+ }
113
+ export class TypeExtension implements ITypeOrTypeExtension {
114
+ readonly value: TypeExtensionEntity;
115
+ readonly kind = "type-extension";
116
+ constructor(value: TypeExtensionEntity);
117
+ getTypeEntity(): TypeEntityWithMembers | undefined;
118
+ getEntity(): TypeExtensionEntity;
119
+ }
120
+ interface ITypeOrTypeExtension {
121
+ getTypeEntity(): TypeEntityWithMembers | undefined;
122
+ getEntity(): TypeEntityWithMembers | TypeExtensionEntity;
123
+ }
124
+ export {};
125
+ }
126
+ export declare class RunStatementClausesInfo {
127
+ readonly hasOnErrorClause: boolean;
128
+ readonly hasFinallyClause: boolean;
129
+ constructor(hasOnErrorClause: boolean, hasFinallyClause: boolean);
130
+ }
131
+ declare abstract class SemanticContextWithParent implements SemanticContext {
132
+ protected readonly _parentContext: SemanticContext;
133
+ constructor(parentContext: SemanticContext);
134
+ getScopeChain(): ScopeChain;
135
+ getContainingSubprogram(): SubprogramInfo | undefined;
136
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
137
+ getContainingSourceFile(): SourceFile;
138
+ getContainingPackage(): PackageEntity;
139
+ getLocalizationContext(): LocalizationContext;
140
+ isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
141
+ isInFinallyClause(): boolean;
142
+ getScopeLookup(): Lookup;
143
+ getHidingMatcher(): IEntityHidingMatcher;
144
+ }
145
+ export declare class SourceFileSemanticContext implements SemanticContext {
146
+ private readonly _analyzer;
147
+ private readonly _sourceFile;
148
+ private readonly _scopeChain;
149
+ constructor(analyzer: Analyzer, node: tree.SourceFile);
150
+ getScopeChain(): ScopeChain;
151
+ getHidingMatcher(): IEntityHidingMatcher;
152
+ getContainingSubprogram(): SubprogramInfo | undefined;
153
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
154
+ getContainingSourceFile(): SourceFile;
155
+ getContainingPackage(): PackageEntity;
156
+ isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
157
+ isInFinallyClause(): boolean;
158
+ getScopeLookup(): Lookup;
159
+ getLocalizationContext(): LocalizationContext;
160
+ }
161
+ export type TypeDeclarationCreatingSemanticContext = StructuredTypeDeclaration | VariantTypeDeclaration | MethodTypeDeclaration | tree.PackageAliasTypeDeclaration;
162
+ /**
163
+ * Завершающий семантический контекст типа.
164
+ * Поскольку контекст с параметрами типа является опциональным, необходим
165
+ * ещё один контекст, который гарантированно переопределит метод `getContainingTypeOrTypeExtension`.
166
+ */
167
+ export declare class LastSemanticContextOfType extends SemanticContextWithParent {
168
+ private readonly _analyzer;
169
+ private readonly _node;
170
+ constructor(analyzer: Analyzer, node: TypeDeclarationCreatingSemanticContext, parentContext: SemanticContext);
171
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
172
+ getContainingSubprogram(): SubprogramInfo | undefined;
173
+ isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
174
+ isInFinallyClause(): boolean;
175
+ private getContainingType;
176
+ }
177
+ type TypeDeclarationWithTypeParameters = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageMethodTypeDeclaration;
178
+ export declare class TypeParametersOfTypeSemanticContext extends SemanticContextWithParent {
179
+ private readonly _analyzer;
180
+ private readonly _node;
181
+ private readonly _scopeChain;
182
+ constructor(analyzer: Analyzer, node: TypeDeclarationWithTypeParameters, parentContext: SemanticContext);
183
+ getScopeChain(): ScopeChain;
184
+ }
185
+ export type TypeDeclarationBody = tree.StructuredTypeDeclarationBody | tree.VariantTypeDeclarationBody | tree.AliasTypeDeclarationBody | tree.MethodTypeDeclarationBody;
186
+ export declare class TypeBodySemanticContext extends SemanticContextWithParent {
187
+ private readonly _analyzer;
188
+ private readonly _node;
189
+ private readonly _scopeChain;
190
+ constructor(analyzer: Analyzer, node: TypeDeclarationBody, parentContext: SemanticContext);
191
+ getScopeChain(): ScopeChain;
192
+ }
193
+ export declare class TypeExtensionBodySemanticContext extends SemanticContextWithParent {
194
+ private readonly _analyzer;
195
+ private readonly _node;
196
+ private readonly _scopeChain;
197
+ constructor(analyzer: Analyzer, node: tree.TypeExtensionDeclaration, parentContext: SemanticContext);
198
+ getScopeChain(): ScopeChain;
199
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
200
+ }
201
+ /**
202
+ * Завершающий семантический контекст метода.
203
+ * Поскольку контекст с параметрами типа метода является опциональным, необходим
204
+ * ещё один контекст, который гарантированно переопределит метод `getContainingSubprogram`.
205
+ */
206
+ export declare class LastSemanticContextOfMethod extends SemanticContextWithParent {
207
+ private readonly _analyzer;
208
+ private readonly _node;
209
+ private readonly _subprogramInfo;
210
+ constructor(analyzer: Analyzer, node: MethodDeclaration, parentContext: SemanticContext);
211
+ getContainingSubprogram(): SubprogramInfo | undefined;
212
+ isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
213
+ isInFinallyClause(): boolean;
214
+ }
215
+ export declare class MethodTypeParameterSemanticContext extends SemanticContextWithParent {
216
+ private readonly _analyzer;
217
+ private readonly _node;
218
+ private readonly _scopeChain;
219
+ constructor(analyzer: Analyzer, node: MethodDeclaration, parentContext: SemanticContext);
220
+ getScopeChain(): ScopeChain;
221
+ }
222
+ export declare class MethodValueParameterSemanticContext extends SemanticContextWithParent {
223
+ private readonly _analyzer;
224
+ private readonly _node;
225
+ private readonly _scopeChain;
226
+ constructor(analyzer: Analyzer, node: MethodDeclaration, parentContext: SemanticContext);
227
+ getScopeChain(): ScopeChain;
228
+ }
229
+ export declare class PackageConstructorSemanticContext extends SemanticContextWithParent {
230
+ private readonly _analyzer;
231
+ private readonly _node;
232
+ private readonly _subprogramInfo;
233
+ constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration, parentContext: SemanticContext);
234
+ getContainingSubprogram(): SubprogramInfo | undefined;
235
+ }
236
+ export declare class PackageEntryPointSemanticContext extends SemanticContextWithParent {
237
+ private readonly _analyzer;
238
+ private readonly _node;
239
+ private readonly _subprogramInfo;
240
+ constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration, parentContext: SemanticContext);
241
+ getContainingSubprogram(): SubprogramInfo | undefined;
242
+ }
243
+ export declare class ConstructorSemanticContext extends SemanticContextWithParent {
244
+ private readonly _analyzer;
245
+ private readonly _node;
246
+ private readonly _scopeChain;
247
+ private readonly _subprogramInfo;
248
+ constructor(analyzer: Analyzer, node: tree.TypeConstructorDeclaration, parentContext: SemanticContext);
249
+ getScopeChain(): ScopeChain;
250
+ getContainingSubprogram(): SubprogramInfo | undefined;
251
+ }
252
+ export declare class DestructorSemanticContext extends SemanticContextWithParent {
253
+ private readonly _analyzer;
254
+ private readonly _node;
255
+ private readonly _scopeChain;
256
+ private readonly _subprogramInfo;
257
+ constructor(analyzer: Analyzer, node: tree.TypeDestructorDeclaration, parentContext: SemanticContext);
258
+ getScopeChain(): ScopeChain;
259
+ getContainingSubprogram(): SubprogramInfo | undefined;
260
+ }
261
+ export declare class IndexerSemanticContext extends SemanticContextWithParent {
262
+ private readonly _analyzer;
263
+ private readonly _node;
264
+ private readonly _scopeChain;
265
+ private readonly _subprogramInfo;
266
+ constructor(analyzer: Analyzer, node: tree.TypeIndexedGetterDeclaration | tree.TypeIndexedSetterDeclaration, parentContext: SemanticContext);
267
+ getScopeChain(): ScopeChain;
268
+ }
269
+ export declare class GetterSemanticContext extends SemanticContextWithParent {
270
+ private readonly _analyzer;
271
+ private readonly _node;
272
+ private readonly _scopeChain;
273
+ private readonly _subprogramInfo;
274
+ constructor(analyzer: Analyzer, node: GetterDeclaration, parentContext: SemanticContext);
275
+ getScopeChain(): ScopeChain;
276
+ getContainingSubprogram(): SubprogramInfo | undefined;
277
+ }
278
+ export declare class SetterSemanticContext extends SemanticContextWithParent {
279
+ private readonly _analyzer;
280
+ private readonly _node;
281
+ private readonly _scopeChain;
282
+ private readonly _subprogramInfo;
283
+ constructor(analyzer: Analyzer, node: SetterDeclaration, parentContext: SemanticContext);
284
+ getScopeChain(): ScopeChain;
285
+ getContainingSubprogram(): SubprogramInfo | undefined;
286
+ }
287
+ export declare class StatementBlockSemanticContext extends SemanticContextWithParent {
288
+ private readonly _analyzer;
289
+ private readonly _node;
290
+ private readonly _scopeChain;
291
+ constructor(analyzer: Analyzer, node: tree.StatementBlock, parentContext: SemanticContext);
292
+ getScopeChain(): ScopeChain;
293
+ isInRunStatementWithClauses(): RunStatementClausesInfo | undefined;
294
+ isInFinallyClause(): boolean;
295
+ }
296
+ export type RegularOrBlockMethodLiteral = tree.MethodLiteral | tree.MethodBlockLiteral;
297
+ export declare class MethodLiteralSemanticContext extends SemanticContextWithParent {
298
+ private readonly _analyzer;
299
+ private readonly _node;
300
+ private readonly _scopeChain;
301
+ private readonly _subprogramInfo;
302
+ constructor(analyzer: Analyzer, node: RegularOrBlockMethodLiteral, parentContext: SemanticContext);
303
+ getScopeChain(): ScopeChain;
304
+ getContainingSubprogram(): SubprogramInfo | undefined;
305
+ }
306
+ export declare class ForStatementSemanticContext extends SemanticContextWithParent {
307
+ private readonly _analyzer;
308
+ private readonly _node;
309
+ private readonly _scopeChain;
310
+ constructor(analyzer: Analyzer, node: tree.ForStatement, parentContext: SemanticContext);
311
+ getScopeChain(): ScopeChain;
312
+ }
313
+ export declare class OnErrorClauseSemanticContext extends SemanticContextWithParent {
314
+ private readonly _analyzer;
315
+ private readonly _node;
316
+ private readonly _scopeChain;
317
+ constructor(analyzer: Analyzer, node: tree.OnErrorClause, parentContext: SemanticContext);
318
+ getScopeChain(): ScopeChain;
319
+ }
320
+ export {};
@@ -0,0 +1,54 @@
1
+ import * as tree from '../tree/index.js';
2
+ import { Analyzer } from './Analyzer.js';
3
+ import { MethodDeclaration } from './NodeTypeUtils.js';
4
+ import { RegularOrBlockMethodLiteral, SemanticContext, TypeDeclarationBody, TypeDeclarationCreatingSemanticContext } from './SemanticContext.js';
5
+ export declare class SemanticContextBuilder {
6
+ private readonly _analyzer;
7
+ private readonly _semanticContexts;
8
+ private readonly _methodDeclarationTypeParametersContexts;
9
+ private readonly _methodDeclarationValueParametersContexts;
10
+ private readonly _indexerParametersContexts;
11
+ constructor(analyzer: Analyzer);
12
+ /**
13
+ * Возвращает контекст, содержащий узел. Если в качестве узла передан исходный файл,
14
+ * будет возвращён контекст исходного файла.
15
+ */
16
+ containing(node: tree.Node): SemanticContext;
17
+ containingWithOffset(node: tree.Node, offset: number): SemanticContext;
18
+ ofSourceFile(node: tree.SourceFile): SemanticContext;
19
+ /**
20
+ * Контекст заголовка метода. Включает параметры-типы и параметры-значения (в зависимости от указанного `hint`).
21
+ */
22
+ ofMethodDeclarationHeader(node: MethodDeclaration, hint: 'type-parameters' | 'value-parameters'): SemanticContext;
23
+ ofTypeDeclarationBody(node: TypeDeclarationBody): SemanticContext;
24
+ /**
25
+ * Контекст заголовка типа. Включает параметры типа.
26
+ */
27
+ ofTypeDeclarationHeader(node: TypeDeclarationCreatingSemanticContext): SemanticContext;
28
+ ofTypeExtensionDeclarationBody(node: tree.TypeExtensionDeclaration): SemanticContext;
29
+ ofVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration | tree.TypeVariableGetterDeclaration | tree.TypeDereferencedVariableGetterDeclaration): SemanticContext;
30
+ ofVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration | tree.TypeVariableSetterDeclaration | tree.TypeDereferencedVariableSetterDeclaration): SemanticContext;
31
+ ofPackageConstructorDeclaration(node: tree.PackageConstructorDeclaration): SemanticContext;
32
+ ofPackageEntryPointDeclaration(node: tree.PackageEntryPointDeclaration): SemanticContext;
33
+ ofRegularOrBlockMethodLiteral(node: RegularOrBlockMethodLiteral): SemanticContext;
34
+ ofForStatement(node: tree.ForStatement): SemanticContext;
35
+ ofStatementBlock(node: tree.StatementBlock): SemanticContext;
36
+ ofTypeConstructorDeclaration(node: tree.TypeConstructorDeclaration): SemanticContext;
37
+ ofTypeDestructorDeclaration(node: tree.TypeDestructorDeclaration): SemanticContext;
38
+ ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
39
+ ofTypeIndexedSetterDeclaration(node: tree.TypeIndexedSetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
40
+ ofOnErrorClause(node: tree.OnErrorClause): SemanticContext;
41
+ private containingInternal;
42
+ private ofChildOfMethodDeclaration;
43
+ private ofChildOfTypeDeclarationWithMemberBlock;
44
+ private ofChildOfTypeDeclarationBodyWithMemberBlock;
45
+ private ofChildOfMethodTypeDeclarationBody;
46
+ private ofChildOfMethodLiteral;
47
+ private ofTypeConstructorDeclarationChild;
48
+ private ofTypeDestructorDeclarationChild;
49
+ private ofTypeIndexedGetterDeclarationChild;
50
+ private ofTypeIndexedSetterDeclarationChild;
51
+ private ofChildOfTypeExtensionDeclaration;
52
+ private isOffsetBetweenNodes;
53
+ private isOffsetInsideStatementBlock;
54
+ }
@@ -0,0 +1,92 @@
1
+ import { Name, Query, SearchName } from '../common/index.js';
2
+ import { AliasTypeEntity, EntityHidingLevel, PackageAliasEntity, PackageMethodEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariableEntity, PackageVariantTypeEntity, StructuredTypeEntity, TypeExtensionEntity, TypeParameterEntity } from '../entities/index.js';
3
+ export declare class SourceFileMembers {
4
+ private readonly _namedDeclarations;
5
+ private readonly _typeExtensions;
6
+ private readonly _declarationsByName;
7
+ get declarationsByName(): ReadonlyMap<string, readonly NamedDeclaration[]>;
8
+ constructor(namedDeclarations: readonly NamedDeclaration[], typeExtensions: readonly TypeExtensionEntity[]);
9
+ getNamedDeclarations(): Query<NamedDeclaration>;
10
+ getNamedDeclarationsByName(name: SearchName): Query<NamedDeclaration>;
11
+ getPackageAliases(): Query<PackageAliasEntity>;
12
+ getPackageAliasesByName(name: SearchName): Query<PackageAliasEntity>;
13
+ getTypeExtensions(): Query<TypeExtensionEntity>;
14
+ getTypeExtensionsByType(type: StructuredTypeEntity): Query<TypeExtensionEntity>;
15
+ }
16
+ export type NamedDeclaration = NamedDeclaration_type | NamedDeclaration_variable | NamedDeclaration_method | NamedDeclaration_packageAlias;
17
+ export declare class NamedDeclaration_type implements INamedDeclaration {
18
+ readonly value: TypeDeclaration;
19
+ readonly kind = "type";
20
+ constructor(value: TypeDeclaration);
21
+ getName(): Name;
22
+ isHidden(): EntityHidingLevel | undefined;
23
+ }
24
+ export declare class NamedDeclaration_variable implements INamedDeclaration {
25
+ readonly value: PackageVariableEntity;
26
+ readonly kind = "variable";
27
+ constructor(value: PackageVariableEntity);
28
+ getName(): Name;
29
+ isHidden(): EntityHidingLevel | undefined;
30
+ }
31
+ export declare class NamedDeclaration_method implements INamedDeclaration {
32
+ readonly value: PackageMethodEntity;
33
+ readonly kind = "method";
34
+ constructor(value: PackageMethodEntity);
35
+ getName(): Name;
36
+ isHidden(): EntityHidingLevel | undefined;
37
+ }
38
+ export declare class NamedDeclaration_packageAlias implements INamedDeclaration {
39
+ readonly value: PackageAliasEntity;
40
+ readonly kind = "package-alias";
41
+ constructor(value: PackageAliasEntity);
42
+ getName(): Name;
43
+ isHidden(): EntityHidingLevel | undefined;
44
+ }
45
+ interface INamedDeclaration {
46
+ getName(): Name;
47
+ isHidden(): EntityHidingLevel | undefined;
48
+ }
49
+ export type TypeDeclaration = TypeDeclaration_alias | TypeDeclaration_method | TypeDeclaration_structured | TypeDeclaration_variant;
50
+ export declare class TypeDeclaration_alias implements ITypeDeclaration {
51
+ readonly value: AliasTypeEntity;
52
+ readonly kind = "alias";
53
+ constructor(value: AliasTypeEntity);
54
+ getName(): Name;
55
+ getTypeParameters(): readonly TypeParameterEntity[];
56
+ getArity(): number;
57
+ isHidden(): EntityHidingLevel | undefined;
58
+ }
59
+ export declare class TypeDeclaration_method implements ITypeDeclaration {
60
+ readonly value: PackageMethodTypeEntity;
61
+ readonly kind = "method";
62
+ constructor(value: PackageMethodTypeEntity);
63
+ getName(): Name;
64
+ getTypeParameters(): readonly TypeParameterEntity[];
65
+ getArity(): number;
66
+ isHidden(): EntityHidingLevel | undefined;
67
+ }
68
+ export declare class TypeDeclaration_structured implements ITypeDeclaration {
69
+ readonly value: PackageStructuredTypeEntity;
70
+ readonly kind = "structured";
71
+ constructor(value: PackageStructuredTypeEntity);
72
+ getName(): Name;
73
+ getTypeParameters(): readonly TypeParameterEntity[];
74
+ getArity(): number;
75
+ isHidden(): EntityHidingLevel | undefined;
76
+ }
77
+ export declare class TypeDeclaration_variant implements ITypeDeclaration {
78
+ readonly value: PackageVariantTypeEntity;
79
+ readonly kind = "variant";
80
+ constructor(value: PackageVariantTypeEntity);
81
+ getName(): Name;
82
+ getTypeParameters(): readonly TypeParameterEntity[];
83
+ getArity(): number;
84
+ isHidden(): EntityHidingLevel | undefined;
85
+ }
86
+ interface ITypeDeclaration {
87
+ getName(): Name;
88
+ getTypeParameters(): readonly TypeParameterEntity[];
89
+ getArity(): number;
90
+ isHidden(): EntityHidingLevel | undefined;
91
+ }
92
+ export {};
@@ -0,0 +1,41 @@
1
+ import { PlatformKind, SourcePackage } from '../project/index.js';
2
+ import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
3
+ import { Analyzer } from './Analyzer.js';
4
+ export declare class SourcePackageDependencyGraph {
5
+ private readonly _analyzer;
6
+ private readonly _rootPackages;
7
+ private readonly _nodeByPackage;
8
+ constructor(analyzer: Analyzer, rootPackages?: readonly SourcePackage[]);
9
+ /**
10
+ * Перечислить все пакеты и их зависимости, включая транзитивные, начиная от корневых пакетов.
11
+ * @param platformKind Связывать многоплатформенные пакеты с реализацией для заданной платформы.
12
+ */
13
+ enumeratePackages(platformKind: PlatformKind): Iterable<SourcePackage>;
14
+ private getNodeForPackage;
15
+ private enumerateNodeAndDependenciesRecursively;
16
+ }
17
+ export interface SourcePackageDependencyGraphNode {
18
+ /**
19
+ * Исходный пакет, который может подключать другие пакеты.
20
+ */
21
+ readonly pkg: SourcePackage;
22
+ /**
23
+ * Информация о подключаемых пакетах.
24
+ */
25
+ readonly links: readonly SourcePackageDependencyGraphLink[];
26
+ }
27
+ export interface SourcePackageDependencyGraphLink {
28
+ /**
29
+ * Подключаемый пакет.
30
+ */
31
+ readonly node: SourcePackageDependencyGraphNode;
32
+ /**
33
+ * Пакеты перевода, используемые при подключении пакета. Их может быть несколько, поскольку в разных файлах
34
+ * одного пакета другой пакет может подключаться на разных языках.
35
+ */
36
+ readonly translationPackages: readonly AnalyzedTranslationPackage[];
37
+ /**
38
+ * Если подключаемый пакет является многоплатформенным, поле содержит доступные реализационные пакеты.
39
+ */
40
+ readonly implementationPackageByPlatformKind: ReadonlyMap<PlatformKind, SourcePackageDependencyGraphNode>;
41
+ }
@@ -0,0 +1,6 @@
1
+ import { PackageVariableEntity } from '../entities/VariableEntity.js';
2
+ import * as tree from '../tree/index.js';
3
+ import { Analyzer } from './Analyzer.js';
4
+ export declare class SourcePackageMembersCreator {
5
+ static createMembersWithCompoundDeclarations(analyzer: Analyzer, memberList: tree.PackageMemberDeclarationList, resultingComputedVariables: Map<tree.Node, PackageVariableEntity>): void;
6
+ }
@@ -0,0 +1,22 @@
1
+ import * as tree from '../tree/index.js';
2
+ import { Analyzer } from './Analyzer.js';
3
+ import { IScope } from './Scope.js';
4
+ export declare class StatementBlockScopeBuilder {
5
+ static build(analyzer: Analyzer, node: tree.StatementBlock): IScope;
6
+ static buildGenericScope(analyzer: Analyzer, node: tree.StatementBlock): IScope;
7
+ static buildScopeForMethodBlockLiteral(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.MethodBlockLiteral): IScope;
8
+ static buildScopeForPackageMethodDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.PackageMethodDeclaration): IScope;
9
+ static buildScopeForTypeVariableGetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeVariableGetterDeclaration): IScope;
10
+ static buildScopeForTypeVariableSetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeVariableSetterDeclaration): IScope;
11
+ static buildScopeForPackageVariableGetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.PackageVariableGetterDeclaration): IScope;
12
+ static buildScopeForPackageVariableSetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.PackageVariableSetterDeclaration): IScope;
13
+ static buildScopeForTypeIndexedGetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeIndexedGetterDeclaration): IScope;
14
+ static buildScopeForTypeIndexedSetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeIndexedSetterDeclaration): IScope;
15
+ static buildScopeForTypeDereferencedVariableGetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeDereferencedVariableGetterDeclaration): IScope;
16
+ static buildScopeForTypeDereferencedVariableSetterDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeDereferencedVariableSetterDeclaration): IScope;
17
+ static buildScopeForNestedMethodDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.NestedMethodDeclaration): IScope;
18
+ static buildScopeForMethodLiteral(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.MethodLiteral): IScope;
19
+ static buildScopeForTypeConstructorDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeConstructorDeclaration): IScope;
20
+ static buildScopeForTypeMethodDeclaration(analyzer: Analyzer, node: tree.StatementBlock, parent: tree.TypeMethodDeclaration): IScope;
21
+ private static getLocalNamedDeclarations;
22
+ }
@@ -0,0 +1,49 @@
1
+ import { Name } from '../common/index.js';
2
+ import { MethodEntity, ParameterVariableEntity } from '../entities/index.js';
3
+ import * as types from '../types/index.js';
4
+ export type SubstitutedMethod = SubstitutedMethod_entity | SubstitutedMethod_typeMember;
5
+ export declare class SubstitutedMethod_entity implements ISubstitutedMethod {
6
+ readonly entity: MethodEntity;
7
+ readonly entitySignatureType: types.MethodType;
8
+ readonly substitutions: types.Substitutions;
9
+ readonly kind = "entity";
10
+ private readonly _signatureType;
11
+ constructor(entity: MethodEntity, entitySignatureType: types.MethodType, substitutions: types.Substitutions);
12
+ getEntity(): MethodEntity;
13
+ getName(): Name;
14
+ getSignatureType(): types.MethodType;
15
+ getSubstitutions(): types.Substitutions;
16
+ getValueParameters(): readonly {
17
+ entity: ParameterVariableEntity;
18
+ type: types.Type;
19
+ }[];
20
+ isAsync(): boolean;
21
+ }
22
+ export declare class SubstitutedMethod_typeMember implements ISubstitutedMethod {
23
+ readonly method: types.Method;
24
+ readonly substitutions: types.Substitutions;
25
+ readonly kind = "type-member";
26
+ private readonly _signatureType;
27
+ constructor(method: types.Method, substitutions: types.Substitutions);
28
+ getEntity(): MethodEntity;
29
+ getName(): Name;
30
+ getSignatureType(): types.MethodType;
31
+ getSubstitutions(): types.Substitutions;
32
+ getValueParameters(): readonly {
33
+ entity: ParameterVariableEntity;
34
+ type: types.Type;
35
+ }[];
36
+ isAsync(): boolean;
37
+ }
38
+ interface ISubstitutedMethod {
39
+ getEntity(): MethodEntity;
40
+ getName(): Name;
41
+ getSignatureType(): types.MethodType;
42
+ getSubstitutions(): types.Substitutions;
43
+ getValueParameters(): readonly {
44
+ entity: ParameterVariableEntity;
45
+ type: types.Type;
46
+ }[];
47
+ isAsync(): boolean;
48
+ }
49
+ export {};
@@ -0,0 +1,26 @@
1
+ import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
+ import { Tag } from '../tree/index.js';
3
+ import * as types from '../types/index.js';
4
+ import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
5
+ import { Analyzer } from './index.js';
6
+ export declare class Resolver {
7
+ private readonly _analyzer;
8
+ private readonly _node;
9
+ constructor(_analyzer: Analyzer, _node: Tag);
10
+ resolve(): Meaning;
11
+ }
12
+ export type Meaning = Meaning_constructorCall | Meaning_unresolved;
13
+ declare class Meaning_constructorCall {
14
+ readonly type: types.StructuredType;
15
+ readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
16
+ readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
17
+ readonly kind = "resolved";
18
+ get singleSuitableConstructor(): FoundAnonymousDeclaration<types.Constructor> | undefined;
19
+ constructor(type: types.StructuredType, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
20
+ }
21
+ declare class Meaning_unresolved {
22
+ readonly diagnostics: readonly Diagnostic[];
23
+ readonly kind = "unresolved";
24
+ constructor(diagnostics: readonly Diagnostic[]);
25
+ }
26
+ export {};
@@ -0,0 +1,29 @@
1
+ import { VariableEntity } from '../entities/index.js';
2
+ import * as types from '../types/index.js';
3
+ export declare class Tag {
4
+ readonly type: types.StructuredType;
5
+ readonly constructor_: types.Constructor;
6
+ readonly argumentByParameter: ReadonlyMap<VariableEntity, TagArgument>;
7
+ private readonly _argumentByName;
8
+ get argumentByName(): ReadonlyMap<string, TagArgument>;
9
+ constructor(type: types.StructuredType, constructor_: types.Constructor, argumentByParameter: ReadonlyMap<VariableEntity, TagArgument>);
10
+ }
11
+ export type TagArgument = TagArgument_string | TagArgument_numeric | TagArgument_boolean | TagArgument_invalid;
12
+ export declare class TagArgument_string {
13
+ readonly value: string;
14
+ readonly kind = "string";
15
+ constructor(value: string);
16
+ }
17
+ export declare class TagArgument_numeric {
18
+ readonly value: number;
19
+ readonly kind = "numeric";
20
+ constructor(value: number);
21
+ }
22
+ export declare class TagArgument_boolean {
23
+ readonly value: boolean;
24
+ readonly kind = "boolean";
25
+ constructor(value: boolean);
26
+ }
27
+ export declare class TagArgument_invalid {
28
+ readonly kind = "invalid";
29
+ }
@@ -0,0 +1,5 @@
1
+ import * as types from '../types/index.js';
2
+ export declare class TargetTypeHint {
3
+ readonly value: types.Type | undefined;
4
+ constructor(value: types.Type | undefined);
5
+ }
@@ -0,0 +1,9 @@
1
+ import * as types from '../types/index.js';
2
+ import { Analyzer } from './index.js';
3
+ export declare class TypeInferrer {
4
+ private readonly _analyzer;
5
+ private _getType;
6
+ private _typeInferringState;
7
+ constructor(analyzer: Analyzer, getType: () => types.Type);
8
+ inferType(): types.Type;
9
+ }