@artel/artc 0.6.25282 → 0.6.25284
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 +28 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1836 -1590
- package/build/{chunk-VVFLEWSA.js → chunk-CGOSDN2E.js} +18023 -15286
- package/build/{chunk-DURHSZYF.js → chunk-OBX375YX.js} +1 -1
- package/build/{chunk-3DN3M64Y.js → chunk-ZV3UW5X6.js} +2 -2
- package/build/types/analysis/AccessibilityCheck.d.ts +20 -0
- package/build/types/analysis/Analyzer.d.ts +53 -78
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +2 -4
- package/build/types/analysis/ConstructorCallResolver.d.ts +3 -4
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -1
- package/build/types/analysis/ModifierValidator.d.ts +17 -15
- package/build/types/analysis/NodeTypeUtils.d.ts +3 -3
- package/build/types/analysis/PackageMemberLookup.d.ts +11 -4
- package/build/types/analysis/ReachabilityChecker.d.ts +27 -0
- package/build/types/analysis/ReductionSourceMemberFinder.d.ts +20 -0
- package/build/types/analysis/ReservedNameDictionary.d.ts +14 -0
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +48 -0
- package/build/types/analysis/SourceFileAnalyzer.d.ts +3 -0
- package/build/types/analysis/TypeArgumentInferrer.d.ts +1 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +36 -22
- package/build/types/analysis/Utils.d.ts +2 -0
- package/build/types/analysis/WellKnownDeclarations.d.ts +11 -7
- package/build/types/analysis/control-flow/GraphBuilder.d.ts +4 -1
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +6 -5
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +8 -7
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +4 -5
- package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +2 -0
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +11 -6
- package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -5
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +4 -5
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +18 -15
- package/build/types/api/Api.d.ts +1 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/LocalizationHelper.d.ts +8 -6
- package/build/types/common/index.d.ts +0 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +154 -131
- package/build/types/emitter/Entities.d.ts +5 -4
- package/build/types/emitter/EntityMap.d.ts +5 -1
- package/build/types/emitter/IrBuilder.d.ts +1 -0
- package/build/types/emitter/ir/Nodes.d.ts +11 -2
- package/build/types/entities/Entity.d.ts +9 -18
- package/build/types/entities/EntityHiding.d.ts +1 -4
- package/build/types/entities/EntityLocalizationContext.d.ts +3 -3
- package/build/types/entities/IEntity.d.ts +2 -1
- package/build/types/entities/OperatorKind.d.ts +6 -3
- package/build/types/entities/TypeEntity.d.ts +7 -6
- package/build/types/entities/index.d.ts +0 -2
- package/build/types/entities/interfaces/AliasTypeEntity.d.ts +1 -6
- package/build/types/entities/interfaces/ConstructorEntity.d.ts +3 -5
- package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +2 -5
- package/build/types/entities/interfaces/DestructorEntity.d.ts +4 -5
- package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -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 +2 -5
- package/build/types/entities/interfaces/OperatorEntity.d.ts +3 -5
- package/build/types/entities/interfaces/PackageAliasEntity.d.ts +0 -5
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -9
- package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +99 -0
- 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 +2 -4
- package/build/types/entities/interfaces/VariableEntity.d.ts +2 -11
- package/build/types/entities/interfaces/VariantTypeEntity.d.ts +1 -8
- package/build/types/entities/interfaces/index.d.ts +1 -0
- package/build/types/entities/intrinsic/IntrinsicConstructorEntity.d.ts +3 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +2 -1
- 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/intrinsic/IntrinsicVariableEntity.d.ts +2 -1
- package/build/types/entities/source/SourceAliasTypeEntity.d.ts +1 -2
- package/build/types/entities/source/SourceConstructorEntity.d.ts +6 -2
- package/build/types/entities/source/SourceDereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/source/SourceDestructorEntity.d.ts +6 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +5 -1
- package/build/types/entities/source/SourceFunctionTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourceIndexerEntity.d.ts +3 -1
- package/build/types/entities/source/SourceOperatorEntity.d.ts +5 -1
- package/build/types/entities/source/SourceReducedTypeEntity.d.ts +44 -0
- 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 +7 -1
- package/build/types/entities/source/SourceVariantTypeEntity.d.ts +1 -3
- package/build/types/entities/source/index.d.ts +1 -0
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +9 -4
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +4 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +59 -0
- 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/TranslatedVariableEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/index.d.ts +1 -0
- package/build/types/parser/KeywordDictionary.d.ts +10 -2
- package/build/types/parser/TokenKind.d.ts +46 -44
- package/build/types/project/SourceFile.d.ts +3 -1
- package/build/types/services/CompletionService.d.ts +5 -4
- package/build/types/services/CustomRequests.d.ts +17 -6
- package/build/types/services/DisplayService.d.ts +78 -3
- package/build/types/services/LanguageServer.d.ts +3 -4
- package/build/types/services/ScriptEditingService.d.ts +25 -0
- package/build/types/services/TranslationService.d.ts +1 -1
- package/build/types/services/Types.d.ts +6 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +16 -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 +57 -54
- package/build/types/tree/NodeKind.d.ts +142 -140
- package/build/types/tree/Nodes.d.ts +55 -29
- 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 +33 -29
- package/build/types/tree/SyntaxToCode.d.ts +4 -0
- package/build/types/tree/TokenFlags.d.ts +15 -0
- package/build/types/tree/TokenKind.d.ts +58 -44
- 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 +11 -12
- package/build/types/ts-interop/TsInteropContext.d.ts +1 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
- package/build/types/types/AliasType.d.ts +0 -1
- package/build/types/types/FunctionType.d.ts +0 -1
- package/build/types/types/IntersectionType.d.ts +0 -1
- package/build/types/types/ParameterType.d.ts +0 -1
- package/build/types/types/ReducedType.d.ts +24 -0
- package/build/types/types/StructuredType.d.ts +1 -2
- package/build/types/types/SubstitutionStubType.d.ts +21 -0
- package/build/types/types/Type.d.ts +5 -3
- package/build/types/types/TypeFactory.d.ts +4 -2
- package/build/types/types/UnionType.d.ts +0 -1
- package/build/types/types/UnresolvedType.d.ts +0 -1
- package/build/types/types/VariantType.d.ts +0 -1
- package/build/types/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +0 -14
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +0 -11
- package/build/types/entities/EntityHidingMatcherWithinTypeEntity.d.ts +0 -10
- package/build/types/parser/ReservedIdentifierDictionary.d.ts +0 -11
- package/build/types/services/AddBlockToScriptService.d.ts +0 -17
- 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 -58
- /package/build/types/services/{ProjectItemsService.d.ts → WorkspaceItemsService.d.ts} +0 -0
|
@@ -1,35 +1,37 @@
|
|
|
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
|
+
static packageReducedTypeDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeParameters: readonly tree.TypeParameterDeclaration[] | undefined, body: tree.ReducedTypeDeclarationBody): tree.PackageReducedTypeDeclaration;
|
|
9
|
+
static reducedTypeDeclarationBody(reductionSourceSpecifier: tree.NamedTypeSpecifier, preservedTypes: readonly tree.NamedTypeSpecifier[] | undefined, members: readonly tree.TypeMemberDeclaration[]): tree.ReducedTypeDeclarationBody;
|
|
8
10
|
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;
|
|
11
|
+
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;
|
|
12
|
+
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
13
|
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;
|
|
14
|
+
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
15
|
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;
|
|
16
|
+
static packageVariableDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier | undefined, initializer?: tree.Expression): tree.PackageVariableDeclaration;
|
|
17
|
+
static packageVariableGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.PackageVariableGetterDeclaration;
|
|
18
|
+
static packageVariableSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, body: tree.FunctionBlock | undefined): tree.PackageVariableSetterDeclaration;
|
|
19
|
+
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
20
|
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;
|
|
21
|
+
static fieldDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier | undefined, initializer?: tree.Expression): tree.FieldDeclaration;
|
|
22
|
+
static fieldGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.FieldGetterDeclaration;
|
|
23
|
+
static fieldSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, body: tree.FunctionBlock | undefined): tree.FieldSetterDeclaration;
|
|
24
|
+
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
25
|
static constructorDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.ConstructorDeclaration;
|
|
24
26
|
static destructorDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.DestructorDeclaration;
|
|
25
27
|
static indexedElementGetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], typeSpecifier: tree.TypeSpecifier, body: tree.FunctionBlock | undefined): tree.IndexedElementGetterDeclaration;
|
|
26
28
|
static indexedElementSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.IndexedElementSetterDeclaration;
|
|
27
29
|
static typeMemberGroupDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], members: readonly tree.TypeMemberDeclaration[]): tree.TypeMemberGroupDeclaration;
|
|
28
30
|
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;
|
|
31
|
+
static variantValueDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: tree.Identifier | string, value?: tree.Expression): tree.VariantValueDeclaration;
|
|
30
32
|
static parameterClause(parameters: readonly tree.ParameterDeclaration[]): tree.ParameterClause;
|
|
31
33
|
static indexParameterClause(indexParameters: readonly tree.ParameterDeclaration[]): tree.IndexParameterClause;
|
|
32
|
-
static namedTypeSpecifier(name: string | readonly string[], typeArguments?: readonly tree.TypeSpecifier[]): tree.NamedTypeSpecifier;
|
|
34
|
+
static namedTypeSpecifier(name: tree.Identifier | string | readonly (tree.Identifier | string)[], typeArguments?: readonly tree.TypeSpecifier[]): tree.NamedTypeSpecifier;
|
|
33
35
|
static unionTypeSpecifier(typeSpecifiers: readonly tree.TypeSpecifier[]): tree.UnionTypeSpecifier;
|
|
34
36
|
static intersectionTypeSpecifier(typeSpecifiers: readonly tree.TypeSpecifier[]): tree.IntersectionTypeSpecifier;
|
|
35
37
|
static nullableTypeSpecifier(typeSpecifier: tree.TypeSpecifier): tree.NullableTypeSpecifier;
|
|
@@ -37,9 +39,9 @@ export declare class SyntaxFactory {
|
|
|
37
39
|
static anonymousStructuredTypeSpecifier(body: tree.StructuredTypeDeclarationBody): tree.AnonymousTypeSpecifier;
|
|
38
40
|
static anonymousFunctionTypeSpecifier(body: tree.FunctionTypeDeclarationBody): tree.AnonymousTypeSpecifier;
|
|
39
41
|
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;
|
|
42
|
+
static typeParameterDeclaration(name: tree.Identifier | string, constraint?: tree.TypeSpecifier, defaultType?: tree.TypeSpecifier): tree.TypeParameterDeclaration;
|
|
43
|
+
static parameterDeclaration(tags: readonly tree.Tag[], name: tree.Identifier | string, typeSpecifier: tree.TypeSpecifier | undefined, defaultValue?: tree.Expression): tree.ParameterDeclaration;
|
|
44
|
+
static tag(name: tree.Identifier | string | readonly (tree.Identifier | string)[], typeArguments?: readonly tree.TypeSpecifier[], args?: readonly tree.Argument[]): tree.Tag;
|
|
43
45
|
static modifier(value: tree.ModifierKeywordKind, level?: tree.ModifierLevelKeyword['keywordKind']): tree.Modifier;
|
|
44
46
|
static typeArgumentClause(typeArguments: readonly tree.TypeSpecifier[]): tree.TypeArgumentClause;
|
|
45
47
|
static typeAnnotation(typeSpecifier: tree.TypeSpecifier): tree.TypeAnnotation;
|
|
@@ -49,21 +51,23 @@ export declare class SyntaxFactory {
|
|
|
49
51
|
static nullLiteral(): tree.KeywordExpression;
|
|
50
52
|
static integerLiteral(value: number | string): tree.TokenExpression;
|
|
51
53
|
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;
|
|
54
|
+
static packageVariableTranslation(sourceName: tree.Identifier | string, translatedName: tree.Identifier | string): tree.PackageVariableTranslationDeclaration;
|
|
55
|
+
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;
|
|
56
|
+
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;
|
|
57
|
+
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;
|
|
58
|
+
static fieldOrVariantTranslation(sourceName: tree.Identifier | string, translatedName: tree.Identifier | string): tree.FieldOrVariantTranslation;
|
|
59
|
+
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
60
|
static constructorTranslation(sourceParameters: readonly string[], translatedParameters: readonly string[]): tree.ConstructorTranslation;
|
|
59
61
|
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;
|
|
62
|
+
static translationParameterClause(parameters: readonly (tree.Identifier | string)[]): tree.TranslationParameterClause;
|
|
63
|
+
static indexParameterTranslationClause(parameters: readonly (tree.Identifier | string)[]): tree.IndexParameterTranslationClause;
|
|
64
|
+
static identifier(value: tree.Identifier | string): tree.Identifier;
|
|
62
65
|
static token<T extends tree.TokenKind>(kind: T, value?: string): tree.Token<T>;
|
|
63
66
|
static keyword<T extends tree.KeywordKind>(kind: T): tree.Keyword<T>;
|
|
67
|
+
private static createToken;
|
|
68
|
+
private static createKeyword;
|
|
64
69
|
private static createTypeParameterClause;
|
|
65
70
|
private static createTranslationTypeParameterClause;
|
|
66
71
|
private static createTypeAnnotation;
|
|
67
|
-
private static
|
|
68
|
-
private static createTokenSeparatedElements;
|
|
72
|
+
private static createSeparatedElements;
|
|
69
73
|
}
|
|
@@ -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;
|
|
@@ -27,6 +28,7 @@ export declare class SyntaxToCode {
|
|
|
27
28
|
private writePackageFunctionDeclaration;
|
|
28
29
|
private writePackageStructuredTypeDeclaration;
|
|
29
30
|
private writePackageAliasTypeDeclaration;
|
|
31
|
+
private writePackageReducedTypeDeclaration;
|
|
30
32
|
private writePackageVariantTypeDeclaration;
|
|
31
33
|
private writePackageFunctionTypeDeclaration;
|
|
32
34
|
private writePackageMemberGroupDeclaration;
|
|
@@ -98,6 +100,7 @@ export declare class SyntaxToCode {
|
|
|
98
100
|
private writeSemicolonSeparatedList;
|
|
99
101
|
private writeCommaSeparatedList;
|
|
100
102
|
private writeKeyword;
|
|
103
|
+
private getModifierPreferredFlags;
|
|
101
104
|
private writeToken;
|
|
102
105
|
private writeNode;
|
|
103
106
|
private writeNewLineOrWhitespace;
|
|
@@ -114,6 +117,7 @@ export interface SyntaxToCodeOptions {
|
|
|
114
117
|
newLine?: '\n' | '\r\n';
|
|
115
118
|
indentationStep?: string;
|
|
116
119
|
initialIndentation?: string;
|
|
120
|
+
modifiersOnSeparateLine?: boolean;
|
|
117
121
|
keywordsLocale?: PackageLocale;
|
|
118
122
|
keywordsDialect?: PackageDialect;
|
|
119
123
|
}
|
|
@@ -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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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 './
|
|
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';
|
|
@@ -3,8 +3,8 @@ import { Tag } from '../analysis/Tag.js';
|
|
|
3
3
|
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
|
-
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,
|
|
6
|
+
import type { EntityContainingParameter, EntityContainingTypeParameter, EntityOwningGetter, PackageEntity, PreservedReducedTypeEntityMemberInfo, ReducedTypeEntity, TextTranslationPackageEntityInfo, TypeEntityWithMembers, VariantTypeEntity } 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';
|
|
@@ -46,6 +46,7 @@ export declare class SourcePackageLoadedFromDtsEntity implements PackageEntity {
|
|
|
46
46
|
getImplementedInterfacePackage(): PackageEntity | undefined;
|
|
47
47
|
getSupportedPlatforms(): readonly PlatformKind[];
|
|
48
48
|
getPackageAliasTypeDeclarationEntity(node: tree.PackageAliasTypeDeclaration): AliasTypeEntity;
|
|
49
|
+
getPackageReducedTypeDeclarationEntity(node: tree.PackageReducedTypeDeclaration): ReducedTypeEntity;
|
|
49
50
|
getPackageFunctionDeclarationEntity(node: tree.PackageFunctionDeclaration): PackageFunctionEntity;
|
|
50
51
|
getPackageFunctionTypeDeclarationEntity(node: tree.PackageFunctionTypeDeclaration): PackageFunctionTypeEntity;
|
|
51
52
|
getPackageStructuredTypeDeclarationEntity(node: tree.PackageStructuredTypeDeclaration): PackageStructuredTypeEntity;
|
|
@@ -189,7 +190,6 @@ export declare class TsGlobalClassOrInterfaceEntity implements PackageStructured
|
|
|
189
190
|
isHidden(): EntityHidingLevel | undefined;
|
|
190
191
|
getTags(): readonly Tag[];
|
|
191
192
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
192
|
-
getContext(): EntityContext;
|
|
193
193
|
getTranslation(): Translation | undefined;
|
|
194
194
|
getLocale(): PackageLocale;
|
|
195
195
|
getDialect(): PackageDialect;
|
|
@@ -223,7 +223,6 @@ export declare class SourceAndTsGlobalClassOrInterfaceMergeEntity implements Pac
|
|
|
223
223
|
isHidden(): EntityHidingLevel | undefined;
|
|
224
224
|
getTags(): readonly Tag[];
|
|
225
225
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
226
|
-
getContext(): EntityContext;
|
|
227
226
|
getTranslation(): Translation | undefined;
|
|
228
227
|
getLocale(): PackageLocale;
|
|
229
228
|
getDialect(): PackageDialect;
|
|
@@ -254,7 +253,6 @@ export declare class TsTypeLiteralEntity implements AnonymousStructuredTypeEntit
|
|
|
254
253
|
getTags(): readonly Tag[];
|
|
255
254
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
256
255
|
getContainingPackage(): PackageEntity;
|
|
257
|
-
getContext(): EntityContext;
|
|
258
256
|
getTranslation(): Translation | undefined;
|
|
259
257
|
getLocale(): PackageLocale;
|
|
260
258
|
getDialect(): PackageDialect;
|
|
@@ -293,7 +291,6 @@ export declare class TsNamedTypeLiteralEntity implements PackageStructuredTypeEn
|
|
|
293
291
|
isHidden(): EntityHidingLevel | undefined;
|
|
294
292
|
getTags(): readonly Tag[];
|
|
295
293
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
296
|
-
getContext(): EntityContext;
|
|
297
294
|
getTranslation(): Translation | undefined;
|
|
298
295
|
getLocale(): PackageLocale;
|
|
299
296
|
getDialect(): PackageDialect;
|
|
@@ -325,7 +322,6 @@ export declare class SourceAndTsNamedTypeLiteralMergeEntity implements PackageSt
|
|
|
325
322
|
isHidden(): EntityHidingLevel | undefined;
|
|
326
323
|
getTags(): readonly Tag[];
|
|
327
324
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
328
|
-
getContext(): EntityContext;
|
|
329
325
|
getTranslation(): Translation | undefined;
|
|
330
326
|
getLocale(): PackageLocale;
|
|
331
327
|
getDialect(): PackageDialect;
|
|
@@ -359,6 +355,7 @@ export declare class TsPropertyEntity implements FieldEntity {
|
|
|
359
355
|
isOverride(): boolean;
|
|
360
356
|
markedAbstract(): boolean;
|
|
361
357
|
getOverriddenMembers(): readonly types.Field[];
|
|
358
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Field> | undefined;
|
|
362
359
|
isVariant(): boolean;
|
|
363
360
|
getTranslation(): Translation | undefined;
|
|
364
361
|
getLocale(): PackageLocale;
|
|
@@ -395,6 +392,7 @@ export declare class TsAccessorEntity implements FieldEntity {
|
|
|
395
392
|
isOverride(): boolean;
|
|
396
393
|
markedAbstract(): boolean;
|
|
397
394
|
getOverriddenMembers(): readonly types.Field[];
|
|
395
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Field> | undefined;
|
|
398
396
|
isVariant(): boolean;
|
|
399
397
|
getTranslation(): Translation | undefined;
|
|
400
398
|
getLocale(): PackageLocale;
|
|
@@ -477,6 +475,7 @@ export declare class TsMethodEntity implements MethodEntity {
|
|
|
477
475
|
isFunctionTypeInvokeMethod(): boolean;
|
|
478
476
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
479
477
|
getOverriddenMembers(): readonly types.Method[];
|
|
478
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Method> | undefined;
|
|
480
479
|
getTranslation(): Translation | undefined;
|
|
481
480
|
getLocale(): PackageLocale;
|
|
482
481
|
getDialect(): PackageDialect;
|
|
@@ -511,6 +510,7 @@ export declare class TsIteratorFunctionEntity implements MethodEntity {
|
|
|
511
510
|
isFunctionTypeInvokeMethod(): boolean;
|
|
512
511
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
513
512
|
getOverriddenMembers(): readonly types.Method[];
|
|
513
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Method> | undefined;
|
|
514
514
|
getTranslation(): Translation | undefined;
|
|
515
515
|
getLocale(): PackageLocale;
|
|
516
516
|
getDialect(): PackageDialect;
|
|
@@ -565,7 +565,6 @@ export declare class TsTypeParameterEntity implements TypeParameterEntity {
|
|
|
565
565
|
getContainingPackage(): PackageEntity;
|
|
566
566
|
isHidden(): EntityHidingLevel | undefined;
|
|
567
567
|
getTags(): readonly Tag[];
|
|
568
|
-
getContext(): EntityContext;
|
|
569
568
|
getTranslation(): Translation | undefined;
|
|
570
569
|
getLocale(): PackageLocale;
|
|
571
570
|
getDialect(): PackageDialect;
|
|
@@ -600,6 +599,7 @@ export declare class TsIndexSignatureEntity implements IndexerEntity {
|
|
|
600
599
|
markedAbstract(): boolean;
|
|
601
600
|
getTags(): readonly Tag[];
|
|
602
601
|
getOverriddenMembers(): readonly types.Indexer[];
|
|
602
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Indexer> | undefined;
|
|
603
603
|
getTranslation(): Translation | undefined;
|
|
604
604
|
getLocale(): PackageLocale;
|
|
605
605
|
getDialect(): PackageDialect;
|
|
@@ -622,6 +622,7 @@ export declare class TsConstructorEntity implements ConstructorEntity {
|
|
|
622
622
|
isHidden(): EntityHidingLevel | undefined;
|
|
623
623
|
markedAbstract(): boolean;
|
|
624
624
|
getTags(): readonly Tag[];
|
|
625
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Constructor> | undefined;
|
|
625
626
|
getTranslation(): Translation | undefined;
|
|
626
627
|
getLocale(): PackageLocale;
|
|
627
628
|
getDialect(): PackageDialect;
|
|
@@ -642,6 +643,7 @@ export declare class TsSignatureBasedDefaultConstructorEntity implements Constru
|
|
|
642
643
|
isHidden(): EntityHidingLevel | undefined;
|
|
643
644
|
markedAbstract(): boolean;
|
|
644
645
|
getTags(): readonly Tag[];
|
|
646
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Constructor> | undefined;
|
|
645
647
|
getTranslation(): Translation | undefined;
|
|
646
648
|
getLocale(): PackageLocale;
|
|
647
649
|
getDialect(): PackageDialect;
|
|
@@ -672,7 +674,6 @@ export declare class TsEnumEntity implements PackageVariantTypeEntity {
|
|
|
672
674
|
getTags(): readonly Tag[];
|
|
673
675
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
674
676
|
getBaseObjectType(): BaseObjectType;
|
|
675
|
-
getContext(): EntityContext;
|
|
676
677
|
getTranslation(): Translation | undefined;
|
|
677
678
|
getLocale(): PackageLocale;
|
|
678
679
|
getDialect(): PackageDialect;
|
|
@@ -694,6 +695,7 @@ export declare class TsEnumMemberEntity implements FieldEntity {
|
|
|
694
695
|
isOverride(): boolean;
|
|
695
696
|
markedAbstract(): boolean;
|
|
696
697
|
getOverriddenMembers(): readonly types.Field[];
|
|
698
|
+
isPreservedReducedTypeMember(): PreservedReducedTypeEntityMemberInfo<types.Field> | undefined;
|
|
697
699
|
isVariant(): boolean;
|
|
698
700
|
getType(): types.Type;
|
|
699
701
|
getGetter(): GetterEntity | undefined;
|
|
@@ -730,7 +732,6 @@ export declare class TsTypeAliasEntity implements AliasTypeEntity {
|
|
|
730
732
|
isHidden(): EntityHidingLevel | undefined;
|
|
731
733
|
getTags(): readonly Tag[];
|
|
732
734
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
733
|
-
getContext(): EntityContext;
|
|
734
735
|
getTranslation(): Translation | undefined;
|
|
735
736
|
getLocale(): PackageLocale;
|
|
736
737
|
getDialect(): PackageDialect;
|
|
@@ -763,7 +764,6 @@ export declare class TsAnonymousFunctionTypeEntity implements AnonymousFunctionT
|
|
|
763
764
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
764
765
|
getContainingPackage(): PackageEntity;
|
|
765
766
|
getBaseObjectType(): BaseObjectType;
|
|
766
|
-
getContext(): EntityContext;
|
|
767
767
|
getTranslation(): Translation | undefined;
|
|
768
768
|
getLocale(): PackageLocale;
|
|
769
769
|
getDialect(): PackageDialect;
|
|
@@ -814,7 +814,6 @@ export declare class TsNamedFunctionTypeEntity implements PackageFunctionTypeEnt
|
|
|
814
814
|
getTags(): readonly Tag[];
|
|
815
815
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
|
816
816
|
getBaseObjectType(): BaseObjectType;
|
|
817
|
-
getContext(): EntityContext;
|
|
818
817
|
getTranslation(): Translation | undefined;
|
|
819
818
|
getLocale(): PackageLocale;
|
|
820
819
|
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;
|
|
@@ -58,7 +58,7 @@ export declare class TsPackageMembersCreator {
|
|
|
58
58
|
private createReplacementSourceEntities;
|
|
59
59
|
private getSourceEntity;
|
|
60
60
|
}
|
|
61
|
-
export type NamedPackageMemberDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageFunctionDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariableDeclaration | tree.PackageVariableGetterDeclaration | tree.PackageVariableSetterDeclaration | tree.PackageVariantTypeDeclaration;
|
|
61
|
+
export type NamedPackageMemberDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageReducedTypeDeclaration | tree.PackageFunctionDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariableDeclaration | tree.PackageVariableGetterDeclaration | tree.PackageVariableSetterDeclaration | tree.PackageVariantTypeDeclaration;
|
|
62
62
|
export declare class TsPackageMembersCreationResult {
|
|
63
63
|
readonly members: PackageEntityMembers;
|
|
64
64
|
readonly typeEntityBySymbol: ReadonlyMap<ts.Symbol, TypeEntity>;
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Analyzer } from '../analysis/index.js';
|
|
2
|
+
import { ReducedTypeEntity, TypeParameterEntity } from '../entities/index.js';
|
|
3
|
+
import { IType, Substitutions, Type } from './index.js';
|
|
4
|
+
export declare class ReducedType implements IType {
|
|
5
|
+
private readonly analyzer;
|
|
6
|
+
private readonly entity;
|
|
7
|
+
private readonly substitutions;
|
|
8
|
+
readonly kind = "reduced";
|
|
9
|
+
private readonly reductionSource;
|
|
10
|
+
private readonly baseObjectType;
|
|
11
|
+
private readonly baseAspectTypes;
|
|
12
|
+
get isNullType(): boolean;
|
|
13
|
+
get debuggerDisplay(): string;
|
|
14
|
+
constructor(analyzer: Analyzer, entity: ReducedTypeEntity, substitutions: Substitutions);
|
|
15
|
+
getReductionSource(): Type;
|
|
16
|
+
getBaseObjectType(): Type | undefined;
|
|
17
|
+
getBaseAspectTypes(): readonly Type[];
|
|
18
|
+
getTypeParameters(): readonly TypeParameterEntity[];
|
|
19
|
+
getSubstitutions(): Substitutions;
|
|
20
|
+
applySubstitutions(substitutions: Substitutions): Type;
|
|
21
|
+
equals(other: Type, considerLocale?: boolean): boolean;
|
|
22
|
+
getEntity(): ReducedTypeEntity;
|
|
23
|
+
toString(): string;
|
|
24
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -3,16 +3,18 @@ import { AliasType } from './AliasType.js';
|
|
|
3
3
|
import { FunctionType } from './FunctionType.js';
|
|
4
4
|
import { IntersectionType } from './IntersectionType.js';
|
|
5
5
|
import { ParameterType } from './ParameterType.js';
|
|
6
|
+
import { ReducedType } from './ReducedType.js';
|
|
6
7
|
import { StructuredType } from './StructuredType.js';
|
|
8
|
+
import { Substitutions } from './Substitutions.js';
|
|
9
|
+
import { SubstitutionStubType } from './SubstitutionStubType.js';
|
|
10
|
+
import { UnionType } from './UnionType.js';
|
|
7
11
|
import { UnresolvedType } from './UnresolvedType.js';
|
|
8
12
|
import { VariantType } from './VariantType.js';
|
|
9
|
-
|
|
10
|
-
export type Type = StructuredType | VariantType | FunctionType | AliasType | UnresolvedType | ParameterType | UnionType | IntersectionType;
|
|
13
|
+
export type Type = StructuredType | VariantType | FunctionType | AliasType | UnresolvedType | ParameterType | UnionType | IntersectionType | SubstitutionStubType | ReducedType;
|
|
11
14
|
export interface IType {
|
|
12
15
|
readonly isNullType: boolean;
|
|
13
16
|
getSubstitutions(): Substitutions;
|
|
14
17
|
applySubstitutions(substitutions: Substitutions): Type;
|
|
15
18
|
equals(other: Type, considerLocale: boolean): boolean;
|
|
16
19
|
getEntity(): TypeEntity | undefined;
|
|
17
|
-
getBaseObjectTypeOrAliasedType(): Type | undefined;
|
|
18
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import { AliasTypeEntity, FunctionTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
|
|
3
|
-
import { AliasType, FunctionType, ParameterType, StructuredType, Substitutions, Type, UnresolvedType, VariantType } from './index.js';
|
|
2
|
+
import { AliasTypeEntity, FunctionTypeEntity, ReducedTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
|
|
3
|
+
import { AliasType, FunctionType, ParameterType, ReducedType, 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);
|
|
@@ -9,8 +9,10 @@ export declare class TypeFactory {
|
|
|
9
9
|
getVariantType(entity: VariantTypeEntity, substitutions: Substitutions): VariantType;
|
|
10
10
|
getFunctionType(entity: FunctionTypeEntity, substitutions: Substitutions): FunctionType;
|
|
11
11
|
getAliasType(entity: AliasTypeEntity, substitutions: Substitutions): AliasType;
|
|
12
|
+
getReducedType(entity: ReducedTypeEntity, substitutions: Substitutions): ReducedType;
|
|
12
13
|
getUnionType(types: readonly Type[], reduce?: boolean): Type;
|
|
13
14
|
getIntersectionType(types: readonly Type[], reduce?: boolean): Type;
|
|
14
15
|
getUnresolvedType(): UnresolvedType;
|
|
16
|
+
getSubstitutionStubType(index: number): SubstitutionStubType;
|
|
15
17
|
private flattenAndExcludeDuplicateTypes;
|
|
16
18
|
}
|