@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,18 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { Range, CancellationToken } from '../common/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ export declare class DocumentHighlightsService {
5
+ private readonly _referencesService;
6
+ getDocumentHighlights(analyzer: Analyzer, sourceFile: SourceFile, offset: number, cancellationToken: CancellationToken | undefined): Promise<Highlight[]>;
7
+ private static referenceKindToHighlightKind;
8
+ }
9
+ export declare class Highlight {
10
+ readonly range: Range;
11
+ readonly kind: HighlightKind;
12
+ constructor(range: Range, kind: HighlightKind);
13
+ }
14
+ export declare const enum HighlightKind {
15
+ Text = 1,
16
+ Read = 2,
17
+ Write = 3
18
+ }
@@ -0,0 +1,15 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { Range } from '../common/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ export declare class EvaluatableExpression {
5
+ readonly range: Range;
6
+ readonly value: string;
7
+ constructor(range: Range, value: string);
8
+ }
9
+ export declare class EvaluatableExpressionService {
10
+ getEvaluatableExpression(analyzer: Analyzer, sourceFile: SourceFile, offset: number): EvaluatableExpression | undefined;
11
+ private convertEvaluatableExpressionToString;
12
+ private getEvaluatableExpressionForIdentifier;
13
+ private isEvaluatableReceiver;
14
+ private isNamedDeclaration;
15
+ }
@@ -0,0 +1,7 @@
1
+ import { Directory } from '../project/FileSystemTree.js';
2
+ export declare class FileSystemTreeDisplayService {
3
+ static readonly indentation = 2;
4
+ static readonly ignoredFolderNameSet: Set<string>;
5
+ displayFileSystemTree(rootDirectories: readonly Directory[]): string;
6
+ private displayDirectoryRecursively;
7
+ }
@@ -0,0 +1,17 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { Range } from '../common/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ export declare class HoverService {
5
+ private _displayService;
6
+ getHover(analyzer: Analyzer, sourceFile: SourceFile, offset: number): Hover | undefined;
7
+ private createHoverForEntity;
8
+ private createHoverAtReference;
9
+ private createHoverAtAccessedMethod;
10
+ }
11
+ export declare class Hover {
12
+ private readonly _contents;
13
+ private readonly _rawContents;
14
+ readonly range: Range;
15
+ get contents(): string;
16
+ constructor(rawContents: string, range: Range);
17
+ }
@@ -0,0 +1,125 @@
1
+ import * as ls from 'vscode-languageserver';
2
+ import { CancellationToken } from '../common/index.js';
3
+ import { TypeScriptLibrariesProvider } from '../ts-interop/TsLibrariesProvider.js';
4
+ import { WorkspaceFileSystem } from './workspace/index.js';
5
+ export declare class LanguageServer {
6
+ static readonly DefaultCancellationTokenThrottleTime = 50;
7
+ private readonly _connection;
8
+ private readonly _config;
9
+ private readonly _disposables;
10
+ private _clientCapabilities;
11
+ private _workspace;
12
+ private _isInitialized;
13
+ private _enableRequestCancellation;
14
+ private _sendRefreshDiagnosticsRequestDebounced;
15
+ private _workspaceDiagnosticsPartialResultToken;
16
+ private _fileSystemUpdateNotificationsPublisher;
17
+ private _manuallyUpdatedFileSystemTreeProvider;
18
+ private readonly _sourceFileItemsService;
19
+ private readonly _workspaceItemsService;
20
+ private _definitionService;
21
+ private _sourceGenerationService;
22
+ private readonly _referencesService;
23
+ private readonly _documentHighlightService;
24
+ private readonly _renameService;
25
+ private readonly _hoverService;
26
+ private readonly _evaluatableExpressionService;
27
+ private readonly _completionService;
28
+ private readonly _semanticTokensService;
29
+ private readonly _semanticTokenTypeIndexBySemanticTokenKind;
30
+ private readonly _protocolSemanticTokenModifierFlagByIndex;
31
+ private readonly _signatureHelpService;
32
+ private readonly _fileSystemTreeDisplayService;
33
+ private readonly _selectionRangeService;
34
+ private readonly _addPropertyAssignmentService;
35
+ constructor(config: LanguageServerConfig);
36
+ start(): void;
37
+ dispose(): void;
38
+ private onInitialize;
39
+ private onInitialized;
40
+ private onDidChangeConfiguration;
41
+ private onDidOpenTextDocument;
42
+ private onDidChangeTextDocument;
43
+ private onDidSaveTextDocument;
44
+ private onDidCloseTextDocument;
45
+ private onDidChangeWorkspaceFolders;
46
+ private onDidChangeWatchedFiles;
47
+ private onDocumentDiagnostic;
48
+ private onWorkspaceDiagnostic;
49
+ private reportDiagnostics;
50
+ private onDocumentSymbol;
51
+ private onWorkspaceSymbol;
52
+ private onDefinition;
53
+ private onReferences;
54
+ private onDocumentHighlight;
55
+ private onPrepareRename;
56
+ private onRename;
57
+ private onHover;
58
+ private convertSourceFileItemKind;
59
+ private convertDiagnostic;
60
+ private onExecuteCommand;
61
+ private onAddPropertyAssignment;
62
+ private convertSourceFileEdit;
63
+ private onGetNodeRage;
64
+ private onCreateOrUpdateSourceFile;
65
+ private onDeleteSourceFile;
66
+ private onDisplayFileSystemTree;
67
+ private onEmitCodeToString;
68
+ private onProvideInMemoryDocumentContent;
69
+ private onProvideEvaluatableExpression;
70
+ private onCompletion;
71
+ private onCompletionResolve;
72
+ private convertCompletionItem;
73
+ private convertCompletionItemKind;
74
+ private onSemanticTokens;
75
+ private onSemanticTokensRange;
76
+ private convertSemanticTokens;
77
+ private convertSemanticTokenModifiers;
78
+ private createSemanticTokenTypeIndexBySemanticTokenKind;
79
+ private getSupportedSemanticTokenTypes;
80
+ private convertSemanticTokenKind;
81
+ private createProtocolSemanticTokenModifierFlagByIndex;
82
+ private getSupportedSemanticTokenModifiers;
83
+ private convertSemanticTokenModifierFlag;
84
+ private onSignatureHelp;
85
+ private onSelectionRanges;
86
+ private convertSelectionRange;
87
+ private onRawPackageConfigurationsChanged;
88
+ private convertSourceFileRange;
89
+ private getSourceFileContext;
90
+ private convertUriToVscodeUri;
91
+ private convertVscodeUriToUri;
92
+ private createCancellationToken;
93
+ private withCancellation;
94
+ }
95
+ export interface LanguageServerConfig {
96
+ readonly connection: ls.Connection;
97
+ readonly fileSystemSynchronizationMode: FileSystemSynchronizationMode;
98
+ readonly tsLibrariesProvider: TypeScriptLibrariesProvider;
99
+ }
100
+ export type FileSystemSynchronizationMode = FileSystemSynchronizationMode.ClientSideFSWatcher | FileSystemSynchronizationMode.ClientToServerRequests;
101
+ export declare namespace FileSystemSynchronizationMode {
102
+ class ClientSideFSWatcher {
103
+ readonly fileSystem: WorkspaceFileSystem;
104
+ readonly kind = "client-side-fs-watcher";
105
+ constructor(fileSystem: WorkspaceFileSystem);
106
+ }
107
+ class ClientToServerRequests {
108
+ readonly kind = "client-to-server-requests";
109
+ }
110
+ }
111
+ export interface ArtelServerInitializeParams extends ls.InitializeParams {
112
+ initializationOptions?: ArtelServerInitializationOptions;
113
+ }
114
+ export interface ArtelServerInitializationOptions {
115
+ initiallyOpenedFileUris?: ls.URI[];
116
+ workspaceFoldersOverride?: ls.WorkspaceFolder[];
117
+ localeOverride?: string;
118
+ standardPackagesUri?: ls.URI;
119
+ }
120
+ export declare class ClientCancellationToken implements CancellationToken {
121
+ private readonly _token;
122
+ get isCancellationRequested(): boolean;
123
+ constructor(_token: ls.CancellationToken);
124
+ throwIfCancellationRequested(): void;
125
+ }
@@ -0,0 +1,132 @@
1
+ import { AccessedMethod } from '../analysis/AccessedMethod.js';
2
+ import { MatchResultValueParameter } from '../analysis/CallArgumentToParameterMatchResult.js';
3
+ import { Translation, WithLocalization } from '../analysis/Localization.js';
4
+ import { TypeIndexedAccessorDeclaration } from '../analysis/NodeTypeUtils.js';
5
+ import { Analyzer } from '../analysis/index.js';
6
+ import { ReadonlyNonEmptyArray } from '../common/index.js';
7
+ import { AliasTypeEntity, Entity, MethodEntity, MethodTypeEntity, PackageAliasEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity, VariantEntity, VariantTypeEntity } from '../entities/index.js';
8
+ import * as tree from '../tree/index.js';
9
+ import * as types from '../types/index.js';
10
+ import { TokenOrKeyword } from './TreeUtils.js';
11
+ export declare class NodeSemanticInfoService {
12
+ static ofTokenOrKeyword(analyzer: Analyzer, tokenOrKeyword: TokenOrKeyword, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
13
+ static ofDefaultMatchExpression(analyzer: Analyzer, node: tree.DefaultMatchExpression): NodeSemanticInfo | undefined;
14
+ static ofNonKeywordIdentifier(analyzer: Analyzer, node: tree.Identifier, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
15
+ static ofProperty(analyzer: Analyzer, node: tree.PropertyAccessExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
16
+ static ofQualifiedNameQualifier(analyzer: Analyzer, node: tree.QualifiedName, qualifier: tree.Identifier, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
17
+ static ofIdentifierExpression(analyzer: Analyzer, node: tree.IdentifierExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
18
+ static ofTypeConstructorDeclaration(analyzer: Analyzer, node: tree.TypeConstructorDeclaration): NodeSemanticInfo;
19
+ static ofTypeIndexerDeclaration(analyzer: Analyzer, node: TypeIndexedAccessorDeclaration): NodeSemanticInfo;
20
+ static ofIndexedAccessExpressionOperator(analyzer: Analyzer, node: tree.IndexedAccessExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
21
+ static ofAssignmentStatementOperator(analyzer: Analyzer, node: tree.AssignmentStatement, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
22
+ static ofBinaryExpressionOperator(analyzer: Analyzer, node: tree.BinaryExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
23
+ static ofNotExpressionNotKeyword(analyzer: Analyzer, node: tree.NotExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
24
+ static ofPrefixUnaryExpressionOperator(analyzer: Analyzer, node: tree.PrefixUnaryExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
25
+ static ofDereferenceOperatorDeclaration(analyzer: Analyzer, node: tree.TypeDereferencedVariableGetterDeclaration | tree.TypeDereferencedVariableSetterDeclaration): NodeSemanticInfo | undefined;
26
+ static ofDereferenceExpressionOperator(analyzer: Analyzer, node: tree.DereferenceExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
27
+ static ofAutotypeCallExpression(analyzer: Analyzer, node: tree.AutotypeCallExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
28
+ static ofObjectExpression(analyzer: Analyzer, node: tree.ObjectExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
29
+ static ofBaseExpression(analyzer: Analyzer, node: tree.BaseExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
30
+ private static ofPackageNameSegmentAccess;
31
+ private static ofMaybeConstructorCall;
32
+ private static getBetterReferenceTargetsOrPreserve;
33
+ private static getBetterReferenceTarget;
34
+ private static getContainingTranslationPackage;
35
+ }
36
+ export type NodeSemanticInfoServiceOptions = {
37
+ readonly preferredTargetOfExplicitConstructorCall: 'type-declaration' | 'constructor-declaration';
38
+ readonly includeBetterReferenceTargets: boolean;
39
+ };
40
+ export type NodeSemanticInfo = DefinitionNodeSemanticInfo | ReferenceNodeSemanticInfo | NameTranslationNodeSemanticInfo | DefaultSwitchMatchNodeSemanticInfo;
41
+ export declare class DefinitionNodeSemanticInfo {
42
+ readonly entity: Entity;
43
+ readonly kind = "definition";
44
+ constructor(entity: Entity);
45
+ }
46
+ export declare class ReferenceNodeSemanticInfo {
47
+ readonly targets: ReadonlyNonEmptyArray<WithLocalization<ReferenceTarget>>;
48
+ readonly isAmbiguous: boolean;
49
+ readonly betterTargets?: ReadonlyNonEmptyArray<WithLocalization<ReferenceTarget>> | undefined;
50
+ readonly kind = "reference";
51
+ get firstTarget(): WithLocalization<ReferenceTarget>;
52
+ get firstBetterTargetWithFallback(): WithLocalization<ReferenceTarget>;
53
+ constructor(targets: ReadonlyNonEmptyArray<WithLocalization<ReferenceTarget>>, isAmbiguous: boolean, betterTargets?: ReadonlyNonEmptyArray<WithLocalization<ReferenceTarget>> | undefined);
54
+ }
55
+ export type ReferenceTarget = EntityReferenceTarget | TypeVariableReferenceTarget | TypeValueParameterReferenceTarget | TypeConstructorReferenceTarget | TypeUnaryOperatorReferenceTarget | TypeBinaryOperatorReferenceTarget | TypeDereferenceOperatorReferenceTarget | AccessedMethodReferenceTarget | TypeIndexerReferenceTarget | MatchResultValueParameterReferenceTarget | PackageReferenceTarget | TypeContextReferenceTarget;
56
+ export declare class EntityReferenceTarget {
57
+ readonly entity: ReferencedEntity;
58
+ readonly kind = "entity";
59
+ constructor(entity: ReferencedEntity);
60
+ }
61
+ export type ReferencedEntity = VariableEntity | VariantEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
62
+ export declare class TypeVariableReferenceTarget {
63
+ readonly variable: types.Variable;
64
+ readonly kind = "type-variable";
65
+ constructor(variable: types.Variable);
66
+ }
67
+ export declare class TypeValueParameterReferenceTarget {
68
+ readonly parameter: types.ValueParameter;
69
+ readonly kind = "type-value-parameter";
70
+ constructor(parameter: types.ValueParameter);
71
+ }
72
+ export declare class TypeConstructorReferenceTarget {
73
+ readonly constructor_: types.Constructor;
74
+ readonly kind = "type-constructor";
75
+ constructor(constructor_: types.Constructor);
76
+ }
77
+ export declare class TypeUnaryOperatorReferenceTarget {
78
+ readonly operator: types.UnaryOperator;
79
+ readonly kind = "type-unary-operator";
80
+ constructor(operator: types.UnaryOperator);
81
+ }
82
+ export declare class TypeBinaryOperatorReferenceTarget {
83
+ readonly operator: types.BinaryOperator;
84
+ readonly kind = "type-binary-operator";
85
+ constructor(operator: types.BinaryOperator);
86
+ }
87
+ export declare class TypeDereferenceOperatorReferenceTarget {
88
+ readonly operator: types.DereferenceOperator;
89
+ readonly kind = "type-dereference-operator";
90
+ constructor(operator: types.DereferenceOperator);
91
+ }
92
+ export declare class AccessedMethodReferenceTarget {
93
+ readonly method: AccessedMethod;
94
+ readonly kind = "accessed-method";
95
+ constructor(method: AccessedMethod);
96
+ }
97
+ export declare class MatchResultValueParameterReferenceTarget {
98
+ readonly parameter: MatchResultValueParameter;
99
+ readonly kind = "match-result-value-parameter";
100
+ constructor(parameter: MatchResultValueParameter);
101
+ }
102
+ export declare class PackageReferenceTarget {
103
+ readonly package_: PackageEntity;
104
+ readonly kind = "package";
105
+ constructor(package_: PackageEntity);
106
+ }
107
+ export declare class TypeContextReferenceTarget {
108
+ readonly type: types.Type;
109
+ readonly typeContextKind: 'object' | 'base';
110
+ readonly kind = "type-context";
111
+ constructor(type: types.Type, typeContextKind: 'object' | 'base');
112
+ }
113
+ export declare class TypeIndexerReferenceTarget {
114
+ readonly indexer: types.Indexer;
115
+ readonly kind = "type-indexer";
116
+ constructor(indexer: types.Indexer);
117
+ }
118
+ export declare class NameTranslationNodeSemanticInfo {
119
+ readonly targets: ReadonlyNonEmptyArray<TranslationTargetEntity>;
120
+ readonly isAmbiguous: boolean;
121
+ readonly translation: Translation;
122
+ readonly kind = "name-translation";
123
+ get firstTarget(): TranslationTargetEntity;
124
+ constructor(targets: ReadonlyNonEmptyArray<TranslationTargetEntity>, isAmbiguous: boolean, translation: Translation);
125
+ }
126
+ type TranslationTargetEntity = VariableEntity | VariantEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | AliasTypeEntity;
127
+ export declare class DefaultSwitchMatchNodeSemanticInfo {
128
+ readonly type: types.Type;
129
+ readonly kind = "default-switch-match";
130
+ constructor(type: types.Type);
131
+ }
132
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Compilation } from '../project/index.js';
2
+ import { Item } from './SourceFileItemsService.js';
3
+ export declare class WorkspaceItemsService {
4
+ private readonly _sourceFileItemsService;
5
+ getItems(compilations: readonly Compilation[]): Item[];
6
+ }
@@ -0,0 +1,30 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { CancellationToken, Range } from '../common/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ export declare class ReferencesService {
5
+ getReferencesInCompilation(analyzer: Analyzer, sourceFile: SourceFile, offset: number, options: ReferencesSearchOptions, cancellationToken: CancellationToken | undefined): Promise<Reference[]>;
6
+ getReferencesInFiles(analyzer: Analyzer, sourceFile: SourceFile, offset: number, sourceFiles: Iterable<SourceFile>, options: ReferencesSearchOptions, cancellationToken: CancellationToken | undefined): Promise<Reference[]>;
7
+ private getDefinitionAndReferenceInfoAtOffset;
8
+ private getDefinitionFromNodeSemanticInfo;
9
+ private getReferenceRestrictions;
10
+ private isReferenceToDefinition;
11
+ private determineReferenceKind;
12
+ private accessKindToReferenceKind;
13
+ private isEntityWithRegularName;
14
+ }
15
+ export declare class Reference {
16
+ readonly sourceFile: SourceFile;
17
+ readonly range: Range;
18
+ readonly kind: ReferenceKind;
19
+ constructor(sourceFile: SourceFile, range: Range, kind: ReferenceKind);
20
+ }
21
+ export declare const enum ReferenceKind {
22
+ Read = 0,
23
+ Write = 1,
24
+ Declaration = 2
25
+ }
26
+ export type ReferencesSearchOptions = {
27
+ readonly onlyWithSameAlias: boolean;
28
+ readonly onlyNamed: boolean;
29
+ readonly allowAmbiguous: boolean;
30
+ };
@@ -0,0 +1,16 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { CancellationToken, Range } from '../common/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ export declare class RenameService {
5
+ private readonly _referencesService;
6
+ prepareRename(analyzer: Analyzer, sourceFile: SourceFile, offset: number): Range | undefined;
7
+ rename(analyzer: Analyzer, sourceFile: SourceFile, offset: number, newText: string, cancellationToken: CancellationToken | undefined): Promise<Rename[]>;
8
+ private canRename;
9
+ private entityCanBeRenamed;
10
+ }
11
+ export declare class Rename {
12
+ readonly sourceFile: SourceFile;
13
+ readonly range: Range;
14
+ readonly text: string;
15
+ constructor(sourceFile: SourceFile, range: Range, text: string);
16
+ }
@@ -0,0 +1,12 @@
1
+ import { Range } from '../common/index.js';
2
+ import { SourceFile } from '../project/SourceFile.js';
3
+ export declare class SelectionRangeService {
4
+ getSelectionRange(sourceFile: SourceFile, offset: number): SelectionRange | undefined;
5
+ private nodeContainsOffset;
6
+ private nodeShouldBeSkipped;
7
+ }
8
+ export declare class SelectionRange {
9
+ readonly range: Range;
10
+ readonly parent: SelectionRange | undefined;
11
+ constructor(range: Range, parent: SelectionRange | undefined);
12
+ }
@@ -0,0 +1,40 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { CancellationToken, Range } from '../common/index.js';
3
+ import { SourceFile } from '../project/index.js';
4
+ export declare class SemanticTokensService {
5
+ getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFile, cancellationToken: CancellationToken | undefined): Promise<SemanticToken[]>;
6
+ getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFile, range: Range, cancellationToken: CancellationToken | undefined): Promise<SemanticToken[]>;
7
+ private rangesOverlap;
8
+ private getSemanticTokenKindForMethodEntity;
9
+ private isCapitalizedName;
10
+ }
11
+ export declare class SemanticToken {
12
+ readonly range: Range;
13
+ readonly kind: SemanticTokenKind;
14
+ readonly modifiers: SemanticTokenModifiers;
15
+ constructor(range: Range, kind: SemanticTokenKind, modifiers: SemanticTokenModifiers);
16
+ }
17
+ export declare class SemanticTokenModifiers {
18
+ private _flags;
19
+ get flags(): number;
20
+ makeConst(): this;
21
+ makeDeclaration(): this;
22
+ makeCapitalized(): this;
23
+ setCapitalized(value: boolean): this;
24
+ }
25
+ export declare const enum SemanticTokenKind {
26
+ MethodBlockLiteralParameter = 0,
27
+ SpecialVariable = 1,
28
+ SpecialMethod = 2,
29
+ Variant = 3,
30
+ PackageMethod = 4,
31
+ NestedMethod = 5,
32
+ TypeMethod = 6
33
+ }
34
+ export declare const supportedSemanticTokens: SemanticTokenKind[];
35
+ export declare const enum SemanticTokenModifierFlag {
36
+ Const = 1,
37
+ Declaration = 2,
38
+ Capitalized = 4
39
+ }
40
+ export declare const supportedSemanticTokenModifiers: SemanticTokenModifierFlag[];
@@ -0,0 +1,42 @@
1
+ import { Range } from '../common/index.js';
2
+ import { SourceFile } from '../project/index.js';
3
+ export declare class SourceFileItemsService {
4
+ private _sourceFile;
5
+ getItems(sourceFile: SourceFile): Item[];
6
+ private get locale();
7
+ private get dialect();
8
+ private getChildItems;
9
+ private createItem;
10
+ private getNameOrStubIfEmpty;
11
+ }
12
+ export declare class Item {
13
+ readonly kind: ItemKind;
14
+ readonly name: string;
15
+ readonly range: Range;
16
+ readonly selectionRange: Range;
17
+ readonly items: readonly Item[];
18
+ readonly sourceFile: SourceFile;
19
+ constructor(kind: ItemKind, name: string, range: Range, selectionRange: Range, items: readonly Item[], sourceFile: SourceFile);
20
+ }
21
+ export declare const enum ItemKind {
22
+ PackageAlias = 0,
23
+ PackageVariable = 1,
24
+ PackageVariableGetter = 2,
25
+ PackageVariableSetter = 3,
26
+ PackageMethod = 4,
27
+ StructuredType = 5,
28
+ MethodType = 6,
29
+ VariantType = 7,
30
+ InvalidType = 8,
31
+ Variant = 9,
32
+ TypeConstructor = 10,
33
+ TypeDestructor = 11,
34
+ TypeVariable = 12,
35
+ TypeVariableGetter = 13,
36
+ TypeVariableSetter = 14,
37
+ TypeMethod = 15,
38
+ TypeIndexedGetter = 16,
39
+ TypeIndexedSetter = 17,
40
+ TypeParameter = 18,
41
+ NestedMethod = 19
42
+ }
@@ -0,0 +1,23 @@
1
+ import { TextDocument } from 'vscode-languageserver-textdocument';
2
+ import { Analyzer } from '../analysis/index.js';
3
+ import { Range } from '../common/index.js';
4
+ import { SourceFile } from '../project/index.js';
5
+ export declare class TranslationService {
6
+ private readonly _translationCache;
7
+ constructor();
8
+ translateSourceFile(analyzer: Analyzer, sourceFile: SourceFile, localeText: string): Translation;
9
+ clearTranslationCache(): void;
10
+ private translateIdentifier;
11
+ private translateKeywords;
12
+ private translateReservedIdentifier;
13
+ private createRangeMaps;
14
+ private getTranslationId;
15
+ }
16
+ export type Translation = {
17
+ translatedDocument: TextDocument;
18
+ rangeMaps: RangeMap[];
19
+ };
20
+ export type RangeMap = {
21
+ sourceRange: Range;
22
+ translationRange: Range;
23
+ };
@@ -0,0 +1,58 @@
1
+ import * as tree from '../tree/index.js';
2
+ /**
3
+ * Получить самый правый токен, для которого `rangeWithoutTrivia.end <= offset`.
4
+ */
5
+ export declare function getPrecedingToken(sourceFile: tree.SourceFile, offset: number): tree.Token | undefined;
6
+ /**
7
+ * Возвращает токен, для которого `offset >= range.start` и `offset < range.end`,
8
+ * или токен конца файла (`TokenKind.EndOfFile`) если смещение находится в конце файла.
9
+ */
10
+ export declare function getTokenAtOffset(sourceFile: tree.SourceFile, offset: number, searchInTrivia: boolean): tree.Token | undefined;
11
+ /**
12
+ * Возвращает не пустой токен или ключевое слово, для которых `offset >= rangeWithoutTrivia.start` и `offset <= rangeWithoutTrivia.end`.
13
+ *
14
+ * Если смещение находится между двумя токенами / ключевыми словами (например а|.б), то возвращаются оба.
15
+ */
16
+ export declare function getTokenOrKeywordsTouchingOffset(sourceFile: tree.SourceFile, offset: number): TokenOrKeywordsTouchingOffset;
17
+ export declare class TokenOrKeyword {
18
+ readonly value: tree.Token | tree.Keyword;
19
+ get parent(): tree.Node;
20
+ constructor(value: tree.Token | tree.Keyword);
21
+ isToken<T extends tree.TokenKind>(kind?: T): this is TokenOrKeyword & {
22
+ value: tree.Token<T>;
23
+ };
24
+ isKeyword<T extends tree.KeywordKind>(kind?: tree.KeywordKind): this is TokenOrKeyword & {
25
+ value: tree.Keyword<T>;
26
+ };
27
+ equals(other: TokenOrKeyword): boolean;
28
+ }
29
+ export type TokenOrKeywordsTouchingOffset = TokenOrKeywordsTouchingOffset_none | TokenOrKeywordsTouchingOffset_single | TokenOrKeywordsTouchingOffset_two;
30
+ export declare class TokenOrKeywordsTouchingOffset_none implements ITokenOrKeywordsTouchingOffset {
31
+ readonly kind = "none";
32
+ getSinglePrioritizingNamed(): TokenOrKeyword | undefined;
33
+ getSingleWithHighestPriority(_getPriority: (token: TokenOrKeyword) => number): TokenOrKeyword | undefined;
34
+ }
35
+ export declare class TokenOrKeywordsTouchingOffset_single implements ITokenOrKeywordsTouchingOffset {
36
+ readonly value: TokenOrKeyword;
37
+ readonly kind = "single";
38
+ constructor(value: TokenOrKeyword);
39
+ getSinglePrioritizingNamed(): TokenOrKeyword | undefined;
40
+ getSingleWithHighestPriority(_getPriority: (token: TokenOrKeyword) => number): TokenOrKeyword | undefined;
41
+ }
42
+ export declare class TokenOrKeywordsTouchingOffset_two implements ITokenOrKeywordsTouchingOffset {
43
+ readonly left: TokenOrKeyword;
44
+ readonly right: TokenOrKeyword;
45
+ readonly kind = "two";
46
+ constructor(left: TokenOrKeyword, right: TokenOrKeyword);
47
+ getSinglePrioritizingNamed(): TokenOrKeyword | undefined;
48
+ getSingleWithHighestPriority(getPriority: (token: TokenOrKeyword) => number): TokenOrKeyword | undefined;
49
+ }
50
+ interface ITokenOrKeywordsTouchingOffset {
51
+ getSinglePrioritizingNamed(): TokenOrKeyword | undefined;
52
+ getSingleWithHighestPriority(getPriority: (token: TokenOrKeyword) => number): TokenOrKeyword | undefined;
53
+ }
54
+ /**
55
+ * Возвращает trivia, для которого `offset >= range.start` и `offset < range.end`.
56
+ */
57
+ export declare function getTriviaAtOffset(sourceFile: tree.SourceFile, offset: number): tree.Trivia | undefined;
58
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { SourceFile } from '../project/index.js';
3
+ import { AnonymousMethodTypeDeclaration, AnonymousStructuredTypeDeclaration, AnonymousVariantTypeDeclaration, PackageAliasTypeDeclaration, PackageMethodTypeDeclaration, PackageStructuredTypeDeclaration, PackageVariantTypeDeclaration, TypeParameterDeclaration } from '../tree/index.js';
4
+ import { RangeLocation } from './Types.js';
5
+ export declare class TypeDefinitionService {
6
+ getTypeDefinition(analyzer: Analyzer, sourceFile: SourceFile, offset: number): RangeLocation | undefined;
7
+ private getTypeDefinitionAtIdentifier;
8
+ }
9
+ export type TypeDeclaration = PackageStructuredTypeDeclaration | AnonymousStructuredTypeDeclaration | PackageMethodTypeDeclaration | AnonymousMethodTypeDeclaration | PackageVariantTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | TypeParameterDeclaration;
@@ -0,0 +1,22 @@
1
+ import { Range, Uri } from '../common/index.js';
2
+ import { SourceFile } from '../project/index.js';
3
+ export type RangeLocation = {
4
+ uri: Uri;
5
+ range: Range;
6
+ };
7
+ export declare class SourceLocation {
8
+ readonly sourceFile: SourceFile;
9
+ readonly range: Range;
10
+ constructor(sourceFile: SourceFile, range: Range);
11
+ }
12
+ export type CompletionItemData = {
13
+ cacheId: number;
14
+ indexInCache: number;
15
+ };
16
+ export declare function isCompletionItemData(value: unknown): value is CompletionItemData;
17
+ export declare class SourceFileEdit {
18
+ readonly sourceFile: SourceFile;
19
+ readonly range: Range;
20
+ readonly text: string;
21
+ constructor(sourceFile: SourceFile, range: Range, text: string);
22
+ }
@@ -0,0 +1,5 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { Entity } from '../entities/index.js';
3
+ import { SourceLocation } from './Types.js';
4
+ export declare function getEntitySourceLocations(analyzer: Analyzer, entity: Entity): SourceLocation[] | undefined;
5
+ export declare function debounce(timeMs: number, action: () => void): () => void;
@@ -0,0 +1,17 @@
1
+ import { Analyzer } from '../../analysis/index.js';
2
+ import { Range } from '../../common/index.js';
3
+ import { SourceFile } from '../../project/index.js';
4
+ export declare class SignatureHelpService {
5
+ getSignatureHelp(analyzer: Analyzer, sourceFile: SourceFile, offset: number): SignatureHelp | undefined;
6
+ }
7
+ export declare class SignatureHelp {
8
+ readonly signatures: readonly SignatureInfo[];
9
+ readonly activeSignatureIndex: number;
10
+ constructor(signatures: readonly SignatureInfo[], activeSignatureIndex: number);
11
+ }
12
+ export declare class SignatureInfo {
13
+ readonly label: string;
14
+ readonly parameterRanges: readonly Range[];
15
+ readonly activeParameterIndex: number;
16
+ constructor(label: string, parameterRanges: readonly Range[], activeParameterIndex: number);
17
+ }