@artel/artc 0.6.26017 → 0.6.26019

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 (331) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +39 -161
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +6744 -8943
  5. package/build/{chunk-UCBPXOLW.js → chunk-27AIX6Z7.js} +3 -5
  6. package/build/{chunk-SJFIPH42.js → chunk-LYYIQT6J.js} +63496 -60655
  7. package/build/{chunk-65XBWCU7.js → chunk-QBUXIP7E.js} +11 -11
  8. package/build/types/analysis/AccessedFunction.d.ts +3 -6
  9. package/build/types/analysis/AccessedFunctionParameter.d.ts +7 -0
  10. package/build/types/analysis/Analyzer.d.ts +81 -580
  11. package/build/types/analysis/BaseMemberConflictsValidator.d.ts +1 -1
  12. package/build/types/analysis/DeclarationsUsageMap.d.ts +14 -0
  13. package/build/types/analysis/EntityOrPackageNameTreeNode.d.ts +13 -0
  14. package/build/types/analysis/ImportedPackageNameTree.d.ts +6 -2
  15. package/build/types/analysis/NodeOrDiagnosticLocation.d.ts +12 -0
  16. package/build/types/analysis/OverridableTypeMember.d.ts +6 -0
  17. package/build/types/analysis/ReferencedPackagesCollector.d.ts +24 -0
  18. package/build/types/analysis/ResolvedImplementationPackage.d.ts +1 -2
  19. package/build/types/analysis/SignatureComparisonOptions.d.ts +6 -0
  20. package/build/types/analysis/SourcePackageDependencyGraph.d.ts +2 -3
  21. package/build/types/analysis/SpecialNameKey.d.ts +1 -1
  22. package/build/types/analysis/SubstitutedFunction.d.ts +1 -1
  23. package/build/types/analysis/TsInteropInputs.d.ts +9 -0
  24. package/build/types/analysis/TypeAssignabilityFlags.d.ts +22 -0
  25. package/build/types/analysis/TypeMemberLookup.d.ts +1 -1
  26. package/build/types/analysis/a/Analyzer.d.ts +466 -0
  27. package/build/types/analysis/{ArgumentToParameterMatchResult.d.ts → a/ArgumentToParameterMatchResult.d.ts} +4 -4
  28. package/build/types/analysis/{ArgumentsToParametersMatcher.d.ts → a/ArgumentsToParametersMatcher.d.ts} +5 -5
  29. package/build/types/analysis/{AutotypeCallExpressionMeaning.d.ts → a/AutotypeCallExpressionMeaning.d.ts} +8 -9
  30. package/build/types/analysis/{BaseExpressionMeaning.d.ts → a/BaseExpressionMeaning.d.ts} +7 -8
  31. package/build/types/analysis/{CallExpressionMeaning.d.ts → a/CallExpressionMeaning.d.ts} +11 -16
  32. package/build/types/analysis/{ConstructorCallResolver.d.ts → a/ConstructorCallResolver.d.ts} +9 -7
  33. package/build/types/analysis/a/DeclarationsUsageCounter.d.ts +12 -0
  34. package/build/types/analysis/{DereferenceExpressionMeaning.d.ts → a/DereferenceExpressionMeaning.d.ts} +5 -5
  35. package/build/types/analysis/a/ExpressionAnalysisOptions.d.ts +21 -0
  36. package/build/types/analysis/a/FindModifier.d.ts +5 -0
  37. package/build/types/analysis/{FunctionAccessResolver.d.ts → a/FunctionAccessResolver.d.ts} +11 -8
  38. package/build/types/analysis/{IdentifierExpressionMeaning.d.ts → a/IdentifierExpressionMeaning.d.ts} +11 -13
  39. package/build/types/analysis/{IndexedAccessExpressionMeaning.d.ts → a/IndexedAccessExpressionMeaning.d.ts} +5 -5
  40. package/build/types/analysis/{InstanceFieldsInitializationValidator.d.ts → a/InstanceFieldsInitializationValidator.d.ts} +4 -4
  41. package/build/types/analysis/{MemberAccessExpressionMeaning.d.ts → a/MemberAccessExpressionMeaning.d.ts} +15 -23
  42. package/build/types/analysis/{ModifierValidator.d.ts → a/ModifierValidator.d.ts} +3 -3
  43. package/build/types/analysis/{NamedTypeResolver.d.ts → a/NamedTypeResolver.d.ts} +5 -5
  44. package/build/types/analysis/{NamedTypeSpecifierResolver.d.ts → a/NamedTypeSpecifierResolver.d.ts} +4 -4
  45. package/build/types/analysis/{NodeTypeUtils.d.ts → a/NodeTypeUtils.d.ts} +1 -1
  46. package/build/types/analysis/{ObjectExpressionMeaning.d.ts → a/ObjectExpressionMeaning.d.ts} +4 -5
  47. package/build/types/analysis/{OverloadResolver.d.ts → a/OverloadResolver.d.ts} +9 -8
  48. package/build/types/analysis/{OwnAndBaseConstructorCallsChecker.d.ts → a/OwnAndBaseConstructorCallsChecker.d.ts} +4 -4
  49. package/build/types/analysis/{OwnConstructorCallExpressionMeaning.d.ts → a/OwnConstructorCallExpressionMeaning.d.ts} +6 -8
  50. package/build/types/analysis/{PackageAndStaticVariablesInitializationValidator.d.ts → a/PackageAndStaticVariablesInitializationValidator.d.ts} +4 -4
  51. package/build/types/analysis/{ReductionSourceMemberFinder.d.ts → a/ReductionSourceMemberFinder.d.ts} +5 -6
  52. package/build/types/analysis/{ReservedNameDictionary.d.ts → a/ReservedNameDictionary.d.ts} +3 -1
  53. package/build/types/analysis/{AnalyzedTranslationPackage.d.ts → a/ResolvedTranslationPackage.d.ts} +10 -12
  54. package/build/types/analysis/{ReturnTypeInferrer.d.ts → a/ReturnTypeInferrer.d.ts} +3 -3
  55. package/build/types/analysis/{SourceFileAnalyzer.d.ts → a/SourceFileAnalyzer.d.ts} +6 -6
  56. package/build/types/analysis/{SourcePackageMembersCreator.d.ts → a/SourcePackageMembersCreator.d.ts} +3 -3
  57. package/build/types/analysis/a/SyntacticAccessKind.d.ts +6 -0
  58. package/build/types/analysis/{TagMeaning.d.ts → a/TagMeaning.d.ts} +14 -21
  59. package/build/types/analysis/{TextIdentity.d.ts → a/TextIdentity.d.ts} +2 -2
  60. package/build/types/analysis/{TranslatedEntityNameConflictsValidator.d.ts → a/TranslatedEntityNameConflictsValidator.d.ts} +3 -3
  61. package/build/types/analysis/{TreeQuery.d.ts → a/TreeQuery.d.ts} +7 -8
  62. package/build/types/analysis/{TypeArgumentInferrer.d.ts → a/TypeArgumentInferrer.d.ts} +5 -4
  63. package/build/types/analysis/{TypeInferrer.d.ts → a/TypeInferrer.d.ts} +2 -2
  64. package/build/types/analysis/{TypeNarrower.d.ts → a/TypeNarrower.d.ts} +2 -2
  65. package/build/types/analysis/{TypeOverloadResolver.d.ts → a/TypeOverloadResolver.d.ts} +1 -1
  66. package/build/types/analysis/{UserDefinableBinaryOperatorResolver.d.ts → a/UserDefinableBinaryOperatorResolver.d.ts} +6 -6
  67. package/build/types/analysis/{UserDefinableUnaryOperatorResolver.d.ts → a/UserDefinableUnaryOperatorResolver.d.ts} +4 -4
  68. package/build/types/analysis/{control-flow → a/control-flow}/GraphBuilder.d.ts +6 -7
  69. package/build/types/analysis/{control-flow → a/control-flow}/NarrowableExpression.d.ts +1 -1
  70. package/build/types/analysis/{control-flow → a/control-flow}/NarrowableReference.d.ts +3 -3
  71. package/build/types/analysis/{control-flow → a/control-flow}/Nodes.d.ts +1 -1
  72. package/build/types/analysis/{semantic-context → a/semantic-context}/Declarations.d.ts +4 -4
  73. package/build/types/analysis/{semantic-context → a/semantic-context}/FieldWithInitializerSemanticContext.d.ts +3 -3
  74. package/build/types/analysis/{semantic-context → a/semantic-context}/SemanticContextBase.d.ts +28 -22
  75. package/build/types/analysis/{semantic-context → a/semantic-context}/SemanticContextBuilder.d.ts +16 -13
  76. package/build/types/analysis/{semantic-context → a/semantic-context}/SemanticContextValidatingNameConflicts.d.ts +4 -4
  77. package/build/types/analysis/{semantic-context → a/semantic-context}/SemanticContextWithParent.d.ts +1 -1
  78. package/build/types/analysis/{semantic-context → a/semantic-context}/SourceFileSemanticContext.d.ts +9 -10
  79. package/build/types/analysis/{semantic-context → a/semantic-context}/SpecialLocalDeclarationsBuilder.d.ts +2 -2
  80. package/build/types/analysis/{semantic-context → a/semantic-context}/SubprogramBodyAndParametersSemanticContext.d.ts +3 -3
  81. package/build/types/analysis/{semantic-context → a/semantic-context}/SubprogramSemanticContext.d.ts +7 -8
  82. package/build/types/analysis/{semantic-context → a/semantic-context}/TypeSemanticContext.d.ts +8 -9
  83. package/build/types/analysis/m/Analyzer.d.ts +10 -0
  84. package/build/types/api/Api.d.ts +24 -25
  85. package/build/types/common/LocalizationHelper.d.ts +1 -11
  86. package/build/types/common/LocalizationHelperA.d.ts +16 -0
  87. package/build/types/common/Logger.d.ts +1 -1
  88. package/build/types/common/index.d.ts +1 -1
  89. package/build/types/diagnostic/DiagnosticCode.d.ts +177 -174
  90. package/build/types/diagnostic/TokenDiagnostic.d.ts +1 -1
  91. package/build/types/emitter/Emitter.d.ts +1 -1
  92. package/build/types/emitter/{IrBuilder.d.ts → IrBuilderA.d.ts} +7 -7
  93. package/build/types/entities/BaseObjectType.d.ts +1 -1
  94. package/build/types/entities/Entity.d.ts +3 -47
  95. package/build/types/entities/EntityKind.d.ts +16 -0
  96. package/build/types/entities/EntityLocalizationContext.d.ts +8 -6
  97. package/build/types/entities/EntityToStringDecorator.d.ts +4 -0
  98. package/build/types/entities/IEntity.d.ts +1 -3
  99. package/build/types/entities/OperatorKind.d.ts +2 -2
  100. package/build/types/entities/PackageEntityMembers.d.ts +1 -2
  101. package/build/types/{analysis → entities}/Tag.d.ts +5 -2
  102. package/build/types/{analysis → entities}/Translation.d.ts +7 -7
  103. package/build/types/entities/TypeEntity.d.ts +2 -1
  104. package/build/types/entities/TypeMemberEntity.d.ts +31 -0
  105. package/build/types/entities/index.d.ts +5 -1
  106. package/build/types/entities/interfaces/AliasTypeEntity.d.ts +4 -5
  107. package/build/types/entities/interfaces/ConstructorEntity.d.ts +3 -4
  108. package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +2 -2
  109. package/build/types/entities/interfaces/DestructorEntity.d.ts +2 -2
  110. package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -5
  111. package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +3 -5
  112. package/build/types/entities/interfaces/GetterEntity.d.ts +2 -2
  113. package/build/types/entities/interfaces/IndexerEntity.d.ts +2 -2
  114. package/build/types/entities/interfaces/PackageAliasEntity.d.ts +2 -2
  115. package/build/types/entities/interfaces/PackageEntity.d.ts +23 -2
  116. package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +4 -5
  117. package/build/types/entities/interfaces/SetterEntity.d.ts +2 -2
  118. package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +3 -5
  119. package/build/types/entities/interfaces/TextTranslationEntity.d.ts +3 -3
  120. package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +3 -4
  121. package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -2
  122. package/build/types/entities/interfaces/VariableEntity.d.ts +11 -11
  123. package/build/types/entities/interfaces/VariantTypeEntity.d.ts +3 -5
  124. package/build/types/entities/intrinsic/IntrinsicConstructorEntity.d.ts +7 -5
  125. package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +9 -4
  126. package/build/types/entities/intrinsic/IntrinsicFunctionTypeEntity.d.ts +3 -3
  127. package/build/types/entities/intrinsic/IntrinsicGetterEntity.d.ts +5 -4
  128. package/build/types/entities/intrinsic/IntrinsicSetterEntity.d.ts +21 -0
  129. package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +5 -3
  130. package/build/types/entities/intrinsic/IntrinsicTypeParameterEntity.d.ts +6 -4
  131. package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +6 -4
  132. package/build/types/entities/intrinsic/index.d.ts +1 -0
  133. package/build/types/entities/source/{SourceAliasTypeEntity.d.ts → a/SourceAliasTypeEntity.d.ts} +5 -8
  134. package/build/types/entities/source/{SourceConstructorEntity.d.ts → a/SourceConstructorEntity.d.ts} +6 -8
  135. package/build/types/entities/source/{SourceDereferenceOperatorEntity.d.ts → a/SourceDereferenceOperatorEntity.d.ts} +7 -8
  136. package/build/types/entities/source/{SourceDestructorEntity.d.ts → a/SourceDestructorEntity.d.ts} +6 -8
  137. package/build/types/entities/source/{SourceFunctionEntity.d.ts → a/SourceFunctionEntity.d.ts} +7 -8
  138. package/build/types/entities/source/{SourceFunctionTypeEntity.d.ts → a/SourceFunctionTypeEntity.d.ts} +7 -12
  139. package/build/types/entities/source/{SourceGetterEntity.d.ts → a/SourceGetterEntity.d.ts} +9 -11
  140. package/build/types/entities/source/{SourceIndexerEntity.d.ts → a/SourceIndexerEntity.d.ts} +6 -7
  141. package/build/types/entities/source/{SourcePackageAliasEntity.d.ts → a/SourcePackageAliasEntity.d.ts} +5 -7
  142. package/build/types/entities/source/a/SourcePackageEntity.d.ts +67 -0
  143. package/build/types/entities/source/{SourceReducedTypeEntity.d.ts → a/SourceReducedTypeEntity.d.ts} +6 -9
  144. package/build/types/entities/source/{SourceSetterEntity.d.ts → a/SourceSetterEntity.d.ts} +8 -25
  145. package/build/types/entities/source/{SourceStructuredTypeEntity.d.ts → a/SourceStructuredTypeEntity.d.ts} +10 -15
  146. package/build/types/entities/source/{SourceTextTranslationEntity.d.ts → a/SourceTextTranslationEntity.d.ts} +4 -7
  147. package/build/types/entities/source/{SourceTypeExtensionEntity.d.ts → a/SourceTypeExtensionEntity.d.ts} +5 -8
  148. package/build/types/entities/source/{SourceTypeParameterEntity.d.ts → a/SourceTypeParameterEntity.d.ts} +6 -9
  149. package/build/types/entities/source/{SourceVariableEntity.d.ts → a/SourceVariableEntity.d.ts} +7 -8
  150. package/build/types/entities/source/{SourceVariantTypeEntity.d.ts → a/SourceVariantTypeEntity.d.ts} +6 -10
  151. package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +11 -21
  152. package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +5 -17
  153. package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +5 -8
  154. package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +10 -14
  155. package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +14 -31
  156. package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +9 -25
  157. package/build/types/entities/translated/TranslatedGetterEntity.d.ts +5 -9
  158. package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +6 -16
  159. package/build/types/entities/translated/TranslatedPackageEntity.d.ts +37 -12
  160. package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +10 -19
  161. package/build/types/entities/translated/TranslatedSetterEntity.d.ts +5 -9
  162. package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +18 -27
  163. package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +8 -15
  164. package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +5 -9
  165. package/build/types/entities/translated/TranslatedVariableEntity.d.ts +10 -16
  166. package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +10 -25
  167. package/build/types/entities/translated/source/a/SourceTranslatedAliasTypeEntity.d.ts +14 -0
  168. package/build/types/entities/translated/source/a/SourceTranslatedConstructorEntity.d.ts +12 -0
  169. package/build/types/entities/translated/source/a/SourceTranslatedDestructorEntity.d.ts +9 -0
  170. package/build/types/entities/translated/source/a/SourceTranslatedFunctionEntity.d.ts +24 -0
  171. package/build/types/entities/translated/source/a/SourceTranslatedFunctionTypeEntity.d.ts +13 -0
  172. package/build/types/entities/translated/source/a/SourceTranslatedIndexerEntity.d.ts +11 -0
  173. package/build/types/entities/translated/source/a/SourceTranslatedPackageEntity.d.ts +19 -0
  174. package/build/types/entities/translated/source/a/SourceTranslatedPackageStructuredTypeEntity.d.ts +20 -0
  175. package/build/types/entities/translated/source/a/SourceTranslatedPackageVariantTypeEntity.d.ts +14 -0
  176. package/build/types/entities/translated/source/a/SourceTranslatedReducedTypeEntity.d.ts +14 -0
  177. package/build/types/entities/translated/source/a/SourceTranslatedTypeExtensionEntity.d.ts +9 -0
  178. package/build/types/entities/translated/source/a/index.d.ts +11 -0
  179. package/build/types/executor/NodeCompiler.d.ts +1 -1
  180. package/build/types/parser/{ConvertTokenKind.d.ts → a/ConvertTokenKind.d.ts} +1 -1
  181. package/build/types/parser/{KeywordDictionary.d.ts → a/KeywordDictionary.d.ts} +4 -3
  182. package/build/types/parser/{Parser.d.ts → a/Parser.d.ts} +2 -2
  183. package/build/types/parser/a/TokenKind.d.ts +80 -0
  184. package/build/types/parser/{TriviaInterner.d.ts → a/TriviaInterner.d.ts} +1 -1
  185. package/build/types/project/CompilationLoader.d.ts +3 -3
  186. package/build/types/project/SourceFile.d.ts +34 -10
  187. package/build/types/project/SourcePackage.d.ts +71 -19
  188. package/build/types/project/configuration/ConfigurationConverter.d.ts +3 -5
  189. package/build/types/project/configuration/ConfigurationFileParser.d.ts +7 -6
  190. package/build/types/project/configuration/ConfigurationTranslator.d.ts +1 -3
  191. package/build/types/project/configuration/types/PackageConfigurationEn.d.ts +1 -2
  192. package/build/types/project/configuration/types/PackageConfigurationRu.d.ts +1 -2
  193. package/build/types/services/LanguageServer.d.ts +10 -10
  194. package/build/types/services/a/CodeActionsService.d.ts +10 -0
  195. package/build/types/services/{CompletionService.d.ts → a/CompletionService.d.ts} +5 -52
  196. package/build/types/services/a/DefinitionService.d.ts +11 -0
  197. package/build/types/services/a/DisplayService.d.ts +57 -0
  198. package/build/types/services/a/EvaluatableExpressionService.d.ts +10 -0
  199. package/build/types/services/a/HoverService.d.ts +11 -0
  200. package/build/types/services/a/NodeSemanticInfo.d.ts +45 -0
  201. package/build/types/services/a/RenameService.d.ts +11 -0
  202. package/build/types/services/a/ScriptEditingService.d.ts +13 -0
  203. package/build/types/services/a/SelectionRangeService.d.ts +7 -0
  204. package/build/types/services/a/SemanticTokensService.d.ts +11 -0
  205. package/build/types/services/a/SourceFileItemsService.d.ts +11 -0
  206. package/build/types/services/{TranslationService.d.ts → a/TranslationService.d.ts} +4 -4
  207. package/build/types/services/a/TranslationsGenerationService.d.ts +7 -0
  208. package/build/types/services/{TreeUtils.d.ts → a/TreeUtils.d.ts} +1 -1
  209. package/build/types/services/a/references/DefinitionInfoFinder.d.ts +6 -0
  210. package/build/types/services/a/references/ReferencesFinder.d.ts +7 -0
  211. package/build/types/services/{signature-help → a/signature-help}/ParametersSignatureHelpProvider.d.ts +4 -4
  212. package/build/types/services/a/signature-help/SignatureHelpService.d.ts +6 -0
  213. package/build/types/services/{signature-help → a/signature-help}/SignatureWithParameters.d.ts +6 -6
  214. package/build/types/services/{signature-help → a/signature-help}/TypeParameterSignatureHelpProvider.d.ts +4 -4
  215. package/build/types/services/{signature-help → a/signature-help}/utils.d.ts +1 -1
  216. package/build/types/services/{FileSystemTreeDisplayService.d.ts → common/FileSystemTreeDisplayService.d.ts} +1 -1
  217. package/build/types/services/{Types.d.ts → common/Types.d.ts} +5 -5
  218. package/build/types/services/{Utils.d.ts → common/Utils.d.ts} +2 -2
  219. package/build/types/services/common/WorkspaceItemsService.d.ts +6 -0
  220. package/build/types/services/{CodeActionsService.d.ts → common/code-action/Types.d.ts} +8 -9
  221. package/build/types/services/common/completion/Types.d.ts +49 -0
  222. package/build/types/services/common/definition/DefinitionService.d.ts +23 -0
  223. package/build/types/services/common/definition/Types.d.ts +7 -0
  224. package/build/types/services/common/display/BaseDisplayService.d.ts +41 -0
  225. package/build/types/services/common/display/DisplayService.d.ts +52 -0
  226. package/build/types/services/{DisplayService.d.ts → common/display/Types.d.ts} +60 -177
  227. package/build/types/services/common/display/index.d.ts +2 -0
  228. package/build/types/services/common/document-highlights/DocumentHighlightsService.d.ts +9 -0
  229. package/build/types/services/common/document-highlights/Types.d.ts +11 -0
  230. package/build/types/services/common/evaluatable-expression/Types.d.ts +6 -0
  231. package/build/types/services/common/hover/HoverService.d.ts +16 -0
  232. package/build/types/services/common/hover/Types.d.ts +8 -0
  233. package/build/types/services/common/node-semantic-info/Types.d.ts +101 -0
  234. package/build/types/services/common/references/ReferencesFinder.d.ts +14 -0
  235. package/build/types/services/common/references/ReferencesSearchUtils.d.ts +5 -0
  236. package/build/types/services/common/references/ReferencesService.d.ts +12 -0
  237. package/build/types/services/common/references/Types.d.ts +41 -0
  238. package/build/types/services/common/rename/RenameService.d.ts +17 -0
  239. package/build/types/services/common/rename/Types.d.ts +8 -0
  240. package/build/types/services/common/script-editing/ScriptEditingService.d.ts +9 -0
  241. package/build/types/services/common/script-editing/Types.d.ts +9 -0
  242. package/build/types/services/common/selection-rage/Types.d.ts +6 -0
  243. package/build/types/services/{SemanticTokensService.d.ts → common/semantic-tokens/Types.d.ts} +1 -10
  244. package/build/types/services/{signature-help/SignatureHelpService.d.ts → common/signature-help/Types.d.ts} +1 -6
  245. package/build/types/services/{SourceFileItemsService.d.ts → common/source-file-items/Types.d.ts} +7 -16
  246. package/build/types/services/{source-generation → common/source-generation}/EntityToSyntax.d.ts +3 -3
  247. package/build/types/services/{source-generation → common/source-generation}/SourceGenerationService.d.ts +6 -6
  248. package/build/types/services/workspace/CompilationController.d.ts +5 -4
  249. package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +1 -1
  250. package/build/types/services/workspace/Workspace.d.ts +1 -1
  251. package/build/types/tree/NodePath.d.ts +6 -2
  252. package/build/types/tree/Types.d.ts +7 -0
  253. package/build/types/tree/Utils.d.ts +4 -7
  254. package/build/types/tree/a/BaseNode.d.ts +42 -0
  255. package/build/types/tree/{Nodes.d.ts → a/Nodes.d.ts} +87 -66
  256. package/build/types/tree/{SyntaxFactory.d.ts → a/SyntaxFactory.d.ts} +8 -4
  257. package/build/types/tree/{SyntaxToCode.d.ts → a/SyntaxToCode.d.ts} +2 -2
  258. package/build/types/tree/a/Token.d.ts +46 -0
  259. package/build/types/tree/a/TokenKind.d.ts +74 -0
  260. package/build/types/tree/a/TreeTraversal.d.ts +18 -0
  261. package/build/types/tree/a/Types.d.ts +45 -0
  262. package/build/types/tree/a/Utils.d.ts +3 -0
  263. package/build/types/tree/a/index.d.ts +15 -0
  264. package/build/types/tree/index.d.ts +1 -9
  265. package/build/types/tree/{BaseNode.d.ts → m/BaseNode.d.ts} +4 -27
  266. package/build/types/tree/m/NodeKind.d.ts +4 -0
  267. package/build/types/tree/m/Nodes.d.ts +17 -0
  268. package/build/types/tree/m/TokenKind.d.ts +74 -0
  269. package/build/types/tree/m/TriviaKind.d.ts +7 -0
  270. package/build/types/tree/m/index.d.ts +5 -0
  271. package/build/types/ts-interop/Entities.d.ts +9 -353
  272. package/build/types/ts-interop/TsInteropContext.d.ts +5 -14
  273. package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
  274. package/build/types/ts-interop/TsTypeMembersCreator.d.ts +1 -2
  275. package/build/types/ts-interop/TsUtils.d.ts +10 -0
  276. package/build/types/ts-interop/TypeEntities.d.ts +359 -0
  277. package/build/types/ts-interop/Utils.d.ts +1 -1
  278. package/build/types/types/AliasType.d.ts +6 -8
  279. package/build/types/types/FunctionType.d.ts +7 -8
  280. package/build/types/types/IntersectionType.d.ts +4 -7
  281. package/build/types/types/ParameterType.d.ts +7 -9
  282. package/build/types/types/ReducedType.d.ts +6 -8
  283. package/build/types/types/StandardTypes.d.ts +4 -2
  284. package/build/types/types/StructuredType.d.ts +6 -7
  285. package/build/types/types/SubstitutionStubType.d.ts +5 -8
  286. package/build/types/types/Substitutions.d.ts +1 -1
  287. package/build/types/types/Type.d.ts +15 -9
  288. package/build/types/types/TypeFactory.d.ts +11 -2
  289. package/build/types/types/TypeMembers.d.ts +5 -2
  290. package/build/types/types/UnionType.d.ts +4 -7
  291. package/build/types/types/UnresolvedType.d.ts +4 -7
  292. package/build/types/types/VariantType.d.ts +6 -8
  293. package/package.json +13 -11
  294. package/build/types/analysis/DeclarationsUsageCounter.d.ts +0 -21
  295. package/build/types/analysis/FindModifier.d.ts +0 -7
  296. package/build/types/analysis/ResolvedTextTranslationPackage.d.ts +0 -9
  297. package/build/types/analysis/Utils.d.ts +0 -47
  298. package/build/types/analysis/Visitor.d.ts +0 -7
  299. package/build/types/analysis/index.d.ts +0 -8
  300. package/build/types/common/TreeTraversal.d.ts +0 -14
  301. package/build/types/entities/source/SourcePackageEntity.d.ts +0 -33
  302. package/build/types/parser/TokenKind.d.ts +0 -75
  303. package/build/types/services/DefinitionService.d.ts +0 -24
  304. package/build/types/services/DocumentHighlightsService.d.ts +0 -18
  305. package/build/types/services/EvaluatableExpressionService.d.ts +0 -15
  306. package/build/types/services/HoverService.d.ts +0 -17
  307. package/build/types/services/NodeSemanticInfo.d.ts +0 -147
  308. package/build/types/services/ReferencesService.d.ts +0 -30
  309. package/build/types/services/RenameService.d.ts +0 -17
  310. package/build/types/services/ScriptEditingService.d.ts +0 -25
  311. package/build/types/services/SelectionRangeService.d.ts +0 -12
  312. package/build/types/services/TranslationsGenerationService.d.ts +0 -7
  313. package/build/types/services/WorkspaceItemsService.d.ts +0 -6
  314. package/build/types/tree/TokenKind.d.ts +0 -74
  315. /package/build/types/analysis/{ModifierFlags.d.ts → a/ModifierFlags.d.ts} +0 -0
  316. /package/build/types/analysis/{ReachabilityChecker.d.ts → a/ReachabilityChecker.d.ts} +0 -0
  317. /package/build/types/analysis/{VariableIsAssignedChecker.d.ts → a/VariableIsAssignedChecker.d.ts} +0 -0
  318. /package/build/types/analysis/{VariableIsNotAssignedChecker.d.ts → a/VariableIsNotAssignedChecker.d.ts} +0 -0
  319. /package/build/types/analysis/{control-flow → a/control-flow}/GraphVisualizer.d.ts +0 -0
  320. /package/build/types/analysis/{control-flow → a/control-flow}/index.d.ts +0 -0
  321. /package/build/types/analysis/{semantic-context → a/semantic-context}/SemanticContext.d.ts +0 -0
  322. /package/build/types/analysis/{semantic-context → a/semantic-context}/index.d.ts +0 -0
  323. /package/build/types/entities/source/{index.d.ts → a/index.d.ts} +0 -0
  324. /package/build/types/parser/{Scanner.d.ts → a/Scanner.d.ts} +0 -0
  325. /package/build/types/tree/{KeywordFlags.d.ts → a/KeywordFlags.d.ts} +0 -0
  326. /package/build/types/tree/{KeywordKind.d.ts → a/KeywordKind.d.ts} +0 -0
  327. /package/build/types/tree/{NodeKind.d.ts → a/NodeKind.d.ts} +0 -0
  328. /package/build/types/tree/{NodesDebug.d.ts → a/NodesDebug.d.ts} +0 -0
  329. /package/build/types/tree/{OperatorKind.d.ts → a/OperatorKind.d.ts} +0 -0
  330. /package/build/types/tree/{TokenFlags.d.ts → a/TokenFlags.d.ts} +0 -0
  331. /package/build/types/tree/{TriviaKind.d.ts → a/TriviaKind.d.ts} +0 -0
