@artel/artc 0.6.25282 → 0.6.25283

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 (99) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +4 -8
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +1091 -973
  5. package/build/{chunk-VVFLEWSA.js → chunk-2Q4QKW7T.js} +6998 -6268
  6. package/build/{chunk-3DN3M64Y.js → chunk-7RAZAZE6.js} +2 -2
  7. package/build/{chunk-DURHSZYF.js → chunk-MJ2ZVHII.js} +1 -1
  8. package/build/types/analysis/Analyzer.d.ts +41 -74
  9. package/build/types/analysis/ResolvedImplementationPackage.d.ts +48 -0
  10. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +4 -5
  11. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +4 -4
  12. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +4 -5
  13. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +4 -4
  14. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +4 -5
  15. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +8 -8
  16. package/build/types/common/HelperPhrases.d.ts +2 -1
  17. package/build/types/common/LocalizationHelper.d.ts +6 -4
  18. package/build/types/diagnostic/DiagnosticCode.d.ts +10 -0
  19. package/build/types/emitter/EntityMap.d.ts +1 -1
  20. package/build/types/emitter/ir/Nodes.d.ts +11 -2
  21. package/build/types/entities/Entity.d.ts +0 -12
  22. package/build/types/entities/EntityLocalizationContext.d.ts +1 -2
  23. package/build/types/entities/IEntity.d.ts +2 -1
  24. package/build/types/entities/OperatorKind.d.ts +6 -3
  25. package/build/types/entities/TypeEntity.d.ts +4 -4
  26. package/build/types/entities/interfaces/AliasTypeEntity.d.ts +3 -8
  27. package/build/types/entities/interfaces/ConstructorEntity.d.ts +0 -4
  28. package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +0 -4
  29. package/build/types/entities/interfaces/DestructorEntity.d.ts +0 -4
  30. package/build/types/entities/interfaces/FunctionEntity.d.ts +1 -8
  31. package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +0 -8
  32. package/build/types/entities/interfaces/GetterEntity.d.ts +0 -4
  33. package/build/types/entities/interfaces/IndexerEntity.d.ts +0 -4
  34. package/build/types/entities/interfaces/OperatorEntity.d.ts +0 -4
  35. package/build/types/entities/interfaces/PackageAliasEntity.d.ts +0 -5
  36. package/build/types/entities/interfaces/PackageEntity.d.ts +1 -9
  37. package/build/types/entities/interfaces/SetterEntity.d.ts +0 -4
  38. package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +0 -8
  39. package/build/types/entities/interfaces/TextTranslationEntity.d.ts +1 -0
  40. package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +1 -7
  41. package/build/types/entities/interfaces/TypeParameterEntity.d.ts +0 -2
  42. package/build/types/entities/interfaces/VariableEntity.d.ts +1 -11
  43. package/build/types/entities/interfaces/VariantTypeEntity.d.ts +1 -8
  44. package/build/types/entities/intrinsic/IntrinsicFunctionTypeEntity.d.ts +3 -3
  45. package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
  46. package/build/types/entities/intrinsic/IntrinsicTypeParameterEntity.d.ts +2 -4
  47. package/build/types/entities/source/SourceAliasTypeEntity.d.ts +1 -2
  48. package/build/types/entities/source/SourceFunctionTypeEntity.d.ts +1 -3
  49. package/build/types/entities/source/SourceStructuredTypeEntity.d.ts +1 -3
  50. package/build/types/entities/source/SourceTextTranslationEntity.d.ts +1 -0
  51. package/build/types/entities/source/SourceTypeExtensionEntity.d.ts +1 -2
  52. package/build/types/entities/source/SourceTypeParameterEntity.d.ts +1 -2
  53. package/build/types/entities/source/SourceVariantTypeEntity.d.ts +1 -3
  54. package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +1 -3
  55. package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +1 -5
  56. package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +1 -5
  57. package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +1 -3
  58. package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +1 -3
  59. package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +1 -5
  60. package/build/types/parser/KeywordDictionary.d.ts +10 -2
  61. package/build/types/parser/TokenKind.d.ts +46 -44
  62. package/build/types/services/CustomRequests.d.ts +17 -6
  63. package/build/types/services/DisplayService.d.ts +9 -1
  64. package/build/types/services/LanguageServer.d.ts +3 -4
  65. package/build/types/services/ScriptEditingService.d.ts +25 -0
  66. package/build/types/services/Types.d.ts +6 -0
  67. package/build/types/services/source-generation/EntityToSyntax.d.ts +12 -0
  68. package/build/types/tree/BaseNode.d.ts +56 -2
  69. package/build/types/tree/KeywordFlags.d.ts +28 -0
  70. package/build/types/tree/KeywordKind.d.ts +3 -1
  71. package/build/types/tree/Nodes.d.ts +4 -18
  72. package/build/types/tree/NodesDebug.d.ts +9 -0
  73. package/build/types/tree/OperatorKind.d.ts +6 -3
  74. package/build/types/tree/SyntaxFactory.d.ts +31 -29
  75. package/build/types/tree/SyntaxToCode.d.ts +3 -0
  76. package/build/types/tree/TokenFlags.d.ts +15 -0
  77. package/build/types/tree/TokenKind.d.ts +58 -44
  78. package/build/types/tree/Utils.d.ts +2 -2
  79. package/build/types/tree/index.d.ts +2 -1
  80. package/build/types/ts-interop/Entities.d.ts +1 -11
  81. package/build/types/ts-interop/TsInteropContext.d.ts +1 -2
  82. package/build/types/types/AliasType.d.ts +0 -1
  83. package/build/types/types/FunctionType.d.ts +0 -1
  84. package/build/types/types/IntersectionType.d.ts +0 -1
  85. package/build/types/types/ParameterType.d.ts +0 -1
  86. package/build/types/types/StructuredType.d.ts +1 -2
  87. package/build/types/types/SubstitutionStubType.d.ts +21 -0
  88. package/build/types/types/Type.d.ts +4 -3
  89. package/build/types/types/TypeFactory.d.ts +2 -1
  90. package/build/types/types/UnionType.d.ts +0 -1
  91. package/build/types/types/UnresolvedType.d.ts +0 -1
  92. package/build/types/types/VariantType.d.ts +0 -1
  93. package/build/types/types/index.d.ts +2 -1
  94. package/package.json +1 -1
  95. package/build/types/services/AddBlockToScriptService.d.ts +0 -17
  96. package/build/types/services/AssignFieldService.d.ts +0 -10
  97. package/build/types/services/DeleteBlockFromScriptService.d.ts +0 -6
  98. package/build/types/tree/Token.d.ts +0 -58
  99. /package/build/types/services/{ProjectItemsService.d.ts → WorkspaceItemsService.d.ts} +0 -0
@@ -1,26 +1,16 @@
1
1
  import { PackageDialect, PackageLocale, Query, Range } from '../common/index.js';
2
2
  import { ParserDiagnostic } from '../parser/ParserDiagnostic.js';
