@artel/artc 0.6.25281 → 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.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +18 -16
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1182 -979
- package/build/{chunk-TIWNEKIS.js → chunk-2Q4QKW7T.js} +9266 -8683
- package/build/{chunk-7OXU5662.js → chunk-7RAZAZE6.js} +3 -3
- package/build/{chunk-NVHCHE3R.js → chunk-MJ2ZVHII.js} +3 -3
- package/build/types/analysis/AccessedFunction.d.ts +4 -0
- package/build/types/analysis/Analyzer.d.ts +68 -109
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +5 -5
- package/build/types/analysis/BaseExpressionMeaning.d.ts +8 -18
- package/build/types/analysis/CallExpressionMeaning.d.ts +4 -9
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +8 -16
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +4 -8
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +8 -16
- package/build/types/analysis/NamedTypeResolver.d.ts +4 -4
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -4
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -1
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +4 -9
- package/build/types/analysis/PackageMemberConflictsValidator.d.ts +1 -1
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +48 -0
- package/build/types/analysis/SourceFileAnalyzer.d.ts +1 -0
- package/build/types/analysis/SubstitutedFunction.d.ts +3 -0
- package/build/types/analysis/TagMeaning.d.ts +4 -4
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +4 -3
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +4 -3
- package/build/types/analysis/Utils.d.ts +1 -0
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +4 -5
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +4 -4
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +4 -5
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +11 -7
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +4 -5
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +8 -8
- package/build/types/api/Api.d.ts +4 -5
- package/build/types/common/ArrayUtils.d.ts +3 -1
- package/build/types/common/Displayable.d.ts +4 -4
- package/build/types/common/FormatString.d.ts +1 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/LocalizationHelper.d.ts +6 -4
- package/build/types/common/index.d.ts +3 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +248 -238
- package/build/types/diagnostic/DiagnosticData.d.ts +2 -2
- package/build/types/emitter/EntityMap.d.ts +1 -1
- package/build/types/emitter/IrBuilder.d.ts +3 -1
- package/build/types/emitter/IrFactory.d.ts +2 -2
- package/build/types/emitter/Transformer.d.ts +3 -3
- package/build/types/emitter/ir/Nodes.d.ts +17 -8
- package/build/types/emitter/ir/types.d.ts +2 -2
- package/build/types/entities/Entity.d.ts +0 -12
- package/build/types/entities/EntityLocalizationContext.d.ts +1 -2
- package/build/types/entities/IEntity.d.ts +2 -1
- package/build/types/entities/OperatorKind.d.ts +6 -3
- package/build/types/entities/{PackageMembers.d.ts → PackageEntityMembers.d.ts} +1 -1
- package/build/types/entities/TypeEntity.d.ts +4 -4
- package/build/types/entities/index.d.ts +1 -1
- package/build/types/entities/interfaces/AliasTypeEntity.d.ts +3 -8
- package/build/types/entities/interfaces/ConstructorEntity.d.ts +0 -4
- package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +0 -4
- package/build/types/entities/interfaces/DestructorEntity.d.ts +0 -4
- package/build/types/entities/interfaces/FunctionEntity.d.ts +1 -8
- package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +0 -8
- package/build/types/entities/interfaces/GetterEntity.d.ts +0 -4
- package/build/types/entities/interfaces/IndexerEntity.d.ts +0 -4
- package/build/types/entities/interfaces/OperatorEntity.d.ts +0 -4
- package/build/types/entities/interfaces/PackageAliasEntity.d.ts +0 -5
- package/build/types/entities/interfaces/PackageEntity.d.ts +2 -11
- package/build/types/entities/interfaces/SetterEntity.d.ts +0 -4
- package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +0 -8
- package/build/types/entities/interfaces/TextTranslationEntity.d.ts +1 -0
- package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +1 -7
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +0 -2
- package/build/types/entities/interfaces/VariableEntity.d.ts +2 -12
- package/build/types/entities/interfaces/VariantTypeEntity.d.ts +1 -8
- package/build/types/entities/intrinsic/IntrinsicFunctionTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicTypeParameterEntity.d.ts +2 -4
- package/build/types/entities/source/SourceAliasTypeEntity.d.ts +1 -2
- package/build/types/entities/source/SourceFunctionTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourcePackageEntity.d.ts +1 -2
- package/build/types/entities/source/SourceStructuredTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourceTextTranslationEntity.d.ts +1 -0
- package/build/types/entities/source/SourceTypeExtensionEntity.d.ts +1 -2
- package/build/types/entities/source/SourceTypeParameterEntity.d.ts +1 -2
- package/build/types/entities/source/SourceVariableEntity.d.ts +2 -2
- package/build/types/entities/source/SourceVariantTypeEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -3
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +1 -5
- package/build/types/parser/KeywordDictionary.d.ts +10 -2
- package/build/types/parser/TokenKind.d.ts +46 -44
- package/build/types/services/CustomRequests.d.ts +24 -4
- package/build/types/services/DisplayService.d.ts +10 -3
- package/build/types/services/LanguageServer.d.ts +4 -3
- package/build/types/services/ScriptEditingService.d.ts +25 -0
- package/build/types/services/SourceFileItemsService.d.ts +1 -1
- package/build/types/services/Types.d.ts +6 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +12 -0
- package/build/types/tree/BaseNode.d.ts +56 -2
- package/build/types/tree/KeywordFlags.d.ts +28 -0
- package/build/types/tree/KeywordKind.d.ts +3 -1
- package/build/types/tree/NodeKind.d.ts +1 -1
- package/build/types/tree/Nodes.d.ts +10 -24
- package/build/types/tree/NodesDebug.d.ts +9 -0
- package/build/types/tree/OperatorKind.d.ts +6 -3
- package/build/types/tree/SyntaxFactory.d.ts +31 -29
- package/build/types/tree/SyntaxToCode.d.ts +4 -1
- package/build/types/tree/TokenFlags.d.ts +15 -0
- package/build/types/tree/TokenKind.d.ts +63 -51
- package/build/types/tree/Utils.d.ts +2 -2
- package/build/types/tree/index.d.ts +2 -1
- package/build/types/ts-interop/Entities.d.ts +1 -11
- package/build/types/ts-interop/TsInteropContext.d.ts +1 -2
- package/build/types/types/AliasType.d.ts +1 -2
- package/build/types/types/FunctionType.d.ts +2 -3
- package/build/types/types/IntersectionType.d.ts +1 -2
- package/build/types/types/ParameterType.d.ts +1 -2
- package/build/types/types/StructuredType.d.ts +1 -2
- package/build/types/types/SubstitutionStubType.d.ts +21 -0
- package/build/types/types/Substitutions.d.ts +1 -1
- package/build/types/types/Type.d.ts +5 -7
- package/build/types/types/TypeFactory.d.ts +2 -1
- package/build/types/types/TypeMembers.d.ts +8 -8
- package/build/types/types/UnionType.d.ts +1 -2
- package/build/types/types/UnresolvedType.d.ts +0 -1
- package/build/types/types/VariantType.d.ts +1 -2
- package/build/types/types/index.d.ts +2 -1
- package/package.json +1 -1
- package/build/types/analysis/SourceFileMembers.d.ts +0 -29
- package/build/types/services/AssignFieldService.d.ts +0 -10
- package/build/types/services/DeleteBlockFromScriptService.d.ts +0 -6
- package/build/types/tree/Token.d.ts +0 -57
- /package/build/types/services/{ProjectItemsService.d.ts → WorkspaceItemsService.d.ts} +0 -0
|
@@ -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
|
|
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
|
|
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;
|
|
@@ -48,7 +49,7 @@ export declare class SyntaxToCode {
|
|
|
48
49
|
private writeIndexedElementSetterDeclaration;
|
|
49
50
|
private writeDereferencedVariableGetterDeclaration;
|
|
50
51
|
private writeDereferencedVariableSetterDeclaration;
|
|
51
|
-
private
|
|
52
|
+
private writeVariantValueDeclaration;
|
|
52
53
|
private writeTypeMemberGroupDeclaration;
|
|
53
54
|
private writeTypeParameterClause;
|
|
54
55
|
private writeTypeParameterDeclaration;
|
|
@@ -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
|
+
}
|
|
@@ -4,33 +4,33 @@ export declare enum TokenKind {
|
|
|
4
4
|
IntegerLiteral = 2,
|
|
5
5
|
RealLiteral = 3,
|
|
6
6
|
MeasureLiteral = 4,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
TextLiteral = 5,
|
|
8
|
+
TextTemplateHead = 6,
|
|
9
|
+
TextTemplatePart = 7,
|
|
10
|
+
TextTemplateTail = 8,
|
|
11
|
+
Identifier = 9,
|
|
12
|
+
Ampersand = 10,
|
|
13
|
+
AmpersandAmpersand = 11,
|
|
14
|
+
AmpersandEquals = 12,
|
|
15
|
+
Asterisk = 13,
|
|
16
|
+
AsteriskAsterisk = 14,
|
|
17
|
+
AsteriskEquals = 15,
|
|
18
|
+
BackQuote = 16,
|
|
19
|
+
Bar = 17,
|
|
20
|
+
BarBar = 18,
|
|
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
34
|
Exclamation = 32,
|
|
35
35
|
ExclamationEquals = 33,
|
|
36
36
|
GreaterThan = 34,
|
|
@@ -39,30 +39,36 @@ export declare enum TokenKind {
|
|
|
39
39
|
LessThan = 37,
|
|
40
40
|
LessThanOrEqual = 38,
|
|
41
41
|
LessThanMinus = 39,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
|
66
72
|
}
|
|
67
73
|
export declare const tokenKindValues: {
|
|
68
74
|
0: string;
|
|
@@ -129,4 +135,10 @@ export declare const tokenKindValues: {
|
|
|
129
135
|
61: string;
|
|
130
136
|
62: string;
|
|
131
137
|
63: string;
|
|
138
|
+
64: string;
|
|
139
|
+
65: string;
|
|
140
|
+
66: string;
|
|
141
|
+
67: string;
|
|
142
|
+
68: string;
|
|
143
|
+
69: string;
|
|
132
144
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TokenKind } from './TokenKind.js';
|
|
2
2
|
import { KeywordKind } from './KeywordKind.js';
|
|
3
|
-
import { Token } from './
|
|
4
|
-
import { Identifier,
|
|
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,
|
|
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 {
|
|
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;
|
|
@@ -14,8 +14,7 @@ export declare class AliasType implements IType {
|
|
|
14
14
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
15
15
|
getSubstitutions(): Substitutions;
|
|
16
16
|
applySubstitutions(substitutions: Substitutions): Type;
|
|
17
|
-
equals(other: Type): boolean;
|
|
17
|
+
equals(other: Type, considerLocale?: boolean): boolean;
|
|
18
18
|
getEntity(): AliasTypeEntity;
|
|
19
|
-
getBaseObjectTypeOrAliasedType(): Type | undefined;
|
|
20
19
|
toString(): string;
|
|
21
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
2
|
import { FunctionTypeEntity, TypeParameterEntity } from '../entities/index.js';
|
|
3
|
-
import { IType, Substitutions, Type
|
|
3
|
+
import { IType, Parameter, Substitutions, Type } from './index.js';
|
|
4
4
|
export declare class FunctionType implements IType {
|
|
5
5
|
private readonly analyzer;
|
|
6
6
|
private readonly entity;
|
|
@@ -13,12 +13,11 @@ export declare class FunctionType implements IType {
|
|
|
13
13
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
14
14
|
getSubstitutions(): Substitutions;
|
|
15
15
|
applySubstitutions(substitutions: Substitutions): FunctionType;
|
|
16
|
-
equals(other: Type): boolean;
|
|
16
|
+
equals(other: Type, considerLocale?: boolean): boolean;
|
|
17
17
|
getEntity(): FunctionTypeEntity;
|
|
18
18
|
isAsync(): boolean;
|
|
19
19
|
getReturnType(): Type;
|
|
20
20
|
getParameters(): readonly Parameter[];
|
|
21
21
|
getBaseType(): Type | undefined;
|
|
22
|
-
getBaseObjectTypeOrAliasedType(): Type | undefined;
|
|
23
22
|
toString(): string;
|
|
24
23
|
}
|
|
@@ -11,11 +11,10 @@ export declare class IntersectionType implements IType {
|
|
|
11
11
|
get unaliasedFlattenedTypes(): readonly Type[];
|
|
12
12
|
get debuggerDisplay(): string;
|
|
13
13
|
constructor(analyzer: Analyzer, originalTypes: readonly Type[]);
|
|
14
|
-
equals(other: Type): boolean;
|
|
14
|
+
equals(other: Type, considerLocale?: boolean): boolean;
|
|
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
|
}
|
|
@@ -17,7 +17,6 @@ export declare class ParameterType implements IType {
|
|
|
17
17
|
getSubstitutions(): Substitutions;
|
|
18
18
|
getEntity(): TypeParameterEntity;
|
|
19
19
|
applySubstitutions(substitutions: Substitutions): Type;
|
|
20
|
-
equals(other: Type): boolean;
|
|
21
|
-
getBaseObjectTypeOrAliasedType(): Type | undefined;
|
|
20
|
+
equals(other: Type, considerLocale?: boolean): boolean;
|
|
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
|
+
}
|
|
@@ -28,6 +28,6 @@ export declare class Substitutions {
|
|
|
28
28
|
getTypes(): Iterable<Type>;
|
|
29
29
|
substituteTypes(substitutions: Substitutions): Substitutions;
|
|
30
30
|
substituteTypesAndMerge(substitutions: Substitutions): Substitutions;
|
|
31
|
-
equals(other: Substitutions): boolean;
|
|
31
|
+
equals(other: Substitutions, considerLocale?: boolean): boolean;
|
|
32
32
|
}
|
|
33
33
|
export type SubstitutionMap = ReadonlyMap<TypeParameterEntity, Type>;
|
|
@@ -4,18 +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
|
-
|
|
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
|
-
|
|
16
|
-
* Сравнивает типы без учёта языка.
|
|
17
|
-
*/
|
|
18
|
-
equals(other: Type): boolean;
|
|
17
|
+
equals(other: Type, considerLocale: boolean): boolean;
|
|
19
18
|
getEntity(): TypeEntity | undefined;
|
|
20
|
-
getBaseObjectTypeOrAliasedType(): Type | undefined;
|
|
21
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
|
}
|
|
@@ -30,7 +30,7 @@ export declare class Method implements ITypeMember {
|
|
|
30
30
|
isOverride(): boolean;
|
|
31
31
|
applySubstitutions(substitutions: Substitutions): Method;
|
|
32
32
|
getTypeParametersArity(): number;
|
|
33
|
-
equals(other: TypeMember): boolean;
|
|
33
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
34
34
|
toString(): string;
|
|
35
35
|
}
|
|
36
36
|
export declare class Parameter {
|
|
@@ -60,7 +60,7 @@ export declare class Field implements ITypeMember {
|
|
|
60
60
|
isOverride(): boolean;
|
|
61
61
|
isVariant(): boolean;
|
|
62
62
|
applySubstitutions(substitutions: Substitutions): Field;
|
|
63
|
-
equals(other: TypeMember): boolean;
|
|
63
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
64
64
|
toString(): string;
|
|
65
65
|
}
|
|
66
66
|
export declare class Operator implements ITypeMember {
|
|
@@ -82,7 +82,7 @@ export declare class Operator implements ITypeMember {
|
|
|
82
82
|
isStatic(): boolean;
|
|
83
83
|
isOverride(): boolean;
|
|
84
84
|
applySubstitutions(substitutions: Substitutions): Operator;
|
|
85
|
-
equals(other: TypeMember): boolean;
|
|
85
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
86
86
|
toString(): string;
|
|
87
87
|
}
|
|
88
88
|
export declare class Constructor implements ITypeMember {
|
|
@@ -100,7 +100,7 @@ export declare class Constructor implements ITypeMember {
|
|
|
100
100
|
isStatic(): boolean;
|
|
101
101
|
applySubstitutions(substitutions: Substitutions): TypeMember;
|
|
102
102
|
getConstructedType(): Type;
|
|
103
|
-
equals(other: TypeMember): boolean;
|
|
103
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
104
104
|
toString(): string;
|
|
105
105
|
}
|
|
106
106
|
export declare class Destructor implements ITypeMember {
|
|
@@ -116,7 +116,7 @@ export declare class Destructor implements ITypeMember {
|
|
|
116
116
|
isHidden(): EntityHidingLevel | undefined;
|
|
117
117
|
isStatic(): boolean;
|
|
118
118
|
applySubstitutions(substitutions: Substitutions): Destructor;
|
|
119
|
-
equals(other: TypeMember): boolean;
|
|
119
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
120
120
|
toString(): string;
|
|
121
121
|
}
|
|
122
122
|
export declare class Indexer implements ITypeMember {
|
|
@@ -134,7 +134,7 @@ export declare class Indexer implements ITypeMember {
|
|
|
134
134
|
isStatic(): boolean;
|
|
135
135
|
isOverride(): boolean;
|
|
136
136
|
applySubstitutions(substitutions: Substitutions): Indexer;
|
|
137
|
-
equals(other: TypeMember): boolean;
|
|
137
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
138
138
|
toString(): string;
|
|
139
139
|
}
|
|
140
140
|
export declare class DereferenceOperator implements ITypeMember {
|
|
@@ -150,13 +150,13 @@ export declare class DereferenceOperator implements ITypeMember {
|
|
|
150
150
|
isStatic(): boolean;
|
|
151
151
|
isOverride(): boolean;
|
|
152
152
|
applySubstitutions(substitutions: Substitutions): DereferenceOperator;
|
|
153
|
-
equals(other: TypeMember): boolean;
|
|
153
|
+
equals(other: TypeMember, considerLocale?: boolean): boolean;
|
|
154
154
|
toString(): string;
|
|
155
155
|
}
|
|
156
156
|
export interface ITypeMember {
|
|
157
157
|
isHidden(): EntityHidingLevel | undefined;
|
|
158
158
|
isStatic(): boolean;
|
|
159
159
|
getSubstitutions(): Substitutions;
|
|
160
|
-
equals(other: TypeMember): boolean;
|
|
160
|
+
equals(other: TypeMember, considerLocale: boolean): boolean;
|
|
161
161
|
applySubstitutions(substitutions: Substitutions): TypeMember;
|
|
162
162
|
}
|