@@ -1,132 +1,66 @@
1
- import ts from 'typescript';
2
- import { DisplayableOrPrimitive, Name, PackageLocale, Query, Range, TaskController } from '../common/index.js';
1
+ import { Cached, DisplayableOrPrimitive, Option, PackageLocale, Range, TaskController } from '../common/index.js';
3
2
  import { Diagnostic, DiagnosticAcceptor, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
4
3
  import { DiagnosticCode } from '../diagnostic/DiagnosticCode.js';
5
4
  import { DiagnosticFlags, DiagnosticKind } from '../diagnostic/DiagnosticData.js';
6
- import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
7
- import { BinaryOperatorKind } from '../entities/OperatorKind.js';
8
5
  import * as e from '../entities/index.js';
9
6
  import * as project from '../project/index.js';
10
7
  import { PackageName, PlatformKind, SourcePackage } from '../project/index.js';
11
8
  import * as tree from '../tree/index.js';
12
- import { TsInteropContext, TsProgramState } from '../ts-interop/TsInteropContext.js';
9
+ import { TsInteropContext } from '../ts-interop/TsInteropContext.js';
13
10
  import * as types from '../types/index.js';
14
11
  import { TypeFactory } from '../types/index.js';
15
12
  import { AccessedFunction } from './AccessedFunction.js';
16
- import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
17
- import { ArgumentToParameterMatchResult, MatchResultParameter } from './ArgumentToParameterMatchResult.js';
18
- import * as autotypeCallExpressionMeaning from './AutotypeCallExpressionMeaning.js';
19
- import * as baseExpressionMeaning from './BaseExpressionMeaning.js';
20
- import * as callExpressionMeaning from './CallExpressionMeaning.js';
21
- import { DeclarationsUsageMap } from './DeclarationsUsageCounter.js';
22
- import * as dereferenceExpressionMeaning from './DereferenceExpressionMeaning.js';
13
+ import { DeclarationsUsageMap } from './DeclarationsUsageMap.js';
23
14
  import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
24
- import * as identifierExpressionResolution from './IdentifierExpressionMeaning.js';
25
- import { ImportedPackageNameTree, PackageNameTreeNode } from './ImportedPackageNameTree.js';
26
- import * as indexedAccessExpressionMeaning from './IndexedAccessExpressionMeaning.js';
27
- import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
28
- import { ModifierFlags } from './ModifierFlags.js';
29
- import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
30
- import { AnonymousStructuredTypeDeclaration, DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageStructuredTypeDeclaration, PackageVariableAccessorDeclaration, RegularOrBlockFunctionLiteral, SetterDeclaration, StructuredTypeDeclaration, TypeWithMembersDeclaration } from './NodeTypeUtils.js';
31
- import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
32
- import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
33
- import * as ownConstructorCallExpressionMeaning from './OwnConstructorCallExpressionMeaning.js';
34
- import { ReachabilityChecker } from './ReachabilityChecker.js';
35
- import { ReductionSourceMemberFinder } from './ReductionSourceMemberFinder.js';
36
- import { ReservedNameKind } from './ReservedNameDictionary.js';
15
+ import { PackageImportInfo } from './ImportedPackageNameTree.js';
16
+ import { NodeOrDiagnosticLocation } from './NodeOrDiagnosticLocation.js';
17
+ import { OverridableTypeMemberEntity } from './OverridableTypeMember.js';
37
18
  import { ResolvedImplementationPackage } from './ResolvedImplementationPackage.js';
38
- import { ResolvedTextTranslationPackage } from './ResolvedTextTranslationPackage.js';
39
- import * as tags from './Tag.js';
40
- import * as tagMeaning from './TagMeaning.js';
41
- import { TypeWithMembersOrTypeExtensionDeclaration } from './TreeQuery.js';
19
+ import { SignatureComparisonOptions } from './SignatureComparisonOptions.js';
20
+ import { TsInteropInputs } from './TsInteropInputs.js';
21
+ import { TypeAssignabilityFlags } from './TypeAssignabilityFlags.js';
42
22
  import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationChecker.js';
43
23
  import { TypeMemberLookupContext } from './TypeMemberLookup.js';
44
- import { NodeOrDiagnosticLocation } from './Utils.js';
45
- import * as controlFlow from './control-flow/index.js';
46
- import { WellKnownDeclarations } from './index.js';
47
- import * as semanticContext from './semantic-context/index.js';
48
- export declare class Analyzer {
49
- readonly compilation: project.Compilation;
24
+ import { WellKnownDeclarations } from './WellKnownDeclarations.js';
25
+ import { Analyzer as AnalyzerA } from './a/Analyzer.js';
26
+ import { Analyzer as AnalyzerM } from './m/Analyzer.js';
27
+ /**
28
+ * Базовый анализатор, содержащий логику, не зависящую от диалекта.
29
+ */
30
+ export declare abstract class Analyzer {
31
+ abstract readonly dialectA: AnalyzerA;
32
+ abstract readonly dialectM: AnalyzerM;
33
+ /**
34
+ * Поскольку класс Analyzer имеет несколько производных классов, общее состояние анализаторов вынесено в объект,
35
+ * который создаётся в одном экземпляре в анализаторе диалекта А.
36
+ */
37
+ private readonly state;
38
+ get compilation(): project.Compilation;
50
39
  /**
51
40
  * Пакет с именем 'Артель', содержащий стандартные типы.
52
41
  */
53
- readonly systemPackage: e.PackageEntity;
42
+ get systemPackage(): e.PackageEntity;
54
43
  /**
55
44
  * Стандартные объявления на языке оригинала. Для получения стандартных объявлений на желаемом языке используйте
56
45
  * {@link getLocalizedWellKnownDeclarations}.
57
46
  */
58
- readonly originalWellKnownDeclarations: WellKnownDeclarations;
47
+ get originalWellKnownDeclarations(): WellKnownDeclarations;
59
48
  /**
60
49
  * Стандартные типы на языке оригинала. Для получения стандартных типов на желаемом языке используйте
61
50
  * {@link getLocalizedStandardTypes}.
62
51
  */
63
- readonly originalStandardTypes: types.StandardTypes;
64
- readonly typeFactory: TypeFactory;
65
- readonly type: Type;
66
- readonly returnType: ReturnType;
67
- readonly entity: Entity;
68
- readonly resultLocalVariableEntity: ResultLocalVariableEntity;
69
- readonly valueLocalVariableEntity: ValueLocalVariableEntity;
70
- readonly semanticContext: semanticContext.SemanticContextBuilder;
71
- readonly argumentToParameterMatchResult: ArgumentToParameterMatchResult;
72
- readonly overriddenMember: OverriddenMember;
73
- readonly tags: Tags;
74
- readonly implementation: ImplementationEntity;
75
- readonly packageImports: PackageImports;
76
- readonly typeUtils: TypeUtils;
77
- readonly signatureComparer: SignatureComparer;
78
- readonly conflictsCheck: ConflictsCheck;
79
- readonly typeAssignabilityCheck: TypeAssignabilityCheck;
80
- readonly reachabilityChecker: ReachabilityChecker;
81
- readonly reductionSourceMemberFinder: ReductionSourceMemberFinder;
82
- private readonly tsInteropInputs;
83
- private readonly targetType;
84
- private readonly tsInterop_;
85
- private readonly memberAccessExpressionResolutionResults;
86
- private readonly memberAccessExpressionResolutionResultsFirstStage;
87
- private readonly callExpressionResolutionResults;
88
- private readonly indexedAccessExpressionResolutionResults;
89
- private readonly dereferenceExpressionMeanings;
90
- private readonly ownConstructorCallExpressionMeanings;
91
- private readonly autotypeCallExpressionResolutionResults;
92
- private readonly identifierExpressionResolutionResults;
93
- private readonly identifierExpressionResolutionResultsFirstStage;
94
- private readonly tagResolutionResults;
95
- private readonly objectExpressionResolutionResults;
96
- private readonly baseExpressionResolutionResultsFirstStage;
97
- private readonly baseExpressionResolutionResults;
98
- private readonly namedTypeSpecifierResolutionResults;
99
- private readonly prefixUnaryExpressionOperatorResolutionResults;
100
- private readonly binaryExpressionUserDefinableOperatorResolutionResults;
101
- private readonly assignmentStatementOperatorResolutionResults;
102
- private readonly analyzedTranslationPackages;
103
- private readonly resolvedTextTranslationPackages;
104
- private textTranslationPackagesByTargetPackage;
105
- private primaryTextTranslationPackageByTargetPackage;
106
- private resolvedLocalizableTexts;
107
- private readonly resolvedImplementationPackagesByPlatform;
108
- private readonly isFunctionGeneratorCheckResults;
109
- private readonly namedDeclarationsUsageCountResults;
110
- private readonly packageAndStaticVariablesInitializationDiagnostics;
111
- private readonly controlFlowGraphs;
112
- private sideDiagnosticAcceptor;
113
- private readonly sideDiagnosticsByFile;
114
- private readonly sideDiagnosticsWithoutFile;
115
- private readonly sourcePackageMemberConflictsDiagnostics;
116
- private readonly notExplicitlyImplementedAbstractTypeMembers;
117
- private readonly typeMemberImplementationCheckResults;
118
- private originalPackageEntitiesByNameKey;
119
- private packageEntitiesByNameKey;
120
- private readonly localizedWellKnownDeclarations;
121
- private readonly localizedStandardTypes;
122
- private readonly ownAndBaseConstructorCallsCheckResults;
123
- private readonly expressionCanBeUsedInForLoopCheckResults;
124
- private readonly nameByIdentifierText;
52
+ get originalStandardTypes(): types.StandardTypes;
53
+ get typeFactory(): TypeFactory;
54
+ get implementation(): ImplementationEntity;
55
+ get typeUtils(): TypeUtils;
56
+ get signatureComparer(): SignatureComparer;
57
+ get conflictsCheck(): ConflictsCheck;
58
+ get typeAssignabilityCheck(): TypeAssignabilityCheck;
59
+ get overriddenMember(): OverriddenMember;
125
60
  get tsInterop(): TsInteropContext;
126
- constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
61
+ constructor(state: CommonAnalyzerState);
62
+ analyzeSourceFile(sourceFile: project.SourceFile, taskController: TaskController): Promise<readonly Diagnostic[]>;
127
63
  getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
128
- checkExpressionCanBeUsedInForLoop(node: tree.Expression): WithDiagnostics<ExpressionCanBeUsedInForLoopCheckResult>;
129
- expressionCanBeReferenced(node: tree.Expression): boolean;
130
64
  isEnumeratorMethodSignature(entity: e.MethodEntity): boolean;
131
65
  ifTypeEnumerableThenElementType(type: types.Type): types.Type | undefined;
132
66
  ifTypeEnumeratorThenElementType(type: types.Type): types.Type | undefined;
@@ -135,92 +69,21 @@ export declare class Analyzer {
135
69
  ifTypeReferenceThenReferencedType(type: types.Type): types.Type | undefined;
136
70
  isTypeAssignableTo(source: types.Type, target: types.Type): boolean;
137
71
  getTypeAssignabilityFlags(source: types.Type, target: types.Type): TypeAssignabilityFlags;
138
- checkBlockCallsAsyncMethods(node: tree.StatementBlock | tree.FunctionBlock): boolean;
139
- getSyntacticAccessKind(node: tree.Expression): SyntacticAccessKind;
140
- getEntityContainingTypeMemberDeclaration(node: tree.TypeMemberDeclaration): e.TypeWithMembersOrExtensionEntity;
141
- getTargetTypeOfExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type | undefined;
142
72
  getUnambiguousTargetFunctionType(targetType: types.Type | undefined): types.FunctionType | undefined;
143
73
  getUnambiguousTargetArrayType(targetType: types.Type | undefined): types.Type | undefined;
144
74
  getUnambiguousTargetReferenceType(targetType: types.Type | undefined): types.Type | undefined;
145
- resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.MeaningStage1;
146
- resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.Meaning;
147
- resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.Meaning;
148
- getRespectiveParameter(node: tree.Argument): MatchResultParameter | undefined;
149
- resolveIndexedAccessExpression(node: tree.IndexedAccessExpression): indexedAccessExpressionMeaning.Meaning;
150
- resolveDereferenceExpression(node: tree.DereferenceExpression): dereferenceExpressionMeaning.Meaning;
151
- resolveAutotypeCallExpression(node: tree.AutotypeCallExpression, analysisOptions?: ExpressionAnalysisOptions): autotypeCallExpressionMeaning.ResolutionResult;
152
- resolveOwnConstructorCallExpression(node: tree.OwnConstructorCallExpression): ownConstructorCallExpressionMeaning.Meaning;
153
- resolveIdentifierExpressionFirstStage(node: tree.IdentifierExpression): identifierExpressionResolution.MeaningStage1;
154
- resolveIdentifierExpression(node: tree.IdentifierExpression, analysisOptions?: ExpressionAnalysisOptions): identifierExpressionResolution.Meaning;
155
- resolveTag(node: tree.Tag): tagMeaning.ResolutionResult;
156
- resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.Meaning;
157
- resolveBaseExpressionFirstStage(node: tree.BaseExpression): baseExpressionMeaning.MeaningStage1;
158
- resolveBaseExpression(node: tree.BaseExpression): baseExpressionMeaning.Meaning;
159
- /**
160
- * Проверяет, является ли выражение цепочкой доступов через `?`, заканчивающейся выражением, тип которого допускает
161
- * `пусто`.
162
- *
163
- * Пример:
164
- * ```artel
165
- * а?.б
166
- * а?[1]
167
- * а?^
168
- * а?()
169
- * (а)?.б
170
- * ```
171
- *
172
- * где тип переменной `а` допускает `пусто`.
173
- */
174
- isExpressionValidOptionalChaining(node: tree.Expression): boolean;
175
- /**
176
- * Проверяет, является ли выражение цепочкой доступов через `?`.
177
- *
178
- * Пример:
179
- * ```artel
180
- * а?.б
181
- * а?[1]
182
- * а?^
183
- * а?()
184
- * (а?.б)
185
- * ```
186
- */
187
- isExpressionOptionalChainingSyntactically(node: tree.Expression): boolean;
188
- isExpressionValidOutermostOptionalChaining(node: tree.Expression): boolean;
189
- includeNullToTypeIfExpressionValidOutermostOptionalChaining(type: types.Type, node: tree.Expression): types.Type;
190
- checkIdentifierNameIsReserved(name: Name, locale: PackageLocale): ReservedNameKind | undefined;
191
- getReservedName(reservedNameKind: ReservedNameKind, locale: PackageLocale): Name;
192
- createNameFromIdentifier(node: tree.Identifier): Name;
193
75
  getImplicitBaseTypeForStructuredType(entity: e.StructuredTypeEntity): types.StructuredType | undefined;
194
76
  getImplicitBaseTypeForReducedType(entity: e.ReducedTypeEntity): types.StructuredType;
195
77
  getImplicitBaseTypeForVariantType(locale: PackageLocale): types.StructuredType;
196
78
  getImplicitBaseTypeForFunctionType(locale: PackageLocale): types.StructuredType;
197
- resolveNamedTypeSpecifier(node: tree.NamedTypeSpecifier): NamedTypeSpecifierResolutionResult;
198
- getDenotedType(expression: tree.Expression): types.Type | undefined;
199
- isExpressionDenotingType(expression: tree.Expression): boolean;
200
- getDenotedPackageAlias(expression: tree.Expression): e.PackageAliasEntity | undefined;
201
- getDenotedFunction(expression: tree.Expression): ExpressionDenotesFunctionCheckResult | undefined;
202
- isExpressionDenotingFunction(expression: tree.Expression): boolean;
203
- getDenotedPackageNameTreeNode(expression: tree.Expression): PackageNameTreeNode | undefined;
204
- /**
205
- * Функция считается генератором, если:
206
- * - Использует команду `выдать`.
207
- * - Не использует команду `выдать`, но её возвращаемым типом является `Перебираемый` или `Перебор`, она не
208
- * возвращает значение и не использует переменную `результат` (использование команды `вернуть` без указания
209
- * возвращаемого значения допустимо). В таком случае это генератор, не возвращающий ни одного элемента.
210
- */
211
- isFunctionGenerator(node: FunctionDeclaration): boolean;
212
- allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
213
- checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
214
- resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): types.Method | undefined;
215
- resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): types.Method | undefined;
216
- resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): types.Method | undefined;
217
- classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
218
- getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
79
+ getSourcePackageEntity(pkg: SourcePackage): e.PackageEntity;
80
+ getProgramPackageEntity(pkg: project.ProgramPackage): e.ProgramPackageEntity;
81
+ getTranslationPackageEntity(pkg: project.TranslationPackage): e.NameTranslationPackageEntity;
82
+ getTextTranslationPackageEntity(pkg: project.TextTranslationPackage): e.TextTranslationPackageEntity;
219
83
  getOriginalPackageEntities(): readonly e.PackageEntity[];
220
84
  getPackageEntities(): readonly e.PackageEntity[];
221
85
  getOriginalPackageEntityByName(name: PackageName): e.PackageEntity | undefined;
222
86
  getPackageEntityByName(name: PackageName): e.PackageEntity | undefined;
223
- getAnalyzedTranslationPackages(): readonly AnalyzedTranslationPackage[];
224
87
  createFunctionTypeInvokeMethod(entity: e.FunctionTypeEntity): e.MethodEntity;
225
88
  /**
226
89
  * Преобразует тип таким образом, чтобы он не мог содержать значение `пусто`.
@@ -265,19 +128,13 @@ export declare class Analyzer {
265
128
  excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
266
129
  isParameterVariadic(entity: e.VariableEntity): boolean;
267
130
  getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
268
- getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
269
- resolveTextTranslationPackage(package_: project.TextTranslationPackage): ResolvedTextTranslationPackage | undefined;
270
- findAnalyzedTranslationPackageForLocale(entity: e.PackageEntity, locale: PackageLocale): AnalyzedTranslationPackage | undefined;
271
131
  getLocalizedPackageWithLocale(originalPackageEntity: e.PackageEntity, locale: PackageLocale): e.PackageEntity | undefined;
272
- enumerateAnalyzedTranslationPackages(): Query<AnalyzedTranslationPackage>;
273
- enumerateResolvedTextTranslationPackages(): Query<ResolvedTextTranslationPackage>;
274
132
  getResolvedImplementationPackagesByPlatform(interfacePackage: e.PackageEntity): ReadonlyMap<PlatformKind, ResolvedImplementationPackage> | undefined;
275
133
  getResolvedImplementationPackageForInterfacePackage(interfacePackage: e.PackageEntity, platform: PlatformKind): ResolvedImplementationPackage | undefined;
276
134
  getResolvedImplementationPackage(implementationPackage: e.PackageEntity): ResolvedImplementationPackage | undefined;
277
- getTextTranslationPackagesMap(): ReadonlyMap<e.PackageEntity, ResolvedTextTranslationPackage[]>;
278
- getTextTranslationPackagesOfTargetPackage(targetPackage: e.PackageEntity): ResolvedTextTranslationPackage[] | undefined;
279
- getPrimaryTextTranslationPackageOfTargetPackage(targetPackage: e.PackageEntity): ResolvedTextTranslationPackage | undefined;
280
- resolveLocalizableTextOrTextTemplate(node: tree.LocalizableTextLiteral | tree.LocalizableTextTemplateLiteral): e.TextTranslationEntity | undefined;
135
+ getTextTranslationPackagesMap(): ReadonlyMap<e.PackageEntity, readonly e.TextTranslationPackageEntity[]>;
136
+ getTextTranslationPackagesOfTargetPackage(targetPackage: e.PackageEntity): readonly e.TextTranslationPackageEntity[] | undefined;
137
+ getPrimaryTextTranslationPackageOfTargetPackage(targetPackage: e.PackageEntity): e.TextTranslationPackageEntity | undefined;
281
138
  instantiateType(entity: e.TypeEntity, typeArguments: readonly types.Type[] | undefined): types.Type;
282
139
  instantiateTypeWithSubstitutions(entity: e.TypeEntity, substitutions: types.Substitutions): types.Type;
283
140
  instantiateTypeByIdentitySubstitution(entity: e.TypeEntity): types.Type;
@@ -288,295 +145,57 @@ export declare class Analyzer {
288
145
  instantiateTypeMemberByIdentitySubstitution(entity: e.ConstructorEntity): types.Constructor;
289
146
  instantiateTypeMemberByIdentitySubstitution(entity: e.DestructorEntity): types.Destructor;
290
147
  instantiateTypeMemberByIdentitySubstitution(entity: e.TypeMemberEntity): types.TypeMember;
291
- createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
292
- createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
293
- collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind, taskController: TaskController): Promise<Map<tree.SourceFile, DeclarationsUsageMap>>;
148
+ collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind, taskController: TaskController): Promise<ReadonlyMap<tree.SourceFile, DeclarationsUsageMap>>;
294
149
  getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile, taskController: TaskController): Promise<DeclarationsUsageMap>;
295
- getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage, taskController: TaskController): Promise<readonly Diagnostic[]>;
296
- createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.ConstructorEntity[];
297
- createBackingPackageVariables(declaredPackageMembers: readonly e.NamedPackageMemberEntity[], pkg: e.PackageEntity): e.PackageVariableEntity[];
298
- createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
299
150
  createDiagnostic(code: DiagnosticCode, nodeOrLocation: NodeOrDiagnosticLocation | undefined, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
300
151
  createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
301
152
  getNodeDiagnosticLocation(node: tree.Node): DiagnosticLocation;
302
- getDeclaredTypeMemberEntities(node: tree.TypeMemberDeclarationBlock): DeclaredTypeMemberEntities;
303
153
  getBasicMethodOfOriginalTypeForBasicMethodOfAliasType(entity: e.MethodEntity): e.MethodEntity | undefined;
304
- checkBodyOfBasicAliasTypeMethod(node: tree.MethodDeclaration, diagnostics?: DiagnosticAcceptor): {
305
- basicMethodOfOriginalType: e.MethodEntity;
306
- } | undefined;
307
- getControlFlowGraph(sourceFile: project.SourceFile): controlFlow.GraphBuildResult;
308
154
  createAmbiguousEntityAccessDiagnostic(entities: readonly e.Entity[], nodeOrLocation: NodeOrDiagnosticLocation, diagnosticArgumentFactory?: DiagnosticArgumentFactory): Diagnostic;
309
155
  createAmbiguousFunctionAccessDiagnostic(functions: readonly AccessedFunction[], nodeOrLocation: NodeOrDiagnosticLocation): Diagnostic;
310
156
  createAmbiguousTypeMemberAccessDiagnostic(members: readonly types.TypeMember[], nodeOrLocation: NodeOrDiagnosticLocation): Diagnostic;
311
- createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], nodeOrLocation: NodeOrDiagnosticLocation): Diagnostic;
312
157
  addSideDiagnostic(diagnostic: Diagnostic): void;
313
158
  getSideDiagnosticAcceptor(): DiagnosticAcceptor;
314
159
  accumulateSideDiagnosticForSourceFile(sourceFile: project.SourceFile, diagnostics: DiagnosticAcceptor): void;
315
- validateSourcePackageMemberConflicts(pkg: project.ProgramOrTextTranslationPackage): readonly Diagnostic[];
316
160
  getNotExplicitlyImplementedAbstractMembers(typeEntity: e.TypeEntityWithMembers): readonly types.TypeMember[];
317
161
  getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
318
162
  getLocalizedWellKnownDeclarations(locale: PackageLocale): WellKnownDeclarations;
319
163
  getLocalizedStandardTypes(locale: PackageLocale): types.StandardTypes;
320
- determineUnderlyingTypeOfSourceVariantType(memberList: tree.TypeMemberDeclarationList): types.Type;
321
- getOwnAndBaseConstructorCallsCheckResult(node: TypeWithMembersDeclaration): OwnAndBaseConstructorCallsCheckResult;
322
- isConstructorCallingOwnConstructor(node: tree.ConstructorDeclaration): boolean;
323
- ifCalleeThenCallExpression(node: tree.Expression): tree.CallExpression | undefined;
324
- getNodeForAmbiguousAccessDiagnostic(access: tree.Expression): tree.Node;
325
- isPossibleWrappedTargetTypeDependentFunctionLiteral(node: tree.Expression): boolean;
326
- isTargetTypeDependentFunctionLiteral(node: tree.Expression): node is RegularOrBlockFunctionLiteral;
327
- checkTypeArgumentCount(typeArgumentCount: number, typeParameters: readonly e.TypeParameterEntity[], diagnostics?: DiagnosticAcceptor, diagnosticLocation?: NodeOrDiagnosticLocation): boolean;
328
- checkTypeCanBeUsedAsValue(typeAccess: tree.Expression): boolean;
329
164
  getEntityDiagnosticLocation(entity: e.Entity, chooseSetter?: boolean): DiagnosticLocation | undefined;
330
165
  createTypeMemberLookupContextWithinType(type: e.TypeEntity): TypeMemberLookupContext;
331
- isPossiblyCastedBaseExpression(node: tree.Expression): boolean;
166
+ createDiagnosticArgumentFactoryWithinType(type: e.TypeEntity): DiagnosticArgumentFactory;
167
+ getUniqueImportedPackages(sourceFile: project.SourceFile): readonly PackageImportInfo[];
168
+ createLocalizedReferencedPackagesMapForTranslationPackage(entity: e.NameTranslationPackageEntity): ReadonlyMap<e.PackageEntity, e.PackageEntity>;
332
169
  private createTsInterop;
333
170
  }
334
- export declare class TsInteropInputs {
335
- readonly programState: TsProgramState;
336
- readonly standardLibraryFileByName: ReadonlyMap<string, ts.SourceFile>;
337
- readonly rootFileByGlobalLibraryName: ReadonlyMap<string, ts.SourceFile>;
338
- readonly moduleSymbolByName: ReadonlyMap<string, ts.Symbol>;
339
- constructor(programState: TsProgramState, standardLibraryFileByName: ReadonlyMap<string, ts.SourceFile>, rootFileByGlobalLibraryName: ReadonlyMap<string, ts.SourceFile>, moduleSymbolByName: ReadonlyMap<string, ts.Symbol>);
340
- }
341
- export type BinaryExpressionOperatorClassificationResult = {
342
- kind: 'user-definable';
343
- operatorKind: BinaryOperatorKind;
344
- } | {
345
- kind: 'question-question';
346
- } | {
347
- kind: 'equals';
348
- } | {
349
- kind: 'not-equals';
350
- };
351
- export declare namespace BinaryExpressionOperatorClassificationResult {
352
- const multiply: BinaryExpressionOperatorClassificationResult;
353
- const greaterThan: BinaryExpressionOperatorClassificationResult;
354
- const greaterThanOrEqual: BinaryExpressionOperatorClassificationResult;
355
- const lessThan: BinaryExpressionOperatorClassificationResult;
356
- const lessThanOrEqual: BinaryExpressionOperatorClassificationResult;
357
- const subtract: BinaryExpressionOperatorClassificationResult;
358
- const add: BinaryExpressionOperatorClassificationResult;
359
- const divide: BinaryExpressionOperatorClassificationResult;
360
- const modulo: BinaryExpressionOperatorClassificationResult;
361
- const bitwiseAnd: BinaryExpressionOperatorClassificationResult;
362
- const bitwiseOr: BinaryExpressionOperatorClassificationResult;
363
- const bitwiseXor: BinaryExpressionOperatorClassificationResult;
364
- const leftShift: BinaryExpressionOperatorClassificationResult;
365
- const signedRightShift: BinaryExpressionOperatorClassificationResult;
366
- const unsignedRightShift: BinaryExpressionOperatorClassificationResult;
367
- const and: BinaryExpressionOperatorClassificationResult;
368
- const or: BinaryExpressionOperatorClassificationResult;
369
- const xor: BinaryExpressionOperatorClassificationResult;
370
- const equals: BinaryExpressionOperatorClassificationResult;
371
- const notEquals: BinaryExpressionOperatorClassificationResult;
372
- const questionQuestion: BinaryExpressionOperatorClassificationResult;
373
- }
374
- export declare const enum SyntacticAccessKind {
375
- Get = 0,
376
- Set = 1,
377
- GetSet = 2,
378
- ReferencedValue = 3
379
- }
380
- export declare class ExpressionCanBeUsedInForLoopCheckResult {
381
- readonly elementType: types.Type;
382
- readonly ifTypeDoesNotImplementEnumerableThenEnumeratorMethod: types.Method | undefined;
383
- constructor(elementType: types.Type, ifTypeDoesNotImplementEnumerableThenEnumeratorMethod: types.Method | undefined);
384
- }
385
- declare class Type {
386
- private readonly analyzer;
387
- private readonly unionTypeSpecifierTypes;
388
- private readonly intersectionTypeSpecifierTypes;
389
- private readonly functionLiteralTypes;
390
- private readonly nodesForWhichReturnTypeInferenceDiagnosticHasBeenReported;
391
- private recursionDepth;
392
- constructor(analyzer: Analyzer);
393
- ofExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type;
394
- ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
395
- private ofExpressionWithoutGuard;
396
- private ofFunctionBlockLiteral;
397
- private ofFunctionLiteral;
398
- private ofRegularOrBlockFunctionLiteral;
399
- private createFunctionTypeOfFunctionEntity;
400
- private ofArrayLiteral;
401
- private ofAssertionExpression;
402
- private ofAssumptionExpression;
403
- private ofAsExpression;
404
- private ofBinaryExpression;
405
- private ofCallExpression;
406
- private ofAutotypeCallExpression;
407
- private ofIndexedAccessExpression;
408
- private ofMissingExpression;
409
- private ofIsExpression;
410
- private ofParenthesizedExpression;
411
- private ofPrefixUnaryExpression;
412
- private ofMemberAccessExpression;
413
- private ofReferenceExpression;
414
- private ofDereferenceExpression;
415
- private ofConditionalExpression;
416
- private ofTextLiteral;
417
- /**
418
- * По умолчанию литерал шаблона текста имеет тип Текст.
419
- *
420
- * Литерал шаблона текста имеет тип ШаблонТекста в следующих случаях:
421
- * - если он присваивается в переменную, имеющую тип ШаблонТекста;
422
- * - если он присваивается в переменную, имеющую союзный тип, содержащий тип ШаблонТекста
423
- * и не содержащий тип Текст.
424
- */
425
- private ofTextTemplateLiteral;
426
- private ofIdentifierExpression;
427
- private ofTokenExpression;
428
- private ofKeywordExpression;
429
- private ofObjectExpression;
430
- private ofBaseExpression;
431
- private ofGenericSpecializationExpression;
432
- private ofDefaultMatchExpression;
433
- private ofOwnConstructorCallExpression;
434
- private ofAnonymousTypeSpecifier;
435
- private ofNamedTypeSpecifier;
436
- private ofParenthesizedTypeSpecifier;
437
- private ofNullableTypeSpecifier;
438
- private ofUnionTypeSpecifier;
439
- private ofIntersectionTypeSpecifier;
440
- private ofInvalidTypeSpecifier;
441
- private reportReturnTypeCanNotBeInferredDiagnostic;
442
- private getNarrowedTypeIfNarrowableReference;
443
- }
444
- declare class ReturnType {
445
- private readonly analyzer;
446
- constructor(analyzer: Analyzer);
447
- ofAnonymousFunctionTypeDeclaration(node: tree.AnonymousFunctionTypeDeclaration): types.Type;
448
- ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): types.Type;
449
- ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): types.Type;
450
- ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): types.Type;
451
- ofFunctionLiteral(node: tree.FunctionLiteral): types.Type;
452
- ofMethodDeclaration(node: tree.MethodDeclaration): types.Type;
453
- ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): types.Type;
454
- ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): types.Type;
455
- ofDereferencedVariableGetterDeclaration(node: tree.DereferencedVariableGetterDeclaration): types.Type;
456
- ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): types.Type;
457
- ofFunctionDeclaration(node: FunctionDeclaration): types.Type;
458
- ofTextTranslationFunctionDeclaration(node: tree.TextTranslationFunctionDeclaration): types.Type;
459
- }
460
- declare class Entity {
461
- private readonly analyzer;
462
- private readonly packageEntities;
463
- private readonly packageVariableEntities;
464
- private readonly fieldEntities;
465
- private readonly parameterEntities;
466
- private readonly localVariableEntities;
467
- private readonly typeParameterEntities;
468
- private readonly indexerEntities;
469
- private readonly referenceOperatorEntities;
470
- private readonly packageStructuredTypeEntities;
471
- private readonly anonymousStructuredTypeEntities;
472
- private readonly packageVariantTypeEntities;
473
- private readonly anonymousFunctionTypeEntities;
474
- private readonly aliasTypeEntities;
475
- private readonly reducedTypeEntities;
476
- private readonly packageFunctionEntities;
477
- private readonly methodEntities;
478
- private readonly nestedFunctionEntities;
479
- private readonly constructorEntities;
480
- private readonly destructorEntities;
481
- private readonly getterEntities;
482
- private readonly setterEntities;
483
- private readonly typeExtensionEntities;
484
- private readonly packageAliasEntities;
485
- private readonly textTranslationDeclarationEntities;
486
- private readonly functionLiteralEntities;
487
- private readonly functionBlockLiteralEntities;
488
- constructor(analyzer: Analyzer);
489
- ofPackage(pkg: SourcePackage): e.PackageEntity;
490
- ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
491
- ofComputedPackageVariableDeclaration(node: PackageVariableAccessorDeclaration): e.PackageVariableEntity;
492
- ofFieldDeclaration(node: tree.FieldDeclaration): e.FieldEntity;
493
- ofComputedFieldDeclaration(node: FieldAccessorDeclaration): e.FieldEntity;
494
- ofLocalVariableDeclaration(node: tree.LocalVariableDeclaration): e.LocalVariableEntity;
495
- ofForStatementVariableDeclaration(node: tree.ForStatementVariableDeclaration): e.LocalVariableEntity;
496
- ofErrorVariableDeclaration(node: tree.ErrorVariableDeclaration): e.LocalVariableEntity;
497
- ofParameterDeclaration(node: tree.ParameterDeclaration): e.ParameterEntity;
498
- ofTypeParameterDeclaration(node: tree.TypeParameterDeclaration): e.TypeParameterEntity;
499
- ofIndexerDeclaration(node: IndexedElementAccessorDeclaration): e.IndexerEntity;
500
- ofDereferenceOperatorDeclaration(node: DereferencedVariableAccessorDeclaration): e.DereferenceOperatorEntity;
501
- ofPackageStructuredTypeDeclaration(node: PackageStructuredTypeDeclaration): e.PackageStructuredTypeEntity;
502
- ofPackageClassDeclaration(node: tree.PackageClassDeclaration): e.PackageStructuredTypeEntity;
503
- ofPackageStructureDeclaration(node: tree.PackageStructureDeclaration): e.PackageStructuredTypeEntity;
504
- ofPackageAspectDeclaration(node: tree.PackageAspectDeclaration): e.PackageStructuredTypeEntity;
505
- ofAnonymousStructuredTypeDeclaration(node: AnonymousStructuredTypeDeclaration): e.AnonymousStructuredTypeEntity;
506
- ofAnonymousClassDeclaration(node: tree.AnonymousClassDeclaration): e.AnonymousStructuredTypeEntity;
507
- ofStructuredTypeDeclaration(node: StructuredTypeDeclaration): e.StructuredTypeEntity;
508
- ofAnonymousFunctionTypeDeclaration(node: tree.AnonymousFunctionTypeDeclaration): e.AnonymousFunctionTypeEntity;
509
- ofFunctionTypeDeclaration(node: FunctionTypeDeclaration): e.FunctionTypeEntity;
510
- ofPackageVariantDeclaration(node: tree.PackageVariantDeclaration): e.PackageVariantTypeEntity;
511
- ofPackageAliasTypeDeclaration(node: tree.PackageAliasTypeDeclaration): e.AliasTypeEntity;
512
- ofPackageReducedTypeDeclaration(node: tree.PackageReducedTypeDeclaration): e.ReducedTypeEntity;
513
- ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.PackageFunctionEntity;
514
- ofMethodDeclaration(node: tree.MethodDeclaration): e.MethodEntity;
515
- ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.NestedFunctionEntity;
516
- ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.GetterEntity;
517
- ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.GetterEntity;
518
- ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.GetterEntity;
519
- ofDereferencedVariableGetterDeclaration(node: tree.DereferencedVariableGetterDeclaration): e.GetterEntity;
520
- ofGetterDeclaration(node: GetterDeclaration): e.GetterEntity;
521
- ofPackageVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration): e.SetterEntity;
522
- ofFieldSetterDeclaration(node: tree.FieldSetterDeclaration): e.SetterEntity;
523
- ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.SetterEntity;
524
- ofDereferencedVariableSetterDeclaration(node: tree.DereferencedVariableSetterDeclaration): e.SetterEntity;
525
- ofSetterDeclaration(node: SetterDeclaration): e.SetterEntity;
526
- ofConstructorDeclaration(node: tree.ConstructorDeclaration): e.ConstructorEntity;
527
- ofDestructorDeclaration(node: tree.DestructorDeclaration): e.DestructorEntity;
528
- ofVariantValueDeclaration(node: tree.VariantValueDeclaration): e.FieldEntity;
529
- ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): e.TypeExtensionEntity;
530
- ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
531
- ofTypeWithMembersDeclaration(node: TypeWithMembersDeclaration): e.TypeEntityWithMembers;
532
- ofTypeWithMembersOrExtensionDeclaration(node: TypeWithMembersOrTypeExtensionDeclaration): e.TypeWithMembersOrExtensionEntity;
533
- ofTranslationTextTemplateParameter(node: tree.TranslationTextTemplateParameter): e.ParameterEntity;
534
- ofTextTranslationDeclaration(node: tree.TextTranslationSource): e.TextTranslationEntity;
535
- ofFunctionLiteral(node: tree.FunctionLiteral): e.AnonymousFunctionEntity;
536
- ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.AnonymousFunctionEntity;
537
- ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral): e.AnonymousFunctionEntity;
538
- ofFunctionLiteralInternal(node: tree.FunctionLiteral): e.FunctionLiteralEntity;
539
- ofFunctionBlockLiteralInternal(node: tree.FunctionBlockLiteral): e.FunctionBlockLiteralEntity;
540
- ofFunctionLiteralParameterDeclarationInternal(node: tree.ParameterDeclaration, literal: tree.FunctionLiteral): e.FunctionLiteralParameterDeclarationEntity;
541
- private getContainingPackageLoadedFromDts;
542
- private createComputedFieldEntities;
543
- private createDereferenceOperatorEntities;
544
- private createIndexerAndParameterEntities;
545
- private createAndCacheIndexerEntityAndParameters;
546
- private areIndexedElementAccessorDeclarationsEqual;
547
- }
548
- declare class ResultLocalVariableEntity {
549
- private readonly analyzer;
550
- private readonly entities;
551
- constructor(analyzer: Analyzer);
552
- ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.LocalVariableEntity;
553
- ofMethodDeclaration(node: tree.MethodDeclaration): e.LocalVariableEntity;
554
- ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.LocalVariableEntity;
555
- ofFunctionLiteral(node: tree.FunctionLiteral): e.LocalVariableEntity;
556
- ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.LocalVariableEntity;
557
- ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.LocalVariableEntity;
558
- ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.LocalVariableEntity;
559
- ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.LocalVariableEntity;
560
- ofDereferencedVariableGetterDeclaration(node: tree.DereferencedVariableGetterDeclaration): e.LocalVariableEntity;
561
- ofFunctionDeclaration(node: FunctionDeclaration): e.LocalVariableEntity;
562
- ofTextTranslationFunctionDeclaration(node: tree.TextTranslationFunctionDeclaration): e.LocalVariableEntity;
563
- private createResultLocalVariableEntity;
564
- }
565
- declare class ValueLocalVariableEntity {
566
- private readonly analyzer;
567
- private readonly entities;
568
- constructor(analyzer: Analyzer);
569
- ofPackageVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration): e.LocalVariableEntity;
570
- ofFieldSetterDeclaration(node: tree.FieldSetterDeclaration): e.LocalVariableEntity;
571
- ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.LocalVariableEntity;
572
- ofDereferencedVariableSetterDeclaration(node: tree.DereferencedVariableSetterDeclaration): e.LocalVariableEntity;
573
- private createValueLocalVariableEntity;
574
- }
575
- export declare enum SignatureComparisonOptions {
576
- None = 0,
577
- CompareNames = 1,
578
- CompareReturnTypes = 2,
579
- CheckTypeParameterCountIntersection = 4
171
+ export declare class CommonAnalyzerState {
172
+ readonly compilation: project.Compilation;
173
+ systemPackage: e.PackageEntity;
174
+ originalWellKnownDeclarations: WellKnownDeclarations;
175
+ originalStandardTypes: types.StandardTypes;
176
+ typeFactory: TypeFactory;
177
+ implementation: ImplementationEntity;
178
+ typeUtils: TypeUtils;
179
+ signatureComparer: SignatureComparer;
180
+ conflictsCheck: ConflictsCheck;
181
+ typeAssignabilityCheck: TypeAssignabilityCheck;
182
+ overriddenMember: OverriddenMember;
183
+ readonly tsInteropInputs: TsInteropInputs;
184
+ readonly tsInterop: Cached<TsInteropContext>;
185
+ readonly textTranslationPackagesByTargetPackage: Cached<ReadonlyMap<e.PackageEntity, e.TextTranslationPackageEntity[]>>;
186
+ readonly primaryTextTranslationPackageByTargetPackage: Map<e.PackageEntity, Option<e.TextTranslationPackageEntity>>;
187
+ readonly resolvedImplementationPackagesByPlatform: Map<e.PackageEntity, ReadonlyMap<project.PlatformKind, ResolvedImplementationPackage>>;
188
+ sideDiagnosticAcceptor: DiagnosticAcceptor | undefined;
189
+ readonly sideDiagnosticsByFile: Map<project.TextFile, Diagnostic[]>;
190
+ readonly sideDiagnosticsWithoutFile: Diagnostic[];
191
+ readonly notExplicitlyImplementedAbstractTypeMembers: Map<e.TypeEntityWithMembers, readonly types.TypeMember[]>;
192
+ readonly typeMemberImplementationCheckResults: Map<e.TypeEntityWithMembers, TypeMemberImplementationCheckResult>;
193
+ originalPackageEntitiesByNameKey: ReadonlyMap<string, readonly e.PackageEntity[]> | undefined;
194
+ packageEntitiesByNameKey: ReadonlyMap<string, readonly e.PackageEntity[]> | undefined;
195
+ readonly localizedWellKnownDeclarations: Map<PackageLocale, WellKnownDeclarations>;
196
+ readonly localizedStandardTypes: Map<PackageLocale, types.StandardTypes>;
197
+ constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
198
+ initialize(analyzer: Analyzer): void;
580
199
  }
581
200
  type TypeComparer = (t1: types.Type, t2: types.Type) => boolean;
582
201
  export type SimpleType = types.StructuredType | types.VariantType | types.FunctionType | types.AliasType | types.UnresolvedType | types.ParameterType | types.SubstitutionStubType | types.ReducedType;
@@ -606,17 +225,12 @@ declare class OverriddenMember {
606
225
  private readonly isMethod;
607
226
  private readonly isIndexer;
608
227
  private readonly isDereferenceOperator;
609
- private readonly overriddenAndShadowedFields;
610
- private readonly overriddenAndShadowedMethods;
611
- private readonly overriddenAndShadowedIndexers;
612
- private readonly overriddenAndShadowedDereferenceOperators;
613
228
  constructor(analyzer: Analyzer);
614
- getOverriddenAndShadowedFields(node: tree.FieldDeclaration | FieldAccessorDeclaration): OverriddenAndShadowedMembers<types.Field, types.NamedTypeMember>;
615
- getOverriddenAndShadowedMethods(node: tree.MethodDeclaration): OverriddenAndShadowedMembers<types.Method, types.NamedTypeMember>;
616
- getOverriddenAndShadowedIndexers(node: IndexedElementAccessorDeclaration): OverriddenAndShadowedMembers<types.Indexer>;
617
- getOverriddenAndShadowedDereferenceOperators(node: DereferencedVariableAccessorDeclaration): OverriddenAndShadowedMembers<types.DereferenceOperator>;
229
+ findOverriddenFields(entity: e.FieldEntity, diagnosticLocation: NodeOrDiagnosticLocation | undefined): types.Field[];
230
+ findOverriddenMethods(entity: e.MethodEntity, diagnosticLocation: NodeOrDiagnosticLocation | undefined): types.Method[];
231
+ findOverriddenIndexers(entity: e.IndexerEntity, diagnosticLocation: NodeOrDiagnosticLocation | undefined): types.Indexer[];
232
+ findOverriddenDereferenceOperators(entity: e.DereferenceOperatorEntity, diagnosticLocation: NodeOrDiagnosticLocation | undefined): types.DereferenceOperator[];
618
233
  entityCanBeOverridden(entity: OverridableTypeMemberEntity): boolean;
619
- getMemberTypeOrReturnType(member: types.TypeMember): types.Type;
620
234
  private findOverriddenMembers;
621
235
  private findOverriddenOrShadowedNamedMembersInType;
622
236
  private findOverriddenOrShadowedIndexersInType;
@@ -627,37 +241,6 @@ declare class OverriddenMember {
627
241
  private typesForOverriddenMemberLookup;
628
242
  private entityCanOverrideOrShadow;
629
243
  }
630
- export declare enum ShadowReason {
631
- BaseMemberHasDifferentKind = 0,
632
- BaseMemberCannotBeOverridden = 1,
633
- NoOverrideModifier = 2,
634
- NoOverrideModifierAndTypeOrReturnTypeMismatch = 3,
635
- TypeOrReturnTypeMismatch = 4
636
- }
637
- export declare class ShadowedMemberInfo<T extends OverridableTypeMember = OverridableTypeMember> {
638
- readonly value: T;
639
- readonly shadowReason: ShadowReason;
640
- constructor(value: T, shadowReason: ShadowReason);
641
- }
642
- export declare class OverriddenAndShadowedMembers<TOverriddenMember extends OverridableTypeMember = OverridableTypeMember, TShadowedMember extends OverridableTypeMember = TOverriddenMember> {
643
- readonly overriddenMembers: readonly TOverriddenMember[];
644
- readonly shadowedMembers: readonly ShadowedMemberInfo<TShadowedMember>[];
645
- constructor(overriddenMembers: readonly TOverriddenMember[], shadowedMembers: readonly ShadowedMemberInfo<TShadowedMember>[]);
646
- }
647
- export type OverridableTypeMemberEntity = e.FieldEntity | e.MethodEntity | e.IndexerEntity | e.DereferenceOperatorEntity;
648
- export declare function isOverridableTypeMemberEntity(entity: e.TypeMemberEntity): entity is OverridableTypeMemberEntity;
649
- export type OverridableTypeMember = types.Field | types.Method | types.Indexer | types.DereferenceOperator;
650
- export declare function isOverridableTypeMember(entity: types.TypeMember): entity is OverridableTypeMember;
651
- export type NodeWithTags = tree.PackageMemberDeclaration | tree.TypeMemberDeclaration | tree.ParameterDeclaration;
652
- declare class Tags {
653
- private readonly analyzer;
654
- private readonly tagsByNodeWithTags;
655
- constructor(analyzer: Analyzer);
656
- ofNodeWithTags(node: NodeWithTags): readonly tags.Tag[];
657
- private createTagsOfNodeWithTags;
658
- private createTagFromNode;
659
- private argumentToTagArgument;
660
- }
661
244
  declare class ImplementationEntity {
662
245
  private readonly analyzer;
663
246
  constructor(analyzer: Analyzer);
@@ -703,52 +286,6 @@ declare class TypeAssignabilityCheck {
703
286
  private areNewFlagsBetter;
704
287
  private getFlagCount;
705
288
  }
706
- export declare enum TypeAssignabilityFlags {
707
- None = 0,
708
- /**
709
- * Если флаг NotAssignable установлен, никакие другие флаги не могут быть установлены.
710
- */
711
- NotAssignable = 1,
712
- Identity = 2,
713
- DerivedToBase = 4,
714
- FunctionTypes = 8,
715
- ImplicitConversion = 16,
716
- Boxing = 32,
717
- /**
718
- * Тип `Пусто`, не являющийся частью союзного типа, присваивается в союзный тип, допускающий `Пусто`.
719
- */
720
- NullIsAssignedToUnionType = 64,
721
- TargetIsReducedType = 128,
722
- First = 1,
723
- Last = 64,
724
- BinaryIncompatible = 48,
725
- NotAssignableOrBinaryIncompatible = 49,
726
- NotAssignableOrImplicitConversion = 17
727
- }
728
- declare class PackageImports {
729
- private readonly analyzer;
730
- private readonly packagesAvailableForImport;
731
- private readonly resolvedPackageImports;
732
- private readonly importedPackages;
733
- private readonly automaticallyImportedPackages;
734
- private readonly importedPackageNameTrees;
735
- constructor(analyzer: Analyzer);
736
- resolvePackageImports(sourceFile: project.SourceFile): ReadonlyMap<tree.PackageImport, ResolvedPackageImport>;
737
- getPackagesAvailableForImport(pkg: project.SourcePackage): readonly e.PackageEntity[];
738
- getUniqueImportedPackages(sourceFile: project.SourceFile): readonly PackageImportInfo[];
739
- getImportedPackageNameTree(node: tree.SourceFile): ImportedPackageNameTree;
740
- private getAutomaticallyImportedPackages;
741
- }
742
- export declare class ResolvedPackageImport {
743
- readonly entity: e.PackageEntity | undefined;
744
- readonly isAliasedImport: e.PackageAliasEntity | undefined;
745
- constructor(entity: e.PackageEntity | undefined, isAliasedImport: e.PackageAliasEntity | undefined);
746
- }
747
- export declare class PackageImportInfo {
748
- readonly entity: e.PackageEntity;
749
- readonly aliasEntity: e.PackageAliasEntity | undefined;
750
- constructor(entity: e.PackageEntity, aliasEntity: e.PackageAliasEntity | undefined);
751
- }
752
289
  declare class TypeUtils {
753
290
  private readonly analyzer;
754
291
  constructor(analyzer: Analyzer);
@@ -763,6 +300,8 @@ declare class TypeUtils {
763
300
  isTypeDerivedFromOrEqualsTo(source: types.Type, target: types.Type, considerTypeArguments?: boolean): boolean;
764
301
  compareTypesWithSimpleTypeComparer(type1: types.Type, type2: types.Type, comparer: SimpleTypeComparer): boolean;
765
302
  compareSubstitutionsWithSimpleTypeComparer(substitutions1: types.Substitutions, substitutions2: types.Substitutions, comparer: SimpleTypeComparer): boolean;
303
+ allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
304
+ checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
766
305
  private collectBaseAndAliasedTypesRecursively;
767
306
  private getBaseTypesForCommonTypesSearch;
768
307
  private addTypeAndCollectAllBaseTypes;
@@ -813,42 +352,4 @@ declare class ConflictsCheck {
813
352
  }
814
353
  export type EntityWithoutTypeParametersInSignature = e.ConstructorEntity | e.DestructorEntity | e.IndexerEntity;
815
354
  export type TypeMemberWithoutTypeParametersInSignature = types.Constructor | types.Destructor | types.Indexer;
816
- export declare class ExpressionDenotesFunctionCheckResult {
817
- readonly candidates: readonly AccessedFunction[];
818
- readonly suitableFunctions: readonly AccessedFunction[];
819
- readonly singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined;
820
- get singleSuitableFunction(): AccessedFunction | undefined;
821
- get singleFunction(): AccessedFunction | undefined;
822
- constructor(candidates: readonly AccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
823
- }
824
- export declare class DeclaredTypeMemberEntities {
825
- readonly variables: readonly e.FieldEntity[];
826
- readonly methods: readonly e.MethodEntity[];
827
- readonly constructors: readonly e.ConstructorEntity[];
828
- readonly destructors: readonly e.DestructorEntity[];
829
- readonly indexers: readonly e.IndexerEntity[];
830
- readonly dereferenceOperators: readonly e.DereferenceOperatorEntity[];
831
- get namedMembers(): e.NamedTypeMemberEntity[];
832
- constructor(variables: readonly e.FieldEntity[], methods: readonly e.MethodEntity[], constructors: readonly e.ConstructorEntity[], destructors: readonly e.DestructorEntity[], indexers: readonly e.IndexerEntity[], dereferenceOperators: readonly e.DereferenceOperatorEntity[]);
833
- }
834
- export declare class ExpressionAnalysisOptions {
835
- readonly targetType: types.Type | undefined;
836
- /**
837
- * Определяет, можно ли кэшировать результат анализа выражений, если результат зависит от целевого типа. Результат
838
- * анализа, который не зависит от целевого типа, можно кэшировать всегда.
839
- */
840
- readonly allowCaching: boolean;
841
- readonly isResolvingOverload: boolean;
842
- constructor(targetType: types.Type | undefined,
843
- /**
844
- * Определяет, можно ли кэшировать результат анализа выражений, если результат зависит от целевого типа. Результат
845
- * анализа, который не зависит от целевого типа, можно кэшировать всегда.
846
- */
847
- allowCaching: boolean, isResolvingOverload: boolean);
848
- static withTargetType(options: ExpressionAnalysisOptions | undefined, targetType: types.Type | undefined): ExpressionAnalysisOptions;
849
- withTargetType(targetType: types.Type | undefined): ExpressionAnalysisOptions;
850
- withAllowCaching(allowCaching: boolean): ExpressionAnalysisOptions;
851
- withIsResolvingOverload(isResolvingOverload: boolean): ExpressionAnalysisOptions;
852
- withTargetTypeAndAllowCaching(targetType: types.Type | undefined, allowCaching: boolean): ExpressionAnalysisOptions;
853
- }
854
355
  export {};