3
- import { BaseNode } from './BaseNode.js';
3
+ import { BaseNode, Keyword, Token } from './BaseNode.js';
4
4
  import { KeywordKind } from './KeywordKind.js';
5
5
  import { NodeKind } from './NodeKind.js';
6
6
  import { OperatorKind } from './OperatorKind.js';
7
- import { Token } from './Token.js';
8
7
  import { TokenKind } from './TokenKind.js';
8
+ import { NodesWithChild } from './NodesDebug.js';
9
9
  export type Comma = Token<TokenKind.Comma>;
10
10
  export type Semicolon = Token<TokenKind.Semicolon>;
11
11
  export type Identifier = Token<TokenKind.Identifier>;
12
12
  export type IdentifierParent = NodesWithChild<Identifier>;
13
13
  export type IdentifierListElement = Identifier | Comma;
14
- export declare class Keyword<TKind extends KeywordKind = KeywordKind> extends BaseNode {
15
- readonly kind = NodeKind.Keyword;
16
- readonly children: readonly Identifier[];
17
- readonly keywordKind: TKind;
18
- readonly isMissing: boolean;
19
- get parent(): Node;
20
- get tokens(): readonly Identifier[];
21
- protected get thisAsNode(): Node;
22
- constructor(tokens: readonly Identifier[], keywordKind: TKind, isMissing: boolean | undefined, rangeWithTrivia: Range | undefined);
23
- }
24
14
  export declare class SourceFile extends BaseNode {
25
15
  readonly kind = NodeKind.SourceFile;
26
16
  readonly children: readonly [
@@ -995,7 +985,7 @@ export declare class BinaryExpression extends BaseNode {
995
985
  protected get thisAsNode(): Node;
996
986
  constructor(left: Expression, operator: BinaryExpressionOperator, right: Expression, rangeWithTrivia: Range | undefined);
997
987
  }
998
- export type BinaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus> | Token<TokenKind.Asterisk> | Token<TokenKind.Slash> | Token<TokenKind.Backslash> | Token<TokenKind.BackslashBackslash> | Token<TokenKind.EqualsEquals> | Token<TokenKind.ExclamationEquals> | Token<TokenKind.LessThan> | Token<TokenKind.GreaterThan> | Token<TokenKind.LessThanOrEqual> | Token<TokenKind.GreaterThanOrEqual> | Token<TokenKind.QuestionQuestion> | Keyword<KeywordKind.Or> | Keyword<KeywordKind.And> | Keyword<KeywordKind.Xor> | Token<TokenKind.Ampersand> | Token<TokenKind.Bar> | Token<TokenKind.BarBar>;
988
+ export type BinaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus> | Token<TokenKind.Asterisk> | Token<TokenKind.Slash> | Token<TokenKind.Backslash> | Token<TokenKind.BackslashBackslash> | Token<TokenKind.EqualsEquals> | Token<TokenKind.ExclamationEquals> | Token<TokenKind.LessThan> | Token<TokenKind.GreaterThan> | Token<TokenKind.LessThanOrEqual> | Token<TokenKind.GreaterThanOrEqual> | Token<TokenKind.QuestionQuestion> | Keyword<KeywordKind.Or> | Keyword<KeywordKind.And> | Keyword<KeywordKind.Xor> | Token<TokenKind.Ampersand> | Token<TokenKind.Bar> | Token<TokenKind.BarBar> | Token<TokenKind.LessThanLessThan> | Token<TokenKind.GreaterThanGreaterThan> | Token<TokenKind.GreaterThanGreaterThanGreaterThan>;
999
989
  export declare class FunctionLiteral extends BaseNode {
1000
990
  readonly kind = NodeKind.FunctionLiteral;
1001
991
  readonly children: readonly [
@@ -1358,7 +1348,7 @@ export declare class AssignmentStatement extends BaseNode {
1358
1348
  protected get thisAsNode(): Node;
1359
1349
  constructor(left: Expression, operator: AssignmentStatementOperator, right: Expression, rangeWithTrivia: Range | undefined);
1360
1350
  }
1361
- export type AssignmentStatementOperator = Token<TokenKind.Equals> | Token<TokenKind.PlusEquals> | Token<TokenKind.MinusEquals> | Token<TokenKind.AsteriskEquals> | Token<TokenKind.SlashEquals> | Token<TokenKind.BackslashEquals>;
1351
+ export type AssignmentStatementOperator = Token<TokenKind.Equals> | Token<TokenKind.PlusEquals> | Token<TokenKind.MinusEquals> | Token<TokenKind.AsteriskEquals> | Token<TokenKind.SlashEquals> | Token<TokenKind.BackslashEquals> | Token<TokenKind.AmpersandEquals> | Token<TokenKind.BarEquals> | Token<TokenKind.BarBarEquals> | Token<TokenKind.LessThanLessThanEquals> | Token<TokenKind.GreaterThanGreaterThanEquals> | Token<TokenKind.GreaterThanGreaterThanGreaterThanEquals>;
1362
1352
  export type StatementListParent = FunctionBlock | StatementBlock;
1363
1353
  export type StatementListElement = Statement | Semicolon;
1364
1354
  export declare class StatementList extends BaseNode {
@@ -2309,7 +2299,3 @@ export declare class TypeAnnotation extends BaseNode {
2309
2299
  constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier, rangeWithTrivia: Range | undefined);
2310
2300
  }
2311
2301
  export type Node = Token | Keyword | SourceFile | PackageMemberDeclarationList | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackageName | NamedTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | MissingTypeSpecifier | AnonymousFunctionTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | FunctionTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | MissingPackageMemberDeclaration | TypeMemberGroupDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | IndexParameterClause | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | MethodDeclaration | OperatorDeclaration | FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | MissingTypeMemberDeclaration | NestedFunctionDeclaration | LocalVariableDeclaration | ForStatementVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | FunctionLiteral | FunctionBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | MissingExpression | IsExpression | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | LocalizableTextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | TextLiteral | LocalizableTextLiteral | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | MissingStatement | NestedFunctionDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationsDeclaration | TopLevelTranslationList | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexParameterTranslationClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageFunctionTranslationDeclaration | MethodTranslation | FunctionTypeTranslationDeclaration | QualifiedName | PackageVariableTranslationDeclaration | FieldOrVariantTranslation | TypeMemberTranslationList | TypeTranslationDeclaration | TextTranslationDeclaration | TextTranslationFunctionDeclaration | TranslationTextLiteral | TranslationTextTemplate | TranslationTextTemplateSpanList | TranslationTextTemplateSpan | TranslationTextTemplateParameter | VariantValueDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation;
2312
- type NodesWithChild<Child, Nodes = Node> = Nodes extends {
2313
- children: readonly (infer C)[];
2314
- } ? Child extends C ? Nodes : never : never;
2315
- export {};
@@ -0,0 +1,9 @@
1
+ import { Node } from './Nodes.js';
2
+ /**
3
+ * Проверяет, что тип узла совместим с типом родительского узла всех дочерних узлов.
4
+ */
5
+ export type IsCorrectParent<Parent, Children> = Children extends readonly [infer FirstChild, ...infer RemainingChildren] ? (FirstChild extends Node ? (IsAssignableTo<Parent, FirstChild['parent']> extends true ? IsCorrectParent<Parent, RemainingChildren> : IsAssignableTo<Parent, FirstChild['parent']>) : FirstChild extends undefined ? true : 'Ожидалось, что типом FirstChild будет Node или undefined.') : Children extends readonly (infer ListElement)[] ? (ListElement extends Node ? IsAssignableTo<Parent, ListElement['parent']> : ListElement extends undefined ? true : 'Ожидалось, что типом ListElement будет Node или undefined.') : Children extends readonly [] ? true : 'Ожидался пустой кортеж.';
6
+ export type IsAssignableTo<Source, Target> = Source extends Target ? true : ['Тип', Source, 'не совместим с типом', Target];
7
+ export type NodesWithChild<Child, Nodes = Node> = Nodes extends {
8
+ children: readonly (infer C)[];
9
+ } ? Child extends C ? Nodes : never : never;
@@ -16,13 +16,16 @@ export declare enum OperatorKind {
16
16
  Xor = 13,
17
17
  BitwiseAnd = 14,
18
18
  BitwiseOr = 15,
19
- BitwiseXor = 16
19
+ BitwiseXor = 16,
20
+ LeftShift = 17,
21
+ SignedRightShift = 18,
22
+ UnsignedRightShift = 19
20
23
  }
21
- export declare const operatorKinds: readonly [OperatorKind.Plus, OperatorKind.Minus, OperatorKind.Not, OperatorKind.Multiply, OperatorKind.Divide, OperatorKind.IntegerDivide, OperatorKind.Modulo, OperatorKind.LessThan, OperatorKind.GreaterThan, OperatorKind.LessThanOrEqual, OperatorKind.GreaterThanOrEqual, OperatorKind.Or, OperatorKind.And, OperatorKind.Xor, OperatorKind.BitwiseAnd, OperatorKind.BitwiseOr, OperatorKind.BitwiseXor];
24
+ export declare const operatorKinds: readonly [OperatorKind.Plus, OperatorKind.Minus, OperatorKind.Not, OperatorKind.Multiply, OperatorKind.Divide, OperatorKind.IntegerDivide, OperatorKind.Modulo, OperatorKind.LessThan, OperatorKind.GreaterThan, OperatorKind.LessThanOrEqual, OperatorKind.GreaterThanOrEqual, OperatorKind.Or, OperatorKind.And, OperatorKind.Xor, OperatorKind.BitwiseAnd, OperatorKind.BitwiseOr, OperatorKind.BitwiseXor, OperatorKind.LeftShift, OperatorKind.SignedRightShift, OperatorKind.UnsignedRightShift];
22
25
  /**
23
26
  * Виды операторов, задаваемых токенами (`+`, `-`, `*=` и др.).
24
27
  */
25
- export type KindOfOperatorDefinedByToken = OperatorKind.Plus | OperatorKind.Minus | OperatorKind.Multiply | OperatorKind.Divide | OperatorKind.IntegerDivide | OperatorKind.Modulo | OperatorKind.LessThan | OperatorKind.GreaterThan | OperatorKind.LessThanOrEqual | OperatorKind.GreaterThanOrEqual | OperatorKind.BitwiseAnd | OperatorKind.BitwiseOr | OperatorKind.BitwiseXor;
28
+ export type KindOfOperatorDefinedByToken = OperatorKind.Plus | OperatorKind.Minus | OperatorKind.Multiply | OperatorKind.Divide | OperatorKind.IntegerDivide | OperatorKind.Modulo | OperatorKind.LessThan | OperatorKind.GreaterThan | OperatorKind.LessThanOrEqual | OperatorKind.GreaterThanOrEqual | OperatorKind.BitwiseAnd | OperatorKind.BitwiseOr | OperatorKind.BitwiseXor | OperatorKind.LeftShift | OperatorKind.SignedRightShift | OperatorKind.UnsignedRightShift;
26
29
  export declare function isOperatorDefinedByToken(kind: OperatorKind): kind is KindOfOperatorDefinedByToken;
27
30
  /**
28
31
  * Виды операторов, задаваемых ключевыми словами (`и`, `или`, `не` и др.)
@@ -1,35 +1,35 @@
1
1
  import * as tree from './index.js';
2
2
  export declare class SyntaxFactory {
3
3
  static sourceFile(packageImportDirectives: readonly tree.PackageImportDirective[], declarations: readonly tree.PackageMemberDeclaration[]): tree.SourceFile;
4
- static singlePackageImportDirective(alias: string | undefined, pathSegments: readonly string[]): tree.SinglePackageImportDirective;
5
- static packageName(segments: readonly string[]): tree.PackageName;
6
- static packageAliasTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.AliasTypeDeclarationBody): tree.PackageAliasTypeDeclaration;
4
+ static singlePackageImportDirective(alias: tree.Identifier | string | undefined, pathSegments: readonly string[]): tree.SinglePackageImportDirective;
5
+ static packageName(segments: readonly (tree.Identifier | string)[]): tree.PackageName;
6
+ static packageAliasTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.AliasTypeDeclarationBody): tree.PackageAliasTypeDeclaration;
7
7
  static aliasTypeDeclarationBody(aliasedTypeSpecifier: tree.TypeSpecifier, members: readonly tree.TypeMemberDeclaration[] | undefined): tree.AliasTypeDeclarationBody;
8
8
  static packageMemberGroupDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], declarations: readonly tree.PackageMemberDeclaration[]): tree.PackageMemberGroupDeclaration;
9
- static packageFunctionDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, parameters: readonly tree.ParameterDeclaration[], returnTypeSpecifier: tree.TypeSpecifier | undefined, body: tree.FunctionBlock | undefined): tree.PackageFunctionDeclaration;
10
- static packageFunctionTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.FunctionTypeDeclarationBody): tree.PackageFunctionTypeDeclaration;
9
+ static packageFunctionDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, parameters: readonly tree.ParameterDeclaration[], returnTypeSpecifier: tree.TypeSpecifier | undefined, body: tree.FunctionBlock | undefined): tree.PackageFunctionDeclaration;
10
+ static packageFunctionTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.FunctionTypeDeclarationBody): tree.PackageFunctionTypeDeclaration;
11
11
  static functionTypeDeclarationBody(parameters: readonly tree.ParameterDeclaration[], returnTypeSpecifier: tree.TypeSpecifier | undefined): tree.FunctionTypeDeclarationBody;
12
- static packageStructuredTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.StructuredTypeDeclarationBody): tree.PackageStructuredTypeDeclaration;
12
+ static packageStructuredTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.StructuredTypeDeclarationBody): tree.PackageStructuredTypeDeclaration;
13
13
  static structuredTypeDeclarationBody(structuredTypeKind: tree.StructuredTypeKindKeyword['keywordKind'], baseTypes: readonly tree.NamedTypeSpecifier[] | undefined, members: readonly tree.TypeMemberDeclaration[]): tree.StructuredTypeDeclarationBody;
14
- static packageVariableDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeSpecifier: tree.TypeSpecifier | undefined, initializer?: tree.Expression): tree.PackageVariableDeclaration;
15
- static packageVariableGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.PackageVariableGetterDeclaration;
16
- static packageVariableSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, body: tree.FunctionBlock | undefined): tree.PackageVariableSetterDeclaration;
17
- static packageVariantTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.VariantTypeDeclarationBody): tree.PackageVariantTypeDeclaration;
14
+ static packageVariableDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier | undefined, initializer?: tree.Expression): tree.PackageVariableDeclaration;
15
+ static packageVariableGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.PackageVariableGetterDeclaration;
16
+ static packageVariableSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, body: tree.FunctionBlock | undefined): tree.PackageVariableSetterDeclaration;
17
+ static packageVariantTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.VariantTypeDeclarationBody): tree.PackageVariantTypeDeclaration;
18
18
  static variantTypeDeclarationBody(members: readonly tree.TypeMemberDeclaration[]): tree.VariantTypeDeclarationBody;
19
- static fieldDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeSpecifier: tree.TypeSpecifier | undefined, initializer?: tree.Expression): tree.FieldDeclaration;
20
- static fieldGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.FieldGetterDeclaration;
21
- static fieldSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, body: tree.FunctionBlock | undefined): tree.FieldSetterDeclaration;
22
- static methodDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, parameters: readonly tree.ParameterDeclaration[], returnTypeSpecifier: tree.TypeSpecifier | undefined, body: tree.FunctionBlock | undefined): tree.MethodDeclaration;
19
+ static fieldDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier | undefined, initializer?: tree.Expression): tree.FieldDeclaration;
20
+ static fieldGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.FieldGetterDeclaration;
21
+ static fieldSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, body: tree.FunctionBlock | undefined): tree.FieldSetterDeclaration;
22
+ static methodDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, parameters: readonly tree.ParameterDeclaration[], returnTypeSpecifier: tree.TypeSpecifier | undefined, body: tree.FunctionBlock | undefined): tree.MethodDeclaration;
23
23
  static constructorDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.ConstructorDeclaration;
24
24
  static destructorDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.DestructorDeclaration;
25
25
  static indexedElementGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.IndexedElementGetterDeclaration;
26
26
  static indexedElementSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.IndexedElementSetterDeclaration;
27
27
  static typeMemberGroupDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], members: readonly tree.TypeMemberDeclaration[]): tree.TypeMemberGroupDeclaration;
28
28
  static typeMemberDeclarationBlock(members: readonly tree.TypeMemberDeclaration[]): tree.TypeMemberDeclarationBlock;
29
- static variantValueDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, value?: tree.Expression): tree.VariantValueDeclaration;
29
+ static variantValueDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, value?: tree.Expression): tree.VariantValueDeclaration;
30
30
  static parameterClause(parameters: readonly tree.ParameterDeclaration[]): tree.ParameterClause;
31
31
  static indexParameterClause(indexParameters: readonly tree.ParameterDeclaration[]): tree.IndexParameterClause;
32
- static namedTypeSpecifier(name: string | readonly string[], typeArguments?: readonly tree.TypeSpecifier[]): tree.NamedTypeSpecifier;
32
+ static namedTypeSpecifier(name: tree.Identifier | string | readonly (tree.Identifier | string)[], typeArguments?: readonly tree.TypeSpecifier[]): tree.NamedTypeSpecifier;
33
33
  static unionTypeSpecifier(typeSpecifiers: readonly tree.TypeSpecifier[]): tree.UnionTypeSpecifier;
34
34
  static intersectionTypeSpecifier(typeSpecifiers: readonly tree.TypeSpecifier[]): tree.IntersectionTypeSpecifier;
35
35
  static nullableTypeSpecifier(typeSpecifier: tree.TypeSpecifier): tree.NullableTypeSpecifier;
@@ -37,9 +37,9 @@ export declare class SyntaxFactory {
37
37
  static anonymousStructuredTypeSpecifier(body: tree.StructuredTypeDeclarationBody): tree.AnonymousTypeSpecifier;
38
38
  static anonymousFunctionTypeSpecifier(body: tree.FunctionTypeDeclarationBody): tree.AnonymousTypeSpecifier;
39
39
  static anonymousVariantTypeSpecifier(body: tree.VariantTypeDeclarationBody): tree.AnonymousTypeSpecifier;
40
- static typeParameterDeclaration(name: string, constraint?: tree.TypeSpecifier, defaultType?: tree.TypeSpecifier): tree.TypeParameterDeclaration;
41
- static parameterDeclaration(tags: readonly tree.Tag[], name: string, typeSpecifier: tree.TypeSpecifier | undefined, defaultValue?: tree.Expression): tree.ParameterDeclaration;
42
- static tag(name: string | readonly string[], typeArguments?: readonly tree.TypeSpecifier[], args?: readonly tree.Argument[]): tree.Tag;
40
+ static typeParameterDeclaration(name: tree.Identifier | string, constraint?: tree.TypeSpecifier, defaultType?: tree.TypeSpecifier): tree.TypeParameterDeclaration;
41
+ static parameterDeclaration(tags: readonly tree.Tag[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier | undefined, defaultValue?: tree.Expression): tree.ParameterDeclaration;
42
+ static tag(name: tree.Identifier | string | readonly (tree.Identifier | string)[], typeArguments?: readonly tree.TypeSpecifier[], args?: readonly tree.Argument[]): tree.Tag;
43
43
  static modifier(value: tree.ModifierKeywordKind, level?: tree.ModifierLevelKeyword['keywordKind']): tree.Modifier;
44
44
  static typeArgumentClause(typeArguments: readonly tree.TypeSpecifier[]): tree.TypeArgumentClause;
45
45
  static typeAnnotation(typeSpecifier: tree.TypeSpecifier): tree.TypeAnnotation;
@@ -49,21 +49,23 @@ export declare class SyntaxFactory {
49
49
  static nullLiteral(): tree.KeywordExpression;
50
50
  static integerLiteral(value: number | string): tree.TokenExpression;
51
51
  static translationsDeclaration(translations: readonly tree.TranslationDeclaration[]): tree.TranslationsDeclaration;
52
- static packageVariableTranslation(sourceName: string, translatedName: string): tree.PackageVariableTranslationDeclaration;
53
- static packageFunctionTranslation(sourceName: string, sourceTypeParameters: readonly string[] | undefined, sourceParameters: readonly string[], translatedName: string, translatedTypeParameters: readonly string[] | undefined, translatedParameters: readonly string[]): tree.PackageFunctionTranslationDeclaration;
54
- static typeTranslation(sourceName: string, sourceTypeParameters: readonly string[] | undefined, translatedName: string, translatedTypeParameters: readonly string[] | undefined, members?: readonly tree.TypeMemberTranslation[]): tree.TypeTranslationDeclaration;
55
- static functionTypeTranslation(sourceName: string, sourceTypeParameters: readonly string[] | undefined, sourceParameters: readonly string[], translatedName: string, translatedTypeParameters: readonly string[] | undefined, translatedParameters: readonly string[]): tree.FunctionTypeTranslationDeclaration;
56
- static fieldOrVariantTranslation(sourceName: string, translatedName: string): tree.FieldOrVariantTranslation;
57
- static methodTranslation(sourceName: string, sourceTypeParameters: readonly string[] | undefined, sourceParameters: readonly string[], translatedName: string, translatedTypeParameters: readonly string[] | undefined, translatedParameters: readonly string[]): tree.MethodTranslation;
52
+ static packageVariableTranslation(sourceName: tree.Identifier | string, translatedName: tree.Identifier | string): tree.PackageVariableTranslationDeclaration;
53
+ static packageFunctionTranslation(sourceName: tree.Identifier | string, sourceTypeParameters: readonly (tree.Identifier | string)[] | undefined, sourceParameters: readonly (tree.Identifier | string)[], translatedName: tree.Identifier | string, translatedTypeParameters: readonly (tree.Identifier | string)[] | undefined, translatedParameters: readonly (tree.Identifier | string)[]): tree.PackageFunctionTranslationDeclaration;
54
+ static typeTranslation(sourceName: tree.Identifier | string, sourceTypeParameters: readonly (tree.Identifier | string)[] | undefined, translatedName: tree.Identifier | string, translatedTypeParameters: readonly (tree.Identifier | string)[] | undefined, members?: readonly tree.TypeMemberTranslation[]): tree.TypeTranslationDeclaration;
55
+ static functionTypeTranslation(sourceName: tree.Identifier | string, sourceTypeParameters: readonly (tree.Identifier | string)[] | undefined, sourceParameters: readonly (tree.Identifier | string)[], translatedName: tree.Identifier | string, translatedTypeParameters: readonly (tree.Identifier | string)[] | undefined, translatedParameters: readonly (tree.Identifier | string)[]): tree.FunctionTypeTranslationDeclaration;
56
+ static fieldOrVariantTranslation(sourceName: tree.Identifier | string, translatedName: tree.Identifier | string): tree.FieldOrVariantTranslation;
57
+ static methodTranslation(sourceName: tree.Identifier | string, sourceTypeParameters: readonly (tree.Identifier | string)[] | undefined, sourceParameters: readonly (tree.Identifier | string)[], translatedName: tree.Identifier | string, translatedTypeParameters: readonly (tree.Identifier | string)[] | undefined, translatedParameters: readonly (tree.Identifier | string)[]): tree.MethodTranslation;
58
58
  static constructorTranslation(sourceParameters: readonly string[], translatedParameters: readonly string[]): tree.ConstructorTranslation;
59
59
  static indexerTranslation(sourceParameters: readonly string[], translatedParameters: readonly string[]): tree.IndexerTranslation;
60
- static translationParameterClause(parameters: readonly string[]): tree.TranslationParameterClause;
61
- static indexParameterTranslationClause(parameters: readonly string[]): tree.IndexParameterTranslationClause;
60
+ static translationParameterClause(parameters: readonly (tree.Identifier | string)[]): tree.TranslationParameterClause;
61
+ static indexParameterTranslationClause(parameters: readonly (tree.Identifier | string)[]): tree.IndexParameterTranslationClause;
62
+ static identifier(value: tree.Identifier | string): tree.Identifier;
62
63
  static token<T extends tree.TokenKind>(kind: T, value?: string): tree.Token<T>;
63
64
  static keyword<T extends tree.KeywordKind>(kind: T): tree.Keyword<T>;
65
+ private static createToken;
66
+ private static createKeyword;
64
67
  private static createTypeParameterClause;
65
68
  private static createTranslationTypeParameterClause;
66
69
  private static createTypeAnnotation;
67
- private static createIdentifier;
68
- private static createTokenSeparatedElements;
70
+ private static createSeparatedElements;
69
71
  }
@@ -5,6 +5,7 @@ export declare class SyntaxToCode {
5
5
  private readonly node;
6
6
  private readonly newLine;
7
7
  private readonly indentationStep;
8
+ private readonly modifiersOnSeparateLine;
8
9
  private readonly keywordsLocale;
9
10
  private readonly keywordsDialect;
10
11
  private readonly singleWordKeywordValues;
@@ -98,6 +99,7 @@ export declare class SyntaxToCode {
98
99
  private writeSemicolonSeparatedList;
99
100
  private writeCommaSeparatedList;
100
101
  private writeKeyword;
102
+ private getModifierPreferredFlags;
101
103
  private writeToken;
102
104
  private writeNode;
103
105
  private writeNewLineOrWhitespace;
@@ -114,6 +116,7 @@ export interface SyntaxToCodeOptions {
114
116
  newLine?: '\n' | '\r\n';
115
117
  indentationStep?: string;
116
118
  initialIndentation?: string;
119
+ modifiersOnSeparateLine?: boolean;
117
120
  keywordsLocale?: PackageLocale;
118
121
  keywordsDialect?: PackageDialect;
119
122
  }
@@ -0,0 +1,15 @@
1
+ export declare const enum TokenFlags {
2
+ None = 0,// обычная лексема
3
+ Missing = 1,// лексема отсутствует в исходном тексте, но требуется по грамматике.
4
+ CompoundAngle = 2,// составная лексема с угловой скобкой: <<, <<=, >>, >>>, >>=
5
+ QuotedName = 4,// 'имя', 'имя с пробелами', '+'
6
+ RequiresQuotes = 8,// 'имя с пробелами', '+'
7
+ EscapedKeyword = 16,// 'выполнить'
8
+ HasBackQuotes = 32,// имя с любым количеством апострофов: имя`, имя```
9
+ ConflictResolvingParameterName = 64,// имя с одним апострофом: имя`, выполнить`
10
+ BackingVariableName = 128,// имя с двумя апострофами: имя``, выполнить``
11
+ SingleCharText = 256,// текст из одного символа: "а", "\/", "ю000А"
12
+ StartsWithTilde = 512,// переводимый текст: ~"текст", ~"текст{
13
+ EndsWithTilde = 1024,// переводимый текст: "текст"~, }текст"~
14
+ LocalizableText = 1536
15
+ }
@@ -18,50 +18,57 @@ export declare enum TokenKind {
18
18
  BackQuote = 16,
19
19
  Bar = 17,
20
20
  BarBar = 18,
21
- Caret = 19,
22
- CloseBrace = 20,
23
- CloseParenthesis = 21,
24
- CloseSquareBracket = 22,
25
- Colon = 23,
26
- Comma = 24,
27
- CommercialAt = 25,
28
- Dot = 26,
29
- DoublePeriod = 27,
30
- Ellipsis = 28,
31
- EqualsEquals = 29,
32
- EqualsGreaterThan = 30,
33
- Exclamation = 31,
34
- ExclamationEquals = 32,
35
- GreaterThan = 33,
36
- GreaterThanOrEqual = 34,
37
- HashSign = 35,
38
- LessThan = 36,
39
- LessThanOrEqual = 37,
40
- LessThanMinus = 38,
41
- Minus = 39,
42
- MinusMinus = 40,
43
- MinusEquals = 41,
44
- MinusGreaterThan = 42,
45
- OpenBrace = 43,
46
- OpenParenthesis = 44,
47
- OpenSquareBracket = 45,
48
- Plus = 46,
49
- PlusPlus = 47,
50
- PlusEquals = 48,
51
- Question = 49,
52
- QuestionQuestion = 50,
53
- Semicolon = 51,
54
- Slash = 52,
55
- SlashEquals = 53,
56
- Tilde = 54,
57
- TildeTilde = 55,
58
- Underscore = 56,
59
- Equals = 57,
60
- Percent = 58,
61
- PercentPercent = 59,
62
- Backslash = 60,
63
- BackslashEquals = 61,
64
- BackslashBackslash = 62
21
+ BarEquals = 19,
22
+ BarBarEquals = 20,
23
+ Caret = 21,
24
+ CloseBrace = 22,
25
+ CloseParenthesis = 23,
26
+ CloseSquareBracket = 24,
27
+ Colon = 25,
28
+ Comma = 26,
29
+ CommercialAt = 27,
30
+ Dot = 28,
31
+ DoublePeriod = 29,
32
+ Ellipsis = 30,
33
+ EqualsEquals = 31,
34
+ Exclamation = 32,
35
+ ExclamationEquals = 33,
36
+ GreaterThan = 34,
37
+ GreaterThanOrEqual = 35,
38
+ HashSign = 36,
39
+ LessThan = 37,
40
+ LessThanOrEqual = 38,
41
+ LessThanMinus = 39,
42
+ LessThanLessThan = 40,
43
+ LessThanLessThanEquals = 41,
44
+ Minus = 42,
45
+ MinusMinus = 43,
46
+ MinusEquals = 44,
47
+ MinusGreaterThan = 45,
48
+ OpenBrace = 46,
49
+ OpenParenthesis = 47,
50
+ OpenSquareBracket = 48,
51
+ Plus = 49,
52
+ PlusPlus = 50,
53
+ PlusEquals = 51,
54
+ Question = 52,
55
+ QuestionQuestion = 53,
56
+ GreaterThanGreaterThan = 54,
57
+ GreaterThanGreaterThanEquals = 55,
58
+ GreaterThanGreaterThanGreaterThan = 56,
59
+ GreaterThanGreaterThanGreaterThanEquals = 57,
60
+ Semicolon = 58,
61
+ Slash = 59,
62
+ SlashEquals = 60,
63
+ Tilde = 61,
64
+ TildeTilde = 62,
65
+ Underscore = 63,
66
+ Equals = 64,
67
+ Percent = 65,
68
+ PercentPercent = 66,
69
+ Backslash = 67,
70
+ BackslashEquals = 68,
71
+ BackslashBackslash = 69
65
72
  }
66
73
  export declare const tokenKindValues: {
67
74
  0: string;
@@ -127,4 +134,11 @@ export declare const tokenKindValues: {
127
134
  60: string;
128
135
  61: string;
129
136
  62: string;
137
+ 63: string;
138
+ 64: string;
139
+ 65: string;
140
+ 66: string;
141
+ 67: string;
142
+ 68: string;
143
+ 69: string;
130
144
  };
@@ -1,7 +1,7 @@
1
1
  import { TokenKind } from './TokenKind.js';
2
2
  import { KeywordKind } from './KeywordKind.js';
3
- import { Token } from './Token.js';
4
- import { Identifier, Keyword, Node } from './Nodes.js';
3
+ import { Keyword, Token } from './BaseNode.js';
4
+ import { Identifier, Node } from './Nodes.js';
5
5
  export declare function isIdentifier(node: Node): node is Identifier;
6
6
  export declare function isToken<T extends TokenKind>(node: Node, kind?: T): node is Token<T>;
7
7
  export declare function isKeyword<T extends KeywordKind>(node: Node, kind?: T): node is Keyword<T>;
@@ -3,8 +3,9 @@ export * from './NodeKind.js';
3
3
  export * from './OperatorKind.js';
4
4
  export * from './TokenKind.js';
5
5
  export * from './TriviaKind.js';
6
+ export * from './TokenFlags.js';
7
+ export * from './KeywordFlags.js';
6
8
  export * from './BaseNode.js';
7
9
  export * from './Nodes.js';
8
- export * from './Token.js';
9
10
  export * from './Utils.js';
10
11
  export * from './NodePath.js';
@@ -4,7 +4,7 @@ import { Translation } from '../analysis/Translation.js';
4
4
  import { Lazy, Name, PackageDialect, PackageLocale } from '../common/index.js';
5
5
  import { TypeEntityMembers } from '../entities/TypeEntityMembers.js';
6
6
  import type { EntityContainingParameter, EntityContainingTypeParameter, EntityOwningGetter, PackageEntity, TextTranslationPackageEntityInfo, TypeEntityWithMembers, VariantTypeEntity } from '../entities/index.js';
7
- import { AliasTypeEntity, AliasTypeEntityDefinition, AliasedType, AnonymousFunctionTypeEntity, AnonymousStructuredTypeEntity, BaseAspectTypes, BaseObjectType, ConstructorEntity, ConstructorEntityDefinition, DefaultConstructorEntityInfo, EntityContext, EntityHidingLevel, EntityKind, EntityNaming, EntityOwningSetter, FieldEntity, FunctionEntityDefinition, FunctionTypeEntityDefinition, GetterEntity, GetterEntityDefinition, IndexerEntity, IndexerEntityDefinition, InterfacePackageEntityInfo, MethodEntity, PackageEntityDefinition, PackageEntityMembers, PackageFunctionEntity, PackageFunctionTypeEntity, PackageStructuredTypeEntity, PackageVariableEntity, PackageVariantTypeEntity, ParameterEntity, SetterEntity, SetterEntityDefinition, SpecialVariableEntityInfo, StructuredTypeEntityDefinition, StructuredTypeKind, SubstitutionApplicationMode, TypeEntityKind, TypeParameterConstraint, TypeParameterEntity, TypeParameterEntityDefinition, TypeWithMembersOrExtensionEntity, VariableEntityDefinition, VariantTypeEntityDefinition } from '../entities/index.js';
7
+ import { AliasTypeEntity, AliasTypeEntityDefinition, AliasedType, AnonymousFunctionTypeEntity, AnonymousStructuredTypeEntity, BaseAspectTypes, BaseObjectType, ConstructorEntity, ConstructorEntityDefinition, DefaultConstructorEntityInfo, EntityHidingLevel, EntityKind, EntityNaming, EntityOwningSetter, FieldEntity, FunctionEntityDefinition, FunctionTypeEntityDefinition, GetterEntity, GetterEntityDefinition, IndexerEntity, IndexerEntityDefinition, InterfacePackageEntityInfo, MethodEntity, PackageEntityDefinition, PackageEntityMembers, PackageFunctionEntity, PackageFunctionTypeEntity, PackageStructuredTypeEntity, PackageVariableEntity, PackageVariantTypeEntity, ParameterEntity, SetterEntity, SetterEntityDefinition, SpecialVariableEntityInfo, StructuredTypeEntityDefinition, StructuredTypeKind, SubstitutionApplicationMode, TypeEntityKind, TypeParameterConstraint, TypeParameterEntity, TypeParameterEntityDefinition, TypeWithMembersOrExtensionEntity, VariableEntityDefinition, VariantTypeEntityDefinition } from '../entities/index.js';
8
8
  import { JavaScriptImplementationConfig, PackageName, PlatformKind, ProgramPackage } from '../project/index.js';
9
9
  import * as tree from '../tree/index.js';
10
10
  import * as types from '../types/index.js';
@@ -189,7 +189,6 @@ export declare class TsGlobalClassOrInterfaceEntity implements PackageStructured
189
189
  isHidden(): EntityHidingLevel | undefined;
190
190
  getTags(): readonly Tag[];
191
191
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
192
- getContext(): EntityContext;
193
192
  getTranslation(): Translation | undefined;
194
193
  getLocale(): PackageLocale;
195
194
  getDialect(): PackageDialect;
@@ -223,7 +222,6 @@ export declare class SourceAndTsGlobalClassOrInterfaceMergeEntity implements Pac
223
222
  isHidden(): EntityHidingLevel | undefined;
224
223
  getTags(): readonly Tag[];
225
224
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
226
- getContext(): EntityContext;
227
225
  getTranslation(): Translation | undefined;
228
226
  getLocale(): PackageLocale;
229
227
  getDialect(): PackageDialect;
@@ -254,7 +252,6 @@ export declare class TsTypeLiteralEntity implements AnonymousStructuredTypeEntit
254
252
  getTags(): readonly Tag[];
255
253
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
256
254
  getContainingPackage(): PackageEntity;
257
- getContext(): EntityContext;
258
255
  getTranslation(): Translation | undefined;
259
256
  getLocale(): PackageLocale;
260
257
  getDialect(): PackageDialect;
@@ -293,7 +290,6 @@ export declare class TsNamedTypeLiteralEntity implements PackageStructuredTypeEn
293
290
  isHidden(): EntityHidingLevel | undefined;
294
291
  getTags(): readonly Tag[];
295
292
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
296
- getContext(): EntityContext;
297
293
  getTranslation(): Translation | undefined;
298
294
  getLocale(): PackageLocale;
299
295
  getDialect(): PackageDialect;
@@ -325,7 +321,6 @@ export declare class SourceAndTsNamedTypeLiteralMergeEntity implements PackageSt
325
321
  isHidden(): EntityHidingLevel | undefined;
326
322
  getTags(): readonly Tag[];
327
323
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
328
- getContext(): EntityContext;
329
324
  getTranslation(): Translation | undefined;
330
325
  getLocale(): PackageLocale;
331
326
  getDialect(): PackageDialect;
@@ -565,7 +560,6 @@ export declare class TsTypeParameterEntity implements TypeParameterEntity {
565
560
  getContainingPackage(): PackageEntity;
566
561
  isHidden(): EntityHidingLevel | undefined;
567
562
  getTags(): readonly Tag[];
568
- getContext(): EntityContext;
569
563
  getTranslation(): Translation | undefined;
570
564
  getLocale(): PackageLocale;
571
565
  getDialect(): PackageDialect;
@@ -672,7 +666,6 @@ export declare class TsEnumEntity implements PackageVariantTypeEntity {
672
666
  getTags(): readonly Tag[];
673
667
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
674
668
  getBaseObjectType(): BaseObjectType;
675
- getContext(): EntityContext;
676
669
  getTranslation(): Translation | undefined;
677
670
  getLocale(): PackageLocale;
678
671
  getDialect(): PackageDialect;
@@ -730,7 +723,6 @@ export declare class TsTypeAliasEntity implements AliasTypeEntity {
730
723
  isHidden(): EntityHidingLevel | undefined;
731
724
  getTags(): readonly Tag[];
732
725
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
733
- getContext(): EntityContext;
734
726
  getTranslation(): Translation | undefined;
735
727
  getLocale(): PackageLocale;
736
728
  getDialect(): PackageDialect;
@@ -763,7 +755,6 @@ export declare class TsAnonymousFunctionTypeEntity implements AnonymousFunctionT
763
755
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
764
756
  getContainingPackage(): PackageEntity;
765
757
  getBaseObjectType(): BaseObjectType;
766
- getContext(): EntityContext;
767
758
  getTranslation(): Translation | undefined;
768
759
  getLocale(): PackageLocale;
769
760
  getDialect(): PackageDialect;
@@ -814,7 +805,6 @@ export declare class TsNamedFunctionTypeEntity implements PackageFunctionTypeEnt
814
805
  getTags(): readonly Tag[];
815
806
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
816
807
  getBaseObjectType(): BaseObjectType;
817
- getContext(): EntityContext;
818
808
  getTranslation(): Translation | undefined;
819
809
  getLocale(): PackageLocale;
820
810
  getDialect(): PackageDialect;
@@ -3,7 +3,7 @@ import { Analyzer, WellKnownDeclarations } from '../analysis/index.js';
3
3
  import { Tag } from '../analysis/Tag.js';
4
4
  import { Translation } from '../analysis/Translation.js';
5
5
  import { Name, PackageDialect, PackageLocale } from '../common/index.js';
6
- import { EntityContext, EntityHidingLevel, EntityKind, InterfacePackageEntityInfo, PackageEntity, PackageEntityDefinition, PackageEntityMembers, TextTranslationPackageEntityInfo, TypeEntity, TypeEntityWithMembers } from '../entities/index.js';
6
+ import { EntityHidingLevel, EntityKind, InterfacePackageEntityInfo, PackageEntity, PackageEntityDefinition, PackageEntityMembers, TextTranslationPackageEntityInfo, TypeEntity, TypeEntityWithMembers } from '../entities/index.js';
7
7
  import { JavaScriptImplementationConfig, PackageName, PlatformKind, ProgramPackage } from '../project/index.js';
8
8
  import * as types from '../types/index.js';
9
9
  import { SourcePackageLoadedFromDtsEntity, TsPackageEntity } from './Entities.js';
@@ -43,7 +43,6 @@ export declare class TsInteropContext {
43
43
  ifTypeCanBeExpressedByFunctionTypeThenCallSignature(symbol: ts.Symbol): ts.Symbol | undefined;
44
44
  createName(original: string, ownerKind: 'type' | 'variable' | 'method'): Name;
45
45
  createDefaultExportTag(): Tag;
46
- createTypeEntityContext(entity: TypeEntity): EntityContext;
47
46
  private getPackagesCreationResult;
48
47
  private createPackages;
49
48
  private collectSubModulesInFilesRecursively;
@@ -16,6 +16,5 @@ export declare class AliasType implements IType {
16
16
  applySubstitutions(substitutions: Substitutions): Type;
17
17
  equals(other: Type, considerLocale?: boolean): boolean;
18
18
  getEntity(): AliasTypeEntity;
19
- getBaseObjectTypeOrAliasedType(): Type | undefined;
20
19
  toString(): string;
21
20
  }
@@ -19,6 +19,5 @@ export declare class FunctionType implements IType {
19
19
  getReturnType(): Type;
20
20
  getParameters(): readonly Parameter[];
21
21
  getBaseType(): Type | undefined;
22
- getBaseObjectTypeOrAliasedType(): Type | undefined;
23
22
  toString(): string;
24
23
  }
@@ -15,7 +15,6 @@ export declare class IntersectionType implements IType {
15
15
  getSubstitutions(): Substitutions;
16
16
  applySubstitutions(substitutions: Substitutions): Type;
17
17
  getEntity(): TypeEntity | undefined;
18
- getBaseObjectTypeOrAliasedType(): Type | undefined;
19
18
  toString(): string;
20
19
  private unaliasAndFlattenTypes;
21
20
  }
@@ -18,6 +18,5 @@ export declare class ParameterType implements IType {
18
18
  getEntity(): TypeParameterEntity;
19
19
  applySubstitutions(substitutions: Substitutions): Type;
20
20
  equals(other: Type, considerLocale?: boolean): boolean;
21
- getBaseObjectTypeOrAliasedType(): Type | undefined;
22
21
  toString(): string;
23
22
  }
@@ -17,10 +17,9 @@ export declare class StructuredType implements IType {
17
17
  getStructuredTypeKind(): StructuredTypeKind;
18
18
  markedBasic(): boolean;
19
19
  isAbstract(): boolean;
20
- equals(other: Type): boolean;
20
+ equals(other: Type, considerLocale?: boolean): boolean;
21
21
  getEntity(): StructuredTypeEntity;
22
22
  getBaseObjectType(): Type | undefined;
23
23
  getBaseAspectTypes(): readonly Type[];
24
- getBaseObjectTypeOrAliasedType(): Type | undefined;
25
24
  toString(): string;
26
25
  }
@@ -0,0 +1,21 @@
1
+ import { Analyzer } from '../analysis/index.js';
2
+ import { TypeEntity } from '../entities/index.js';
3
+ import { Substitutions } from './Substitutions.js';
4
+ import { IType, Type } from './Type.js';
5
+ /**
6
+ * Специальный тип, используемый при сравнении заголовков функций, имеющих параметры типа. При сравнении заголовков
7
+ * параметры типа считаются равными, если они находятся на одинаковых позициях.
8
+ */
9
+ export declare class SubstitutionStubType implements IType {
10
+ private readonly analyzer;
11
+ readonly index: number;
12
+ readonly kind = "substitution-stub";
13
+ get isNullType(): boolean;
14
+ get debuggerDisplay(): string;
15
+ constructor(analyzer: Analyzer, index: number);
16
+ equals(other: Type, _considerLocale?: boolean): boolean;
17
+ getSubstitutions(): Substitutions;
18
+ applySubstitutions(_substitutions: Substitutions): Type;
19
+ getEntity(): TypeEntity | undefined;
20
+ toString(): string;
21
+ }
@@ -4,15 +4,16 @@ import { FunctionType } from './FunctionType.js';
4
4
  import { IntersectionType } from './IntersectionType.js';
5
5
  import { ParameterType } from './ParameterType.js';
6
6
  import { StructuredType } from './StructuredType.js';
7
+ import { Substitutions } from './Substitutions.js';
8
+ import { SubstitutionStubType } from './SubstitutionStubType.js';
9
+ import { UnionType } from './UnionType.js';
7
10
  import { UnresolvedType } from './UnresolvedType.js';
8
11
  import { VariantType } from './VariantType.js';
9
- import { Substitutions, UnionType } from './index.js';
10
- export type Type = StructuredType | VariantType | FunctionType | AliasType | UnresolvedType | ParameterType | UnionType | IntersectionType;
12
+ export type Type = StructuredType | VariantType | FunctionType | AliasType | UnresolvedType | ParameterType | UnionType | IntersectionType | SubstitutionStubType;
11
13
  export interface IType {
12
14
  readonly isNullType: boolean;
13
15
  getSubstitutions(): Substitutions;
14
16
  applySubstitutions(substitutions: Substitutions): Type;
15
17
  equals(other: Type, considerLocale: boolean): boolean;
16
18
  getEntity(): TypeEntity | undefined;
17
- getBaseObjectTypeOrAliasedType(): Type | undefined;
18
19
  }
@@ -1,6 +1,6 @@
1
1
  import { Analyzer } from '../analysis/index.js';
2
2
  import { AliasTypeEntity, FunctionTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
3
- import { AliasType, FunctionType, ParameterType, StructuredType, Substitutions, Type, UnresolvedType, VariantType } from './index.js';
3
+ import { AliasType, FunctionType, ParameterType, StructuredType, Substitutions, SubstitutionStubType, Type, UnresolvedType, VariantType } from './index.js';
4
4
  export declare class TypeFactory {
5
5
  readonly analyzer: Analyzer;
6
6
  constructor(analyzer: Analyzer);
@@ -12,5 +12,6 @@ export declare class TypeFactory {
12
12
  getUnionType(types: readonly Type[], reduce?: boolean): Type;
13
13
  getIntersectionType(types: readonly Type[], reduce?: boolean): Type;
14
14
  getUnresolvedType(): UnresolvedType;
15
+ getSubstitutionStubType(index: number): SubstitutionStubType;
15
16
  private flattenAndExcludeDuplicateTypes;
16
17
  }
@@ -15,7 +15,6 @@ export declare class UnionType implements IType {
15
15
  getSubstitutions(): Substitutions;
16
16
  applySubstitutions(substitutions: Substitutions): Type;
17
17
  getEntity(): TypeEntity | undefined;
18
- getBaseObjectTypeOrAliasedType(): Type | undefined;
19
18
  toString(): string;
20
19
  private unaliasAndFlattenTypes;
21
20
  }
@@ -12,6 +12,5 @@ export declare class UnresolvedType implements IType {
12
12
  getSubstitutions(): Substitutions;
13
13
  applySubstitutions(_substitutions: Substitutions): Type;
14
14
  getEntity(): TypeEntity | undefined;
15
- getBaseObjectTypeOrAliasedType(): Type | undefined;
16
15
  toString(): string;
17
16
  }