@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,10 @@
1
+ export declare class Range {
2
+ readonly start: number;
3
+ readonly end: number;
4
+ get length(): number;
5
+ get isEmpty(): boolean;
6
+ constructor(start: number, end: number);
7
+ includes(offset: number): boolean;
8
+ equals(other: Range): boolean;
9
+ static empty(start: number): Range;
10
+ }
@@ -0,0 +1,13 @@
1
+ export type Result<TOk, TError> = Result.Ok<TOk> | Result.Error<TError>;
2
+ export declare namespace Result {
3
+ class Ok<T> {
4
+ readonly value: T;
5
+ readonly kind = "ok";
6
+ constructor(value: T);
7
+ }
8
+ class Error<T> {
9
+ readonly error: T;
10
+ readonly kind = "error";
11
+ constructor(error: T);
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ import { Name } from './Name.js';
2
+ export declare class SearchName {
3
+ readonly value: Name;
4
+ /**
5
+ * Это имя, допускающее объявления только на языке оригинала? (прим.: ~имя)
6
+ */
7
+ readonly isStrictlyOriginal: boolean;
8
+ constructor(value: Name,
9
+ /**
10
+ * Это имя, допускающее объявления только на языке оригинала? (прим.: ~имя)
11
+ */
12
+ isStrictlyOriginal: boolean);
13
+ }
@@ -0,0 +1,17 @@
1
+ import { CancellationToken } from './index.js';
2
+ export declare class ThrottledCancellationToken {
3
+ private readonly _token;
4
+ private readonly _throttleTimeMs;
5
+ private readonly _checkThrottleTimeEveryN;
6
+ private _checkNumber;
7
+ private _lastTimeMs;
8
+ constructor(_token: CancellationToken, _throttleTimeMs: number, _checkThrottleTimeEveryN: number);
9
+ isThrottleTimeOver(): boolean;
10
+ throwIfCancellationRequestedAndReset(): void;
11
+ throwIfCancellationRequestedAndResetAsync(): Promise<void>;
12
+ withOptions(options: ThrottledCancellationTokenOptions): ThrottledCancellationToken;
13
+ }
14
+ export interface ThrottledCancellationTokenOptions {
15
+ throttleTimeMs?: number;
16
+ checkThrottleTimeEveryN?: number;
17
+ }
@@ -0,0 +1,53 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { StructuredTypeDeclaration, VariantTypeDeclaration } from '../analysis/NodeTypeUtils.js';
3
+ import { Entity, PackageEntity, TypeEntity, TypeEntityWithMembers } from '../entities/index.js';
4
+ import { SourceFile } from '../project/index.js';
5
+ import * as tree from '../tree/index.js';
6
+ export declare abstract class TreeQuery {
7
+ protected abstract get node(): tree.Node;
8
+ static fromNode(node: tree.Node): NodeQuery;
9
+ static fromTypeMemberDeclaration(node: tree.TypeMemberDeclaration): TypeMemberDeclarationQuery;
10
+ sourceFile(): tree.SourceFile;
11
+ projectSourceFile(analyzer: Analyzer): SourceFile;
12
+ packageEntity(analyzer: Analyzer): PackageEntity;
13
+ containingEntity(analyzer: Analyzer): Entity;
14
+ }
15
+ declare class NodeQuery extends TreeQuery {
16
+ private readonly _node;
17
+ constructor(_node: tree.Node);
18
+ protected get node(): tree.Node;
19
+ }
20
+ declare class TypeMemberDeclarationQuery extends TreeQuery {
21
+ private readonly _node;
22
+ constructor(_node: tree.TypeMemberDeclaration);
23
+ protected get node(): tree.Node;
24
+ container(): TypeMemberDeclarationContainer;
25
+ }
26
+ export type TypeMemberDeclarationContainer = TypeMemberDeclarationContainer_type | TypeMemberDeclarationContainer_typeExtension;
27
+ declare class TypeMemberDeclarationContainer_type implements ITypeMemberDeclarationContainer {
28
+ readonly declaration: StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration;
29
+ readonly memberBlock: tree.TypeMemberDeclarationBlock;
30
+ readonly kind = "type";
31
+ constructor(declaration: StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration, memberBlock: tree.TypeMemberDeclarationBlock);
32
+ getNode(): StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration;
33
+ getMemberBlock(): tree.TypeMemberDeclarationBlock;
34
+ getTypeEntity(analyzer: Analyzer): TypeEntityWithMembers;
35
+ getContextualTypeEntity(analyzer: Analyzer): TypeEntity | undefined;
36
+ }
37
+ declare class TypeMemberDeclarationContainer_typeExtension implements ITypeMemberDeclarationContainer {
38
+ readonly declaration: tree.TypeExtensionDeclaration;
39
+ readonly memberBlock: tree.TypeMemberDeclarationBlock;
40
+ readonly kind = "type-extension";
41
+ constructor(declaration: tree.TypeExtensionDeclaration, memberBlock: tree.TypeMemberDeclarationBlock);
42
+ getNode(): tree.TypeExtensionDeclaration;
43
+ getMemberBlock(): tree.TypeMemberDeclarationBlock;
44
+ getTypeEntity(_analyzer: Analyzer): TypeEntityWithMembers | undefined;
45
+ getContextualTypeEntity(analyzer: Analyzer): TypeEntity | undefined;
46
+ }
47
+ interface ITypeMemberDeclarationContainer {
48
+ getNode(): StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeExtensionDeclaration;
49
+ getMemberBlock(): tree.TypeMemberDeclarationBlock;
50
+ getTypeEntity(analyzer: Analyzer): TypeEntityWithMembers | undefined;
51
+ getContextualTypeEntity(analyzer: Analyzer): TypeEntity | undefined;
52
+ }
53
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as tree from '../tree/index.js';
2
+ import { CancellationToken } from './index.js';
3
+ export declare function traverseTreeWithCancellationToken(root: tree.Node, cancellationToken: CancellationToken | undefined, throttleTimeMs: number, visitNodeCb: (node: tree.Node, controller: TraversalController) => void): Promise<void>;
4
+ export declare function traverseTree(root: tree.Node, visitNodeCb: (node: tree.Node, controller: TraversalController) => void): void;
5
+ export declare class TraversalController {
6
+ isTraverseStopped: boolean;
7
+ isChildrenTraverseStopped: boolean;
8
+ shouldYieldExecution: boolean;
9
+ stopTraverse(): void;
10
+ stopChildrenTraverse(): void;
11
+ yieldExecutionAfterCurrentNode(): void;
12
+ reset(): void;
13
+ }
@@ -0,0 +1,28 @@
1
+ export declare class Uri {
2
+ readonly scheme: string;
3
+ readonly segments: string[];
4
+ constructor(scheme: string, segments: string[]);
5
+ static empty(scheme: string): Uri;
6
+ static fromString(uri: string): Uri;
7
+ isEmpty(): boolean;
8
+ isJust(segment: string): boolean;
9
+ parentUri(): Uri | undefined;
10
+ get lastSegment(): string | undefined;
11
+ get segmentBeforeLast(): string | undefined;
12
+ append(segment: string): Uri;
13
+ append(segments: string[]): Uri;
14
+ replaceLastSegment(segment: string): Uri;
15
+ equals(uri: Uri): boolean;
16
+ checkIfRelativeTo(uri: Uri): UrisRelativityKind;
17
+ getSegmentsRelativeTo(uri: Uri): string[] | undefined;
18
+ /**
19
+ * Метод toString() предназначен для отображения Uri в текстовых сообщениях, а также для случаев, когда Uri
20
+ * используется в качестве ключа словаря.
21
+ */
22
+ toString(): string;
23
+ }
24
+ export declare const enum UrisRelativityKind {
25
+ Equal = 0,
26
+ Relative = 1,
27
+ NotRelativeOrEqual = 2
28
+ }
@@ -0,0 +1,41 @@
1
+ import { Uri } from './Uri.js';
2
+ export declare class UriTree<T> {
3
+ private readonly _roots;
4
+ add(uri: Uri, data: T): void;
5
+ /**
6
+ * @returns элемент если он существовал, иначе `undefined`.
7
+ */
8
+ delete(uri: Uri): T | undefined;
9
+ getItem(uri: Uri): T | undefined;
10
+ enumerateRoots(): Iterable<{
11
+ uri: Uri;
12
+ value: T;
13
+ }>;
14
+ enumerateChildren(uri: Uri): Iterable<{
15
+ uri: Uri;
16
+ value: T;
17
+ }>;
18
+ traverse(uri: Uri, f: (node: Node<T>) => void): readonly string[];
19
+ forEachItem(f: (item: T) => void): void;
20
+ enumerateItems(rootUri?: Uri): Iterable<{
21
+ uri: Uri;
22
+ value: T;
23
+ }>;
24
+ private getNode;
25
+ private getOrCreateRootNode;
26
+ private getRootNode;
27
+ }
28
+ declare class Node<T> {
29
+ readonly uri: Uri;
30
+ private _data;
31
+ private readonly _children;
32
+ constructor(uri: Uri, _data: T | undefined);
33
+ get item(): T | undefined;
34
+ getChild(segment: string): Node<T> | undefined;
35
+ getOrAddChild(segment: string, factory: () => Node<T>): Node<T>;
36
+ addChild(segment: string, node: Node<T>): void;
37
+ deleteChild(segment: string): void;
38
+ setData(data: T): void;
39
+ getChildren(): Iterable<Node<T>>;
40
+ }
41
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function getUserLocale(): string;
2
+ export declare function setUserLocale(locale?: string): void;
@@ -0,0 +1,19 @@
1
+ import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
+ export type WithDiagnostics<T> = WithDiagnostics_ok<T> | WithDiagnostics_error<T>;
3
+ export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
4
+ readonly value: T;
5
+ readonly kind = "ok";
6
+ constructor(value: T);
7
+ toNullable(): T | undefined;
8
+ }
9
+ export declare class WithDiagnostics_error<T> implements IWithDiagnostics<T> {
10
+ readonly kind = "error";
11
+ readonly value: readonly Diagnostic[];
12
+ constructor(diagnostic: Diagnostic);
13
+ constructor(diagnostics: readonly Diagnostic[]);
14
+ toNullable(): T | undefined;
15
+ }
16
+ interface IWithDiagnostics<T> {
17
+ toNullable(): T | undefined;
18
+ }
19
+ export {};
@@ -0,0 +1 @@
1
+ export declare function yieldExecution(timeMs?: number): Promise<void>;
@@ -0,0 +1,32 @@
1
+ export * from './AccessKind.js';
2
+ export * from './ArtelFileCheck.js';
3
+ export * from './Cached.js';
4
+ export * from './CancellationToken.js';
5
+ export * from './Constants.js';
6
+ export * from './Debug.js';
7
+ export * from './Delayed.js';
8
+ export * from './FormatString.js';
9
+ export * from './Interner.js';
10
+ export * from './Lazy.js';
11
+ export * from './LocalizationHelper.js';
12
+ export * from './Logger.js';
13
+ export * from './Name.js';
14
+ export * from './NameFormatConversion.js';
15
+ export * from './NonEmptyArray.js';
16
+ export * from './Option.js';
17
+ export * from './PackageLocale.js';
18
+ export * from './PackageDialect.js';
19
+ export * from './Path.js';
20
+ export * from './PerformanceMeasurement.js';
21
+ export * from './Query.js';
22
+ export * from './Range.js';
23
+ export * from './Result.js';
24
+ export * from './SearchName.js';
25
+ export * from './ThrottledCancellationToken.js';
26
+ export * from './TreeQuery.js';
27
+ export * from './TreeTraversal.js';
28
+ export * from './Uri.js';
29
+ export * from './UriTree.js';
30
+ export * from './UserLocale.js';
31
+ export * from './WithDiagnostics.js';
32
+ export * from './YieldExecution.js';
@@ -0,0 +1,21 @@
1
+ import { Range } from '../common/index.js';
2
+ import { TextFile } from '../project/TextFile.js';
3
+ import { DiagnosticData } from './DiagnosticData.js';
4
+ export declare class Diagnostic {
5
+ readonly data: DiagnosticData;
6
+ readonly location: DiagnosticLocation | undefined;
7
+ constructor(data: DiagnosticData, location: DiagnosticLocation | undefined);
8
+ }
9
+ export declare class DiagnosticLocation {
10
+ readonly range: Range;
11
+ readonly file: TextFile;
12
+ constructor(range: Range, file: TextFile);
13
+ }
14
+ export interface DiagnosticAcceptor {
15
+ addDiagnostic(diagnostic: Diagnostic): void;
16
+ }
17
+ export declare class AccumulatingDiagnosticAcceptor implements DiagnosticAcceptor {
18
+ readonly items: Diagnostic[];
19
+ constructor(items?: Diagnostic[]);
20
+ addDiagnostic(diagnostic: Diagnostic): void;
21
+ }
@@ -0,0 +1,146 @@
1
+ export declare enum DiagnosticCode {
2
+ IdentifierExpected = 0,
3
+ TypeNameExpected = 1,
4
+ PackageNameExpected = 2,
5
+ IdentifierWithoutPrimeSymbolExpected = 3,
6
+ TypeMemberDeclarationExpected = 4,
7
+ SourceFileMemberExpected = 5,
8
+ EnumerationVariableDeclarationExpected = 6,
9
+ StatementExpected = 7,
10
+ ExpressionExpected = 8,
11
+ BaseTypeNameExpected = 9,
12
+ VariantDeclarationExpected = 10,
13
+ TypeSpecifierExpected = 11,
14
+ TypeBodyExpected = 12,
15
+ MethodCallArgumentExpected = 13,
16
+ TagArgumentExpected = 14,
17
+ TypeParameterExpected = 15,
18
+ ParameterExpected = 16,
19
+ RunStatementClauseExpected = 17,
20
+ PackageImportExpected = 18,
21
+ UsingDirectiveOrSourceFileMemberExpected = 19,
22
+ WordFormExpected = 20,
23
+ TypeMemberTranslationExpected = 21,
24
+ TranslationExpected = 22,
25
+ Expected0But1Found = 23,
26
+ InvalidTextTemplateLiteral = 24,
27
+ RunKeywordOnCreateKeywordOrModifierListExpected = 25,
28
+ ModifierListExpected = 26,
29
+ HidingLevelExpected = 27,
30
+ PropertyOrElementAccessExpected = 28,
31
+ VariantNotFound = 29,
32
+ TypeCannotBeUsedAsValue = 30,
33
+ PackageMemberNotFound = 31,
34
+ CannotAccessMembersOfUnresolvedPackage = 32,
35
+ TypeMemberNotFound = 33,
36
+ CannotAccessMembersOnMethodType = 34,
37
+ CannotAccessStaticMembersOnTypeParameter = 35,
38
+ CannotAccessStaticMembersOnUnionType = 36,
39
+ CannotAccessMembersOnUnresolvedType = 37,
40
+ CannotAccessInstanceMembersOnVariantType = 38,
41
+ CannotAccessInstanceMembersOnTypeParameterWithoutConstraint = 39,
42
+ CannotAccessIndexerOnVariantType = 40,
43
+ CannotAccessIndexerOnMethodType = 41,
44
+ CannotAccessIndexerOnTypeParameter = 42,
45
+ CannotAccessIndexerOnUnresolvedType = 43,
46
+ IndexerOfTheSpecifiedTypeNotFound = 44,
47
+ DereferenceOperatorOfTheSpecifiedTypeNotFound = 45,
48
+ IndexedGetterNotFound = 46,
49
+ IndexedSetterNotFound = 47,
50
+ IndexerNotFound = 48,
51
+ CannotCreateInstanceOfAspect = 49,
52
+ CannotCreateInstanceOfVariantType = 50,
53
+ CannotCreateInstanceOfMethodType = 51,
54
+ CannotCreateInstanceOfTypeParameter = 52,
55
+ CannotCreateInstanceOfUnresolvedType = 53,
56
+ CannotCreateInstanceOfInvalidType = 54,
57
+ TypeConstructorNotFound = 55,
58
+ CannotInvokeExpression = 56,
59
+ NamedArgumentExpectedButPositionalArgumentFound = 57,
60
+ ParameterWithGivenNameNotFound = 58,
61
+ ArgumentForParameterAlreadyPassed = 59,
62
+ PackageAliasCannotBeUsedAsValue = 60,
63
+ PackageNameCannotBeUsedAsValue = 61,
64
+ UnknownVariable = 62,
65
+ UnknownType = 63,
66
+ TypeWithArity0NotFound = 64,
67
+ CannotAccessMembersOnInvalidType = 65,
68
+ CannotAccessIndexerOnInvalidType = 66,
69
+ VariableUsedBeforeBeingDeclared = 67,
70
+ Type0IsNotAssignableToType1 = 68,
71
+ VariableNotFound = 69,
72
+ MethodNotFound = 70,
73
+ PackageAliasNotFound = 71,
74
+ VariantAliasExpected = 72,
75
+ UnknownPackage = 73,
76
+ CannotAssignValueToExpression = 74,
77
+ NotEveryRequiredParameterIsProvidedWithCallArgument = 75,
78
+ ParameterForPositionalCallArgumentNotFound = 76,
79
+ AliasTypeAliasMustNotContainMemberAliases = 77,
80
+ InvalidTypeAliasMustNotContainMemberAliases = 78,
81
+ CannotUseSpecialNameForLocalDeclaration = 79,
82
+ SpecialNameIsNotAllowed = 80,
83
+ MultipleValuesFound = 81,
84
+ CannotDetermineTargetTypeToCallTheConstructor = 82,
85
+ AmbiguousAccess = 83,
86
+ PackageNameConflictsWithDeclarationName = 84,
87
+ CannotAccessVariableDueToItsAccessibilityLevel = 85,
88
+ CannotAccessMethodDueToItsAccessibilityLevel = 86,
89
+ CannotAccessTypeDueToItsAccessibilityLevel = 87,
90
+ CanNotAssignValueToContextVariable = 88,
91
+ ExpectedPackageNameOrAliasButFoundType = 89,
92
+ TypeExpected = 90,
93
+ TypeOrPackageNotFound = 91,
94
+ TypeIsNotATag = 92,
95
+ ExpressionOfType0CanNotBeUsedForEnumeration = 93,
96
+ Operator0IsNotDefinedForTypes1And2 = 94,
97
+ Operator0IsNotDefinedForType1 = 95,
98
+ VariantMustHaveAssociatedValue = 96,
99
+ AssociatedValueMustBeANumberOrTextLiteral = 97,
100
+ PackageMemberOrPackageNotFound = 98,
101
+ TranslationsCanOnlyBeDeclaredInTranslationPackage = 99,
102
+ UnknownTranslatedPackage0 = 100,
103
+ BaseCannotBeUsedInThisContext = 101,
104
+ OverriddenMethodNotFound = 102,
105
+ ObjectCannotBeUsedInThisContext = 103,
106
+ BaseCannotBeUsedAsAnExpressionInItself = 104,
107
+ InterfacePackageMustNotContainImplementation = 105,
108
+ InterfacePackageVariablesMustNotHaveInitializers = 106,
109
+ InterfacePackageVariablesMustNotHaveAccessors = 107,
110
+ InterfacePackageIndexersMustNotHaveAccessors = 108,
111
+ BodyIsMissing = 109,
112
+ AbstractTypeMembersMustNotHaveBody = 110,
113
+ AbstractIndexersMustNotHaveAccessors = 111,
114
+ AbstractVariablesMustNotHaveInitializers = 112,
115
+ AbstractVariablesMustNotHaveAccessors = 113,
116
+ AccessorsAreMissing = 114,
117
+ PackageIsAlreadyImportedInAnotherLanguage = 115,
118
+ OnlySubprogramsWithReturnTypeCanReturnValue = 116,
119
+ MethodsUsingYieldStatementCanNotReturnValue = 117,
120
+ YieldStatementCanNotBeUsedInAnonymousMethods = 118,
121
+ YieldStatementCanNotBeUsedHere = 119,
122
+ MethodsUsingYieldStatementMustHaveEnumerableAsReturnType = 120,
123
+ YieldStatementCanNotBeUsedInRunStatementThatHasOnErrorClause = 121,
124
+ YieldStatementCanNotBeUsedInFinallyClause = 122,
125
+ SubprogramMustReturnValue = 123,
126
+ ResultVariableCanNotBeUsedInMethodsUsingYieldStatement = 124,
127
+ TypeAliasReferencesItself = 125,
128
+ TypeParameterHasCircularConstraint = 126,
129
+ BaseTypeCausesInheritanceCycle = 127,
130
+ OnlyGenericTypesAndFunctionsCanBeSpecialized = 128,
131
+ Expected0TypeArguments = 129,
132
+ ExpectedFrom0To1TypeArguments = 130,
133
+ Type0IsNotAssignableToConstraint1 = 131,
134
+ VariableIsDeclaredButNotUsed = 132,
135
+ DefaultConstructorArgumentsMustBeNamed = 133,
136
+ IncorrectBodyOfRedefinableAliasTypeMethod = 134,
137
+ TheFollowingDeclarationsAreNotTranslated0 = 135,
138
+ TheFollowingDeclarationAreNotTranslated0And1More = 136,
139
+ CanNotFindTsLibDirectoryBaseSearchPaths0 = 137,
140
+ SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 138,
141
+ MainPackageConfigurationIsMissingProjectWontBeLoaded = 139,
142
+ ProgramWithoutMainPackageCanNotBeCompiled = 140,
143
+ JsonConfigurationValidationError = 141,
144
+ StandardPackage0NotFound = 142,
145
+ Declaration0NotFoundInStandardPackage1 = 143
146
+ }
@@ -0,0 +1,20 @@
1
+ import { DiagnosticCode } from './DiagnosticCode.js';
2
+ export declare class DiagnosticData {
3
+ readonly code: DiagnosticCode;
4
+ readonly message: string;
5
+ readonly kind: DiagnosticKind;
6
+ readonly flags: DiagnosticFlags;
7
+ constructor(code: DiagnosticCode, message: string, kind: DiagnosticKind, flags: DiagnosticFlags);
8
+ static withCode(code: DiagnosticCode, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): DiagnosticData;
9
+ }
10
+ export declare const enum DiagnosticKind {
11
+ Error = 0,
12
+ Warning = 1,
13
+ Information = 2,
14
+ Hint = 3
15
+ }
16
+ export declare const enum DiagnosticFlags {
17
+ None = 0,
18
+ Unused = 1,
19
+ Deprecated = 2
20
+ }
@@ -0,0 +1,8 @@
1
+ import { Uri } from '../common/index.js';
2
+ import { Diagnostic } from './Diagnostic.js';
3
+ export declare class DiagnosticFormatter {
4
+ static format(diagnostic: Diagnostic, options?: FormatDiagnosticOptions): string;
5
+ }
6
+ export interface FormatDiagnosticOptions {
7
+ convertUri?(uri: Uri): string;
8
+ }
@@ -0,0 +1,19 @@
1
+ import { Range } from '../common/index.js';
2
+ import { TextFile } from '../project/TextFile.js';
3
+ import { Diagnostic, DiagnosticAcceptor } from './Diagnostic.js';
4
+ import { DiagnosticData } from './DiagnosticData.js';
5
+ export declare class RangeDiagnostic {
6
+ readonly data: DiagnosticData;
7
+ readonly range: Range;
8
+ constructor(data: DiagnosticData, range: Range);
9
+ }
10
+ export interface RangeDiagnosticAcceptor {
11
+ addDiagnostic(diagnostic: RangeDiagnostic): void;
12
+ }
13
+ export declare class RangeDiagnosticConverter implements RangeDiagnosticAcceptor {
14
+ private readonly _file;
15
+ private readonly _diagnosticAcceptor;
16
+ constructor(_file: TextFile, _diagnosticAcceptor: DiagnosticAcceptor | undefined);
17
+ static convert(diagnostic: RangeDiagnostic, file: TextFile): Diagnostic;
18
+ addDiagnostic(diagnostic: RangeDiagnostic): void;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { statementTransformationResult } from './Internal.js';
2
+ import { BlockStatement } from './ir/index.js';
3
+ export type Type = {
4
+ kind: statementTransformationResult.Kind.Preserve;
5
+ } | {
6
+ kind: statementTransformationResult.Kind.Replace;
7
+ statement: BlockStatement;
8
+ };
9
+ export declare function preserve(): Type;
10
+ export declare function replace(statement: BlockStatement): Type;
@@ -0,0 +1 @@
1
+ export declare const CustomModuleLoaderCode = "// https://github.com/nodejs/loaders-test/blob/ed9a48ee2823816916f429fbce9553f2e8d3dad4/commonjs-extension-resolution-loader/loader.js\n\nimport { builtinModules } from 'node:module.js';\nimport { dirname } from 'node:path.js';\nimport { cwd } from 'node:process.js';\nimport { fileURLToPath, pathToFileURL } from 'node:url.js';\nimport { promisify } from 'node:util.js';\n\nimport resolveCallback from 'resolve/async.js.js';\n\nconst resolveAsync = promisify(resolveCallback);\n\nconst baseURL = pathToFileURL(cwd() + '/').href;\n\n\nexport async function resolve(specifier, context, next) {\n const { parentURL = baseURL } = context;\n\n if (specifier.startsWith('node:') || builtinModules.includes(specifier)) {\n return next(specifier, context);\n }\n\n // `resolveAsync` works with paths, not URLs\n if (specifier.startsWith('file://')) {\n specifier = fileURLToPath(specifier);\n }\n const parentPath = fileURLToPath(parentURL);\n\n let url;\n try {\n const resolution = await resolveAsync(specifier, {\n basedir: dirname(parentPath),\n // For whatever reason, --experimental-specifier-resolution=node doesn't search for .mjs extensions\n // but it does search for index.mjs files within directories\n extensions: ['.js', '.mjs'],\n });\n url = pathToFileURL(resolution).href;\n } catch (error) {\n if (error.code === 'MODULE_NOT_FOUND') {\n // Match Node's error code\n error.code = 'ERR_MODULE_NOT_FOUND';\n }\n throw error;\n }\n\n return next(url, context);\n}\n";
@@ -0,0 +1,10 @@
1
+ import * as ir from './ir/index.js';
2
+ export declare function debugStack(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
3
+ export declare class DebugStack {
4
+ private readonly _stack;
5
+ constructor(_stack?: ir.Node[]);
6
+ push(node: ir.Node): void;
7
+ pop(): void;
8
+ toString(): string;
9
+ clone(): DebugStack;
10
+ }
@@ -0,0 +1,61 @@
1
+ import { GeneratorResult } from '@babel/generator';
2
+ import { Analyzer } from '../analysis/index.js';
3
+ import { CancellationToken, PackageLocale, Uri } from '../common/index.js';
4
+ import { EmitterContext } from './EmitterContext.js';
5
+ import { EntityNameProviderChain } from './EntityNameProviders.js';
6
+ import * as ir from './ir/index.js';
7
+ import { SourceLocation } from './ir/index.js';
8
+ export declare class Emitter {
9
+ static LaunchFileName: string;
10
+ static IndexFileName: string;
11
+ protected readonly _ectx: EmitterContext;
12
+ protected readonly _options: EmitOptions | undefined;
13
+ protected constructor(ectx: EmitterContext, options: EmitOptions | undefined);
14
+ static emitToFileSystem(analyzer: Analyzer, outputUri: Uri, outputAcceptor: OutputAcceptor, options?: EmitOptions, cancellationToken?: CancellationToken): Promise<void>;
15
+ static emitToString(analyzer: Analyzer, options?: EmitOptions, cancellationToken?: CancellationToken): Promise<string>;
16
+ protected createMainMethod(packageConstructors: readonly ir.PackageMethodDeclaration[], packageEntryPoints: readonly ir.PackageMethodDeclaration[], locale: PackageLocale): ir.PackageMethodDeclaration;
17
+ protected createMainMethodCall(mainMethod: ir.PackageMethodDeclaration, location: SourceLocation | undefined): ir.Statement;
18
+ protected generateJsFile(sourceFile: ir.SourceFile, nameProvider: EntityNameProviderChain): GeneratorResult;
19
+ }
20
+ export interface OutputAcceptor {
21
+ clearDirectory(uri: Uri): Promise<void>;
22
+ writeFile(uri: Uri, content: string): Promise<void>;
23
+ }
24
+ export interface EmitOptions {
25
+ sourceMap?: SourceMapOptions;
26
+ importEmitKind?: ImportEmitKind;
27
+ /**
28
+ * Является ли функция `_artelImport` синхронной?
29
+ */
30
+ isCustomImportSynchronous?: boolean;
31
+ }
32
+ export interface SourceMapOptions {
33
+ mode?: SourceMapMode;
34
+ useAbsolutePaths?: boolean;
35
+ includeSourcesContent?: boolean;
36
+ justApplicationCode?: boolean;
37
+ mapMainMethodCallToProgramFirstLine?: boolean;
38
+ }
39
+ export declare enum SourceMapMode {
40
+ Linked = "linked",
41
+ External = "external",
42
+ Inline = "inline"
43
+ }
44
+ export declare enum ImportEmitKind {
45
+ /**
46
+ * @example import { MyType } from 'my-lib'
47
+ */
48
+ Static = 0,
49
+ /**
50
+ * @example const { MyType } = await import('my-lib')
51
+ */
52
+ Dynamic = 1,
53
+ /**
54
+ * @example const { MyType } = await _artelImport('my-lib')
55
+ */
56
+ Custom = 2,
57
+ /**
58
+ * @example const { MyType } = typeof _artelImport === 'function' ? await _artelImport('my-lib') : await import('my-lib')
59
+ */
60
+ CustomWithFallbackToDynamic = 3
61
+ }