@artel/artc 0.6.25191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +20 -0
- package/build/api/Api.js +664 -0
- package/build/api/ApiNodeJS.js +20 -0
- package/build/api/ApiServices.js +12847 -0
- package/build/chunk-BQHCAH6D.js +588 -0
- package/build/chunk-O2JKESUU.js +63219 -0
- package/build/chunk-QRBDQKYM.js +94 -0
- package/build/types/Cli.d.ts +3 -0
- package/build/types/analysis/AccessedMethod.d.ts +53 -0
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +191 -0
- package/build/types/analysis/Analyzer.d.ts +665 -0
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +25 -0
- package/build/types/analysis/BaseExpressionMeaning.d.ts +47 -0
- package/build/types/analysis/BuiltInOperators.d.ts +14 -0
- package/build/types/analysis/CallArgumentToParameterMatchResult.d.ts +30 -0
- package/build/types/analysis/CallArgumentsToParametersMatcher.d.ts +44 -0
- package/build/types/analysis/CallExpressionMeaning.d.ts +39 -0
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +34 -0
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +18 -0
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +23 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +68 -0
- package/build/types/analysis/EntityLocalizationHelper.d.ts +15 -0
- package/build/types/analysis/FindModifier.d.ts +4 -0
- package/build/types/analysis/FoundDeclaration.d.ts +19 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +98 -0
- package/build/types/analysis/ImportedPackageNameTree.d.ts +22 -0
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +26 -0
- package/build/types/analysis/IndexerAccess.d.ts +10 -0
- package/build/types/analysis/Localization.d.ts +54 -0
- package/build/types/analysis/LocalizationContext.d.ts +15 -0
- package/build/types/analysis/Lookup.d.ts +23 -0
- package/build/types/analysis/NamedTypeResolver.d.ts +42 -0
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +20 -0
- package/build/types/analysis/NodeTypeUtils.d.ts +28 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +38 -0
- package/build/types/analysis/OperationOverloadResolver.d.ts +19 -0
- package/build/types/analysis/OverloadResolver.d.ts +12 -0
- package/build/types/analysis/PackageMemberLookup.d.ts +15 -0
- package/build/types/analysis/PrefixUnaryOperatorResolver.d.ts +27 -0
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +100 -0
- package/build/types/analysis/Scope.d.ts +309 -0
- package/build/types/analysis/SemanticContext.d.ts +320 -0
- package/build/types/analysis/SemanticContextBuilder.d.ts +54 -0
- package/build/types/analysis/SourceFileMembers.d.ts +92 -0
- package/build/types/analysis/SourcePackageDependencyGraph.d.ts +41 -0
- package/build/types/analysis/SourcePackageMembersCreator.d.ts +6 -0
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +22 -0
- package/build/types/analysis/SubstitutedMethod.d.ts +49 -0
- package/build/types/analysis/TagMeaning.d.ts +26 -0
- package/build/types/analysis/Tags.d.ts +29 -0
- package/build/types/analysis/TargetTypeHint.d.ts +5 -0
- package/build/types/analysis/TypeInferrer.d.ts +9 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +27 -0
- package/build/types/analysis/TypeOverloadResolver.d.ts +7 -0
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +37 -0
- package/build/types/analysis/Utils.d.ts +17 -0
- package/build/types/analysis/VariableAccess.d.ts +10 -0
- package/build/types/analysis/VariantLookup.d.ts +20 -0
- package/build/types/analysis/Visitor.d.ts +7 -0
- package/build/types/analysis/WellKnownDeclarations.d.ts +34 -0
- package/build/types/analysis/index.d.ts +8 -0
- package/build/types/api/Api.d.ts +59 -0
- package/build/types/api/ApiNodeJS.d.ts +5 -0
- package/build/types/api/ApiServices.d.ts +3 -0
- package/build/types/common/AccessKind.d.ts +4 -0
- package/build/types/common/ArtelFileCheck.d.ts +2 -0
- package/build/types/common/Cached.d.ts +6 -0
- package/build/types/common/CancellationToken.d.ts +13 -0
- package/build/types/common/Constants.d.ts +19 -0
- package/build/types/common/Debug.d.ts +10 -0
- package/build/types/common/Delayed.d.ts +7 -0
- package/build/types/common/ErrorHandlingStrategy.d.ts +3 -0
- package/build/types/common/FormatString.d.ts +5 -0
- package/build/types/common/HelperPhrases.d.ts +11 -0
- package/build/types/common/Interner.d.ts +4 -0
- package/build/types/common/L10nConfig.d.ts +1 -0
- package/build/types/common/Lazy.d.ts +9 -0
- package/build/types/common/LocalizationHelper.d.ts +10 -0
- package/build/types/common/Logger.d.ts +10 -0
- package/build/types/common/Name.d.ts +83 -0
- package/build/types/common/NameFormatConversion.d.ts +12 -0
- package/build/types/common/NonEmptyArray.d.ts +8 -0
- package/build/types/common/Option.d.ts +28 -0
- package/build/types/common/PackageDialect.d.ts +5 -0
- package/build/types/common/PackageLocale.d.ts +15 -0
- package/build/types/common/PackageLocaleGuard.d.ts +1 -0
- package/build/types/common/Path.d.ts +8 -0
- package/build/types/common/PerformanceMeasurement.d.ts +20 -0
- package/build/types/common/Query.d.ts +39 -0
- package/build/types/common/Range.d.ts +10 -0
- package/build/types/common/Result.d.ts +13 -0
- package/build/types/common/SearchName.d.ts +13 -0
- package/build/types/common/ThrottledCancellationToken.d.ts +17 -0
- package/build/types/common/TreeQuery.d.ts +53 -0
- package/build/types/common/TreeTraversal.d.ts +13 -0
- package/build/types/common/Uri.d.ts +28 -0
- package/build/types/common/UriTree.d.ts +41 -0
- package/build/types/common/UserLocale.d.ts +2 -0
- package/build/types/common/WithDiagnostics.d.ts +19 -0
- package/build/types/common/YieldExecution.d.ts +1 -0
- package/build/types/common/index.d.ts +32 -0
- package/build/types/diagnostic/Diagnostic.d.ts +21 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +146 -0
- package/build/types/diagnostic/DiagnosticData.d.ts +20 -0
- package/build/types/diagnostic/DiagnosticFormatter.d.ts +8 -0
- package/build/types/diagnostic/RangeDiagnostic.d.ts +19 -0
- package/build/types/emitter/BlockStatementTransformationResult.d.ts +10 -0
- package/build/types/emitter/CustomModuleLoader.d.ts +1 -0
- package/build/types/emitter/DebugStack.d.ts +10 -0
- package/build/types/emitter/Emitter.d.ts +61 -0
- package/build/types/emitter/EmitterContext.d.ts +342 -0
- package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +36 -0
- package/build/types/emitter/EmitterPackage.d.ts +60 -0
- package/build/types/emitter/EntityNameProviders.d.ts +33 -0
- package/build/types/emitter/ExpressionTransformationResult.d.ts +17 -0
- package/build/types/emitter/GeneralLowering.d.ts +72 -0
- package/build/types/emitter/Internal.d.ts +10 -0
- package/build/types/emitter/IntrinsicEntities.d.ts +118 -0
- package/build/types/emitter/IrBuilder.d.ts +108 -0
- package/build/types/emitter/IrToJs.d.ts +113 -0
- package/build/types/emitter/JavaScriptName.d.ts +1 -0
- package/build/types/emitter/PackageMemberDeclarationTransformationResult.d.ts +17 -0
- package/build/types/emitter/SimpleTransformationResult.d.ts +14 -0
- package/build/types/emitter/StatementTransformationResult.d.ts +16 -0
- package/build/types/emitter/StructuredTypeMemberDeclarationTransformationResult.d.ts +13 -0
- package/build/types/emitter/TransformationContinuationAction.d.ts +4 -0
- package/build/types/emitter/Transformer.d.ts +282 -0
- package/build/types/emitter/TypeAccessExpressionTransformationResult.d.ts +12 -0
- package/build/types/emitter/error-boundary.d.ts +10 -0
- package/build/types/emitter/index.d.ts +1 -0
- package/build/types/emitter/ir/AccessedEntities.d.ts +19 -0
- package/build/types/emitter/ir/LoweringOptions.d.ts +34 -0
- package/build/types/emitter/ir/Nodes.d.ts +1585 -0
- package/build/types/emitter/ir/SourceLocation.d.ts +10 -0
- package/build/types/emitter/ir/index.d.ts +5 -0
- package/build/types/emitter/ir/types.d.ts +10 -0
- package/build/types/entities/AliasTypeEntity.d.ts +84 -0
- package/build/types/entities/BinaryOperatorEntity.d.ts +48 -0
- package/build/types/entities/ConstructorEntity.d.ts +99 -0
- package/build/types/entities/DereferenceOperatorEntity.d.ts +40 -0
- package/build/types/entities/DestructorEntity.d.ts +31 -0
- package/build/types/entities/EntityHiding.d.ts +27 -0
- package/build/types/entities/EntityNaming.d.ts +12 -0
- package/build/types/entities/GetterEntity.d.ts +86 -0
- package/build/types/entities/IndexerEntity.d.ts +51 -0
- package/build/types/entities/MethodEntity.d.ts +174 -0
- package/build/types/entities/MethodTypeEntity.d.ts +98 -0
- package/build/types/entities/PackageAliasEntity.d.ts +30 -0
- package/build/types/entities/PackageEntity.d.ts +56 -0
- package/build/types/entities/PackageMembers.d.ts +98 -0
- package/build/types/entities/SetterEntity.d.ts +78 -0
- package/build/types/entities/StructuredTypeEntity.d.ts +199 -0
- package/build/types/entities/SubstitutionApplicationMode.d.ts +4 -0
- package/build/types/entities/TypeEntityMembers.d.ts +36 -0
- package/build/types/entities/TypeExtensionEntity.d.ts +33 -0
- package/build/types/entities/TypeMemberContainer.d.ts +23 -0
- package/build/types/entities/TypeParameterEntity.d.ts +94 -0
- package/build/types/entities/UnaryOperatorEntity.d.ts +33 -0
- package/build/types/entities/VariableEntity.d.ts +423 -0
- package/build/types/entities/VariantEntity.d.ts +31 -0
- package/build/types/entities/VariantTypeEntity.d.ts +83 -0
- package/build/types/entities/Variants.d.ts +10 -0
- package/build/types/entities/index.d.ts +87 -0
- package/build/types/executor/CommandLineCompiler.d.ts +8 -0
- package/build/types/executor/Compiler.d.ts +15 -0
- package/build/types/executor/FileSystemUri.d.ts +5 -0
- package/build/types/executor/NodeCompiler.d.ts +39 -0
- package/build/types/executor/PhysicalFileSystem.d.ts +12 -0
- package/build/types/executor/PhysicalTypeScriptLibrariesProvider.d.ts +12 -0
- package/build/types/generated/BuiltInSystemPackages.d.ts +3 -0
- package/build/types/old/Executor.d.ts +14 -0
- package/build/types/old/JavaScriptEmitter.d.ts +1 -0
- package/build/types/old/JavaScriptEmittingVisitor.d.ts +1 -0
- package/build/types/old/NzonParser.d.ts +1 -0
- package/build/types/old/NzonScanner.d.ts +1 -0
- package/build/types/old/NzonSyntax.d.ts +1 -0
- package/build/types/old/RemoteWorkspaceFileSystem.d.ts +1 -0
- package/build/types/parser/CharacterCodes.d.ts +21 -0
- package/build/types/parser/ConvertTokenKind.d.ts +3 -0
- package/build/types/parser/KeywordDictionary.d.ts +12 -0
- package/build/types/parser/ParseNumber.d.ts +5 -0
- package/build/types/parser/Parser.d.ts +7 -0
- package/build/types/parser/ParserDiagnostic.d.ts +7 -0
- package/build/types/parser/ReservedIdentifierDictionary.d.ts +12 -0
- package/build/types/parser/Scanner.d.ts +60 -0
- package/build/types/parser/TokenKind.d.ts +73 -0
- package/build/types/parser/UnescapeText.d.ts +2 -0
- package/build/types/project/Compilation.d.ts +21 -0
- package/build/types/project/CompilationLoader.d.ts +104 -0
- package/build/types/project/FileSystemTree.d.ts +70 -0
- package/build/types/project/PackageConfigurationSerializer.d.ts +1 -0
- package/build/types/project/Position.d.ts +5 -0
- package/build/types/project/SourceFile.d.ts +21 -0
- package/build/types/project/SourcePackage.d.ts +151 -0
- package/build/types/project/TextFile.d.ts +11 -0
- package/build/types/project/configuration/BuildPackageApi.d.ts +75 -0
- package/build/types/project/configuration/ConfigurationConverter.d.ts +25 -0
- package/build/types/project/configuration/ConfigurationFileParser.d.ts +26 -0
- package/build/types/project/configuration/PackageConfigurationInterpreter.d.ts +27 -0
- package/build/types/project/configuration/types/PackageConfigurationEn.d.ts +90 -0
- package/build/types/project/configuration/types/PackageConfigurationRu.d.ts +91 -0
- package/build/types/project/index.d.ts +12 -0
- package/build/types/services/AddPropertyAssignmentService.d.ts +15 -0
- package/build/types/services/CompletionService.d.ts +95 -0
- package/build/types/services/CustomCommand.d.ts +120 -0
- package/build/types/services/DefinitionService.d.ts +19 -0
- package/build/types/services/DisplayService.d.ts +830 -0
- package/build/types/services/DocumentHighlightsService.d.ts +18 -0
- package/build/types/services/EvaluatableExpressionService.d.ts +15 -0
- package/build/types/services/FileSystemTreeDisplayService.d.ts +7 -0
- package/build/types/services/HoverService.d.ts +17 -0
- package/build/types/services/LanguageServer.d.ts +125 -0
- package/build/types/services/NodeSemanticInfo.d.ts +132 -0
- package/build/types/services/ProjectItemsService.d.ts +6 -0
- package/build/types/services/ReferencesService.d.ts +30 -0
- package/build/types/services/RenameService.d.ts +16 -0
- package/build/types/services/SelectionRangeService.d.ts +12 -0
- package/build/types/services/SemanticTokensService.d.ts +40 -0
- package/build/types/services/SourceFileItemsService.d.ts +42 -0
- package/build/types/services/TranslationService.d.ts +23 -0
- package/build/types/services/TreeUtils.d.ts +58 -0
- package/build/types/services/TypeDefinitionService.d.ts +9 -0
- package/build/types/services/Types.d.ts +22 -0
- package/build/types/services/Utils.d.ts +5 -0
- package/build/types/services/signature-help/SignatureHelpService.d.ts +17 -0
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +114 -0
- package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +20 -0
- package/build/types/services/signature-help/ValueParametersSignatureHelpProvider.d.ts +15 -0
- package/build/types/services/signature-help/utils.d.ts +9 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +47 -0
- package/build/types/services/source-generation/SourceGenerationService.d.ts +22 -0
- package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +41 -0
- package/build/types/services/workspace/CompilationController.d.ts +108 -0
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +61 -0
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +21 -0
- package/build/types/services/workspace/Workspace.d.ts +59 -0
- package/build/types/services/workspace/WorkspaceFileSystem.d.ts +5 -0
- package/build/types/services/workspace/WorkspaceFiles.d.ts +35 -0
- package/build/types/services/workspace/index.d.ts +7 -0
- package/build/types/tree/KeywordKind.d.ts +64 -0
- package/build/types/tree/NodeKind.d.ts +163 -0
- package/build/types/tree/TokenKind.d.ts +132 -0
- package/build/types/tree/TriviaKind.d.ts +7 -0
- package/build/types/tree/green/BaseNode.d.ts +12 -0
- package/build/types/tree/green/Nodes.d.ts +2235 -0
- package/build/types/tree/green/SyntaxFactory.d.ts +67 -0
- package/build/types/tree/green/SyntaxToCode.d.ts +116 -0
- package/build/types/tree/green/Token.d.ts +37 -0
- package/build/types/tree/green/Utils.d.ts +2 -0
- package/build/types/tree/green/index.d.ts +7 -0
- package/build/types/tree/index.d.ts +4 -0
- package/build/types/tree/red/BaseNode.d.ts +15 -0
- package/build/types/tree/red/Internal.d.ts +2 -0
- package/build/types/tree/red/NodePath.d.ts +10 -0
- package/build/types/tree/red/Nodes.d.ts +2237 -0
- package/build/types/tree/red/Token.d.ts +29 -0
- package/build/types/tree/red/Utils.d.ts +6 -0
- package/build/types/tree/red/index.d.ts +6 -0
- package/build/types/ts-interop/Entities.d.ts +634 -0
- package/build/types/ts-interop/TsInteropContext.d.ts +179 -0
- package/build/types/ts-interop/TsLibrariesProvider.d.ts +12 -0
- package/build/types/ts-interop/TsPackageContents.d.ts +64 -0
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +69 -0
- package/build/types/ts-interop/TsProgramLoader.d.ts +38 -0
- package/build/types/ts-interop/TsTypeMembersCreator.d.ts +45 -0
- package/build/types/ts-interop/Utils.d.ts +43 -0
- package/build/types/types/AliasType.d.ts +20 -0
- package/build/types/types/Internal.d.ts +1 -0
- package/build/types/types/MethodType.d.ts +23 -0
- package/build/types/types/ParameterType.d.ts +19 -0
- package/build/types/types/StandardTypes.d.ts +42 -0
- package/build/types/types/StructuredType.d.ts +25 -0
- package/build/types/types/Substitutions.d.ts +18 -0
- package/build/types/types/Type.d.ts +16 -0
- package/build/types/types/TypeFactory.d.ts +15 -0
- package/build/types/types/TypeMembers.d.ts +134 -0
- package/build/types/types/UnionType.d.ts +20 -0
- package/build/types/types/UnresolvedType.d.ts +16 -0
- package/build/types/types/VariantType.d.ts +19 -0
- package/build/types/types/index.d.ts +12 -0
- package/package.json +73 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { AutotypeCallExpression } from '../tree/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
5
|
+
import { Analyzer, TargetTypeHint } from './index.js';
|
6
|
+
export declare class Resolver {
|
7
|
+
private readonly _analyzer;
|
8
|
+
readonly _node: AutotypeCallExpression;
|
9
|
+
readonly _targetTypeHint: TargetTypeHint | undefined;
|
10
|
+
constructor(_analyzer: Analyzer, _node: AutotypeCallExpression, _targetTypeHint: TargetTypeHint | undefined);
|
11
|
+
resolve(): Meaning;
|
12
|
+
}
|
13
|
+
export type Meaning = Meaning_constructorCall | Meaning_unresolved;
|
14
|
+
declare class Meaning_constructorCall {
|
15
|
+
readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
16
|
+
readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
17
|
+
readonly kind = "constructor-call";
|
18
|
+
constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
|
19
|
+
}
|
20
|
+
declare class Meaning_unresolved {
|
21
|
+
readonly diagnostics: readonly Diagnostic[];
|
22
|
+
readonly kind = "unresolved";
|
23
|
+
constructor(diagnostics: readonly Diagnostic[]);
|
24
|
+
}
|
25
|
+
export {};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import * as tree from '../tree/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
5
|
+
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
|
+
/**
|
7
|
+
* "основа" не является самостоятельным выражением и может использоваться только в следующих конструкциях:
|
8
|
+
* 1. основа() - в конструкторе для вызова базового конструктора или в методе для вызова заменённого метода.
|
9
|
+
* 2. основа.поле (основа.метод) - в любом выражении в контексте типа, имеющего базовый тип.
|
10
|
+
* 3. основа[] - аналогично п. 2.
|
11
|
+
*/
|
12
|
+
export declare class Resolver {
|
13
|
+
private readonly _analyzer;
|
14
|
+
private readonly _node;
|
15
|
+
constructor(analyzer: Analyzer, node: tree.BaseExpression);
|
16
|
+
resolve(): Meaning;
|
17
|
+
private resolveBaseConstructorOrMethodAccess;
|
18
|
+
private resolveBaseConstructorAccess;
|
19
|
+
private resolveBaseMethodAccess;
|
20
|
+
private resolveBaseObjectAccess;
|
21
|
+
private invalidContextMeaning;
|
22
|
+
private getBaseOrAliasedType;
|
23
|
+
private findContainingConstructorOrTypeMethod;
|
24
|
+
}
|
25
|
+
export type Meaning = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | Meaning_overriddenMethodAccess | Meaning_unresolved;
|
26
|
+
declare class Meaning_baseObjectAccess {
|
27
|
+
readonly type: types.Type;
|
28
|
+
readonly kind = "base-object-access";
|
29
|
+
constructor(type: types.Type);
|
30
|
+
}
|
31
|
+
declare class Meaning_baseConstructorAccess {
|
32
|
+
readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
33
|
+
readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
34
|
+
readonly kind = "base-constructor-access";
|
35
|
+
constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
|
36
|
+
}
|
37
|
+
declare class Meaning_overriddenMethodAccess {
|
38
|
+
readonly method: types.Method;
|
39
|
+
readonly kind = "overridden-method-access";
|
40
|
+
constructor(method: types.Method);
|
41
|
+
}
|
42
|
+
declare class Meaning_unresolved {
|
43
|
+
readonly diagnostic: Diagnostic;
|
44
|
+
readonly kind = "unresolved";
|
45
|
+
constructor(diagnostic: Diagnostic);
|
46
|
+
}
|
47
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { BinaryOperatorEntity, TypeEntity, UnaryOperatorEntity } from '../entities/index.js';
|
2
|
+
import { Analyzer } from './index.js';
|
3
|
+
export declare class BuiltInOperators {
|
4
|
+
private readonly _analyzer;
|
5
|
+
private readonly _unaryOperators;
|
6
|
+
private readonly _binaryOperators;
|
7
|
+
private get unaryOperators();
|
8
|
+
private get binaryOperators();
|
9
|
+
constructor(_analyzer: Analyzer);
|
10
|
+
getUnaryOperators(entity: TypeEntity): readonly UnaryOperatorEntity[];
|
11
|
+
getBinaryOperators(entity: TypeEntity): readonly BinaryOperatorEntity[];
|
12
|
+
private createBuiltInUnaryOperators;
|
13
|
+
private createBuiltInBinaryOperators;
|
14
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { VariableEntity } from '../entities/index.js';
|
3
|
+
import { AutotypeCallExpression, CallArgument, CallExpression, Tag } from '../tree/index.js';
|
4
|
+
import * as types from '../types/index.js';
|
5
|
+
import { LocalizedName } from './Localization.js';
|
6
|
+
import { Analyzer } from './index.js';
|
7
|
+
export declare class CallArgumentToParameterMatchResult {
|
8
|
+
private readonly _analyzer;
|
9
|
+
private readonly _matchResults;
|
10
|
+
constructor(_analyzer: Analyzer);
|
11
|
+
ofCallExpression(node: CallExpression): MatchResult | undefined;
|
12
|
+
ofAutotypeCallExpression(node: AutotypeCallExpression): MatchResult | undefined;
|
13
|
+
ofTag(node: Tag): MatchResult | undefined;
|
14
|
+
private convertSignatureWithParametersMatchResult;
|
15
|
+
private convertParameter;
|
16
|
+
private convertConstructorSignatureMatchResult;
|
17
|
+
private convertConstructorParameter;
|
18
|
+
}
|
19
|
+
export declare class MatchResult {
|
20
|
+
readonly parameterByCallArgument: ReadonlyMap<CallArgument, MatchResultValueParameter>;
|
21
|
+
readonly unmatchedParameters: readonly MatchResultValueParameter[];
|
22
|
+
readonly diagnostics: readonly Diagnostic[];
|
23
|
+
constructor(parameterByCallArgument: ReadonlyMap<CallArgument, MatchResultValueParameter>, unmatchedParameters: readonly MatchResultValueParameter[], diagnostics: readonly Diagnostic[]);
|
24
|
+
}
|
25
|
+
export declare class MatchResultValueParameter {
|
26
|
+
readonly entity: VariableEntity;
|
27
|
+
readonly type: types.Type;
|
28
|
+
readonly name: LocalizedName;
|
29
|
+
constructor(entity: VariableEntity, type: types.Type, name: LocalizedName);
|
30
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { Name } from '../common/index.js';
|
2
|
+
import { Diagnostic, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
|
3
|
+
import * as tree from '../tree/index.js';
|
4
|
+
import * as types from '../types/index.js';
|
5
|
+
import { Analyzer } from './index.js';
|
6
|
+
export declare class CallArgumentToParameterMatcher<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TCallArgument extends ICallArgument> {
|
7
|
+
private readonly _analyzer;
|
8
|
+
private readonly _signature;
|
9
|
+
private readonly _callArguments;
|
10
|
+
constructor(_analyzer: Analyzer, _signature: TSignature, _callArguments: readonly TCallArgument[]);
|
11
|
+
match(): MatchResult<TParameter, TCallArgument>;
|
12
|
+
private matchCallArgumentsToParameters;
|
13
|
+
private addCallArgumentDiagnostic;
|
14
|
+
private getCallArgumentType;
|
15
|
+
}
|
16
|
+
export declare class MatchResult<TParameter extends ISignatureParameter, TCallArgument extends ICallArgument> {
|
17
|
+
readonly mapping: ReadonlyMap<TCallArgument, TParameter>;
|
18
|
+
readonly unmatchedRequiredParameters: readonly TParameter[];
|
19
|
+
readonly argumentArrangementDiagnostics: readonly Diagnostic[];
|
20
|
+
readonly hasTypeAssignabilityErrors: boolean;
|
21
|
+
get isMatching(): boolean;
|
22
|
+
constructor(mapping: ReadonlyMap<TCallArgument, TParameter>, unmatchedRequiredParameters: readonly TParameter[], argumentArrangementDiagnostics: readonly Diagnostic[], hasTypeAssignabilityErrors: boolean);
|
23
|
+
}
|
24
|
+
export interface ISignature<TParameter extends ISignatureParameter> {
|
25
|
+
getParameters(): readonly TParameter[];
|
26
|
+
}
|
27
|
+
export interface ISignatureParameter {
|
28
|
+
getName(): Name | undefined;
|
29
|
+
getType(): types.Type;
|
30
|
+
isOptional(): boolean;
|
31
|
+
}
|
32
|
+
export interface ICallArgument {
|
33
|
+
getExpression(): tree.Expression;
|
34
|
+
getName(): Name | undefined;
|
35
|
+
getDiagnosticLocation(): DiagnosticLocation | undefined;
|
36
|
+
}
|
37
|
+
export declare class CallArgument implements ICallArgument {
|
38
|
+
private readonly _analyzer;
|
39
|
+
readonly node: tree.CallArgument;
|
40
|
+
constructor(_analyzer: Analyzer, node: tree.CallArgument);
|
41
|
+
getExpression(): tree.Expression;
|
42
|
+
getName(): Name | undefined;
|
43
|
+
getDiagnosticLocation(): DiagnosticLocation;
|
44
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { CallExpression } from '../tree/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { AccessedMethod } from './AccessedMethod.js';
|
5
|
+
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
|
+
import { WithLocalization } from './Localization.js';
|
7
|
+
import { Analyzer } from './index.js';
|
8
|
+
export declare class Resolver {
|
9
|
+
private readonly _analyzer;
|
10
|
+
private readonly _node;
|
11
|
+
constructor(_analyzer: Analyzer, _node: CallExpression);
|
12
|
+
private get callee();
|
13
|
+
resolve(): Meaning;
|
14
|
+
private resolveConstructorCallExpressionMeaning;
|
15
|
+
private getNodeForDiagnostics;
|
16
|
+
}
|
17
|
+
export type Meaning = Meaning_methodCall | Meaning_objectMethodCall | Meaning_constructorCall | Meaning_unresolved;
|
18
|
+
declare class Meaning_methodCall {
|
19
|
+
readonly method: WithLocalization<AccessedMethod>;
|
20
|
+
readonly kind = "method-call";
|
21
|
+
constructor(method: WithLocalization<AccessedMethod>);
|
22
|
+
}
|
23
|
+
declare class Meaning_objectMethodCall {
|
24
|
+
readonly type: types.MethodType;
|
25
|
+
readonly kind = "object-method-call";
|
26
|
+
constructor(type: types.MethodType);
|
27
|
+
}
|
28
|
+
declare class Meaning_constructorCall {
|
29
|
+
readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
30
|
+
readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
31
|
+
readonly kind = "constructor-call";
|
32
|
+
constructor(candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
|
33
|
+
}
|
34
|
+
declare class Meaning_unresolved {
|
35
|
+
readonly diagnostics: readonly Diagnostic[];
|
36
|
+
readonly kind = "unresolved";
|
37
|
+
constructor(diagnostics: readonly Diagnostic[]);
|
38
|
+
}
|
39
|
+
export {};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { Name } from '../common/index.js';
|
2
|
+
import * as tree from '../tree/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
5
|
+
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
|
+
import { LocalizedName } from './Localization.js';
|
7
|
+
export declare class Resolver<TCandidate extends ICandidate<TValueParameter>, TValueParameter extends IValueParameter> {
|
8
|
+
private readonly _analyzer;
|
9
|
+
constructor(_analyzer: Analyzer);
|
10
|
+
resolve(candidates: Iterable<TCandidate>, callArguments: Iterable<tree.CallArgument>): Iterable<TCandidate>;
|
11
|
+
}
|
12
|
+
export interface ICandidate<TValueParameter extends IValueParameter> {
|
13
|
+
getValueParameters(): readonly TValueParameter[];
|
14
|
+
}
|
15
|
+
export interface IValueParameter {
|
16
|
+
getName(): Name;
|
17
|
+
getType(): types.Type;
|
18
|
+
isOptional(): boolean;
|
19
|
+
}
|
20
|
+
export declare class FoundTypeMemberCandidate implements ICandidate<FoundTypeMemberCandidateValueParameter> {
|
21
|
+
readonly value: FoundAnonymousDeclaration<types.Constructor>;
|
22
|
+
private readonly _valueParameters;
|
23
|
+
constructor(value: FoundAnonymousDeclaration<types.Constructor>);
|
24
|
+
getValueParameters(): readonly FoundTypeMemberCandidateValueParameter[];
|
25
|
+
}
|
26
|
+
declare class FoundTypeMemberCandidateValueParameter implements IValueParameter {
|
27
|
+
readonly value: types.ValueParameter;
|
28
|
+
readonly localizedName: LocalizedName;
|
29
|
+
constructor(value: types.ValueParameter, localizedName: LocalizedName);
|
30
|
+
getName(): Name;
|
31
|
+
getType(): types.Type;
|
32
|
+
isOptional(): boolean;
|
33
|
+
}
|
34
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { CancellationToken } from '../common/index.js';
|
2
|
+
import { Entity } from '../entities/index.js';
|
3
|
+
import * as tree from '../tree/index.js';
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
5
|
+
import { NamedEntity } from './LocalizationContext.js';
|
6
|
+
export declare class DeclarationsUsageCounter {
|
7
|
+
private readonly _analyzer;
|
8
|
+
private readonly _sourceFile;
|
9
|
+
private readonly _cancellationToken;
|
10
|
+
private readonly _usageCountByEntity;
|
11
|
+
constructor(analyzer: Analyzer, sourceFile: tree.SourceFile, cancellationToken: CancellationToken | undefined);
|
12
|
+
count(): Promise<DeclarationsUsageCountResult>;
|
13
|
+
}
|
14
|
+
export declare class DeclarationsUsageCountResult {
|
15
|
+
private readonly _usageCountByEntity;
|
16
|
+
constructor(_usageCountByEntity: ReadonlyMap<Entity, number>);
|
17
|
+
getUsageCount(entity: NamedEntity): number;
|
18
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { DereferenceExpression } from '../tree/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
5
|
+
import { Analyzer } from './index.js';
|
6
|
+
export declare class Resolver {
|
7
|
+
private readonly _analyzer;
|
8
|
+
private readonly _node;
|
9
|
+
constructor(_analyzer: Analyzer, _node: DereferenceExpression);
|
10
|
+
resolve(): Meaning;
|
11
|
+
}
|
12
|
+
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
13
|
+
declare class Meaning_resolved {
|
14
|
+
readonly operator: FoundAnonymousDeclaration<types.DereferenceOperator>;
|
15
|
+
readonly kind = "resolved";
|
16
|
+
constructor(operator: FoundAnonymousDeclaration<types.DereferenceOperator>);
|
17
|
+
}
|
18
|
+
declare class Meaning_unresolved {
|
19
|
+
readonly diagnostic: Diagnostic | undefined;
|
20
|
+
readonly kind = "unresolved";
|
21
|
+
constructor(diagnostic: Diagnostic | undefined);
|
22
|
+
}
|
23
|
+
export {};
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { CancellationToken } from '../common/index.js';
|
2
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
|
+
import * as project from '../project/index.js';
|
4
|
+
import { Analyzer } from './index.js';
|
5
|
+
export declare class DiagnosticCollector {
|
6
|
+
static readonly CancellationTokenThrottleTime = 50;
|
7
|
+
private readonly _analyzer;
|
8
|
+
private readonly _sourceFile;
|
9
|
+
private readonly _cancellationToken;
|
10
|
+
private readonly _displayService;
|
11
|
+
private readonly _translationPackage;
|
12
|
+
private readonly _diagnostics;
|
13
|
+
private readonly _diagnosticAcceptor;
|
14
|
+
private _namedDeclarationsCountResult;
|
15
|
+
private get node();
|
16
|
+
private get translationPackage();
|
17
|
+
private get isInterfacePackageFile();
|
18
|
+
constructor(analyzer: Analyzer, sourceFile: project.SourceFile, cancellationToken: CancellationToken | undefined);
|
19
|
+
collect(): Promise<Diagnostic[]>;
|
20
|
+
private collectNodeDiagnostics;
|
21
|
+
private addNotTranslatedPackageMembersDiagnostics;
|
22
|
+
private collectNotTranslatedPackageMembers;
|
23
|
+
private addNotTranslatedTypeMembersDiagnostics;
|
24
|
+
private collectNotTranslatedTypeMembers;
|
25
|
+
private createNotTranslatedEntitiesDiagnostic;
|
26
|
+
private checkAllDefaultConstructorArgumentsAreNamed;
|
27
|
+
private checkPackageMethodDeclaration;
|
28
|
+
private checkPackageVariableGetterDeclaration;
|
29
|
+
private checkPackageVariableSetterDeclaration;
|
30
|
+
private checkTypeMethodDeclaration;
|
31
|
+
private checkTypeVariableGetterDeclaration;
|
32
|
+
private checkTypeVariableSetterDeclaration;
|
33
|
+
private checkTypeIndexedGetterDeclaration;
|
34
|
+
private checkTypeIndexedSetterDeclaration;
|
35
|
+
private checkNestedMethodDeclaration;
|
36
|
+
private checkPossibleGeneratorMethodReturnType;
|
37
|
+
private checkReturnStatement;
|
38
|
+
private checkYieldStatement;
|
39
|
+
private checkTypeMemberBodyPresence;
|
40
|
+
private isAspectTypeMemberDeclaration;
|
41
|
+
private collectIdentifierExpressionDiagnostics;
|
42
|
+
private collectPropertyAccessExpressionDiagnostics;
|
43
|
+
private addDiagnosticsFromMatchResult;
|
44
|
+
private checkStatementForVariablesUsedBeforeBeingAssigned;
|
45
|
+
private checkExpressionTypeAssignableToTargetType;
|
46
|
+
private addTypeAssignabilityDiagnosticIfBothTypesResolved;
|
47
|
+
private checkAssignmentIsValid;
|
48
|
+
private checkAssignmentToIdentifierExpression;
|
49
|
+
private checkAssignmentToPropertyAccessExpression;
|
50
|
+
private checkAssignmentToVariable;
|
51
|
+
private checkAssignmentToPackageVariable;
|
52
|
+
private checkAssignmentToTypeVariable;
|
53
|
+
private checkAssignmentToObjectExpression;
|
54
|
+
private checkAssignmentToDereferenceExpression;
|
55
|
+
private checkAssignmentToIndexedAccessExpression;
|
56
|
+
private checkGenericSpecializationExpression;
|
57
|
+
private checkMethodSpecialization;
|
58
|
+
private checkTypeSpecialization;
|
59
|
+
private checkSpecializationOfDeclarationWithParameters;
|
60
|
+
/**
|
61
|
+
* @returns `true` если была ошибка, иначе `false`.
|
62
|
+
*/
|
63
|
+
private checkTypeArgumentCount;
|
64
|
+
private checkParameterDeclaration;
|
65
|
+
private checkIfVariableIsUnused;
|
66
|
+
private addDiagnostic;
|
67
|
+
private addDiagnostics;
|
68
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { LocalizedSubprogramSignature, LocalizedTypeHeader, TypeEntityWithHeaderLocalization } from '../analysis/AnalyzedTranslationPackage.js';
|
2
|
+
import { Analyzer } from '../analysis/index.js';
|
3
|
+
import { Localization } from '../analysis/Localization.js';
|
4
|
+
import { ConstructorEntity, DestructorEntity, IndexerEntity, MethodEntity, MethodTypeEntity } from '../entities/index.js';
|
5
|
+
import * as types from '../types/index.js';
|
6
|
+
export declare class EntityLocalizationHelper {
|
7
|
+
static getLocalizedMethodSignature(method: MethodEntity, localization: Localization): LocalizedSubprogramSignature;
|
8
|
+
static getLocalizedMethodTypeSignature(methodType: MethodTypeEntity, localization: Localization): LocalizedSubprogramSignature;
|
9
|
+
static getLocalizedConstructorSignature(constructor: ConstructorEntity, localization: Localization): LocalizedSubprogramSignature;
|
10
|
+
static getLocalizedDestructorSignature(destructor: DestructorEntity, localization: Localization): LocalizedSubprogramSignature;
|
11
|
+
static getLocalizedIndexerSignature(indexer: IndexerEntity, localization: Localization): LocalizedSubprogramSignature;
|
12
|
+
static getLocalizedTypeHeader(type: TypeEntityWithHeaderLocalization, localization: Localization): LocalizedTypeHeader;
|
13
|
+
static getLocalizedSignatureTypeOfMethod(analyzer: Analyzer, method: MethodEntity, signatureType: types.MethodType, localization: Localization): types.MethodType;
|
14
|
+
static localizeMethodType(analyzer: Analyzer, type: types.MethodType, localizedSignature: LocalizedSubprogramSignature): types.MethodType;
|
15
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import * as tree from '../tree/index.js';
|
2
|
+
type NodeWithModifiers = tree.PackageMemberDeclaration | tree.TypeMemberDeclaration;
|
3
|
+
export declare function findModifier(node: NodeWithModifiers, modifierKeywordKind: tree.ModifierKeywordKind): tree.Modifier | undefined;
|
4
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { PackageLocale, Name } from '../common/index.js';
|
2
|
+
import { Localization, LocalizedName, Translation, WithLocalization } from './Localization.js';
|
3
|
+
export declare class FoundNamedDeclaration<T> implements WithLocalization<T> {
|
4
|
+
readonly value: T;
|
5
|
+
readonly name: LocalizedName;
|
6
|
+
readonly requiresExplicitOriginalName: boolean;
|
7
|
+
get localization(): Localization;
|
8
|
+
constructor(value: T, name: LocalizedName, requiresExplicitOriginalName: boolean);
|
9
|
+
static original<T>(value: T, name: Name, locale: PackageLocale, requiresExplicitOriginalName: boolean): FoundNamedDeclaration<T>;
|
10
|
+
static translated<T>(value: T, localizedName: LocalizedName.Translated): FoundNamedDeclaration<T>;
|
11
|
+
withValue<T>(value: T): FoundNamedDeclaration<T>;
|
12
|
+
}
|
13
|
+
export declare class FoundAnonymousDeclaration<T> implements WithLocalization<T> {
|
14
|
+
readonly value: T;
|
15
|
+
readonly localization: Localization;
|
16
|
+
constructor(value: T, localization: Localization);
|
17
|
+
static original<T>(value: T, locale: PackageLocale): FoundAnonymousDeclaration<T>;
|
18
|
+
static translated<T>(value: T, translation: Translation): FoundAnonymousDeclaration<T>;
|
19
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { Name } from '../common/index.js';
|
2
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
|
+
import { NamedTypeEntity, PackageAliasEntity, VariableEntity, VariantEntity } from '../entities/index.js';
|
4
|
+
import { IdentifierExpression } from '../tree/index.js';
|
5
|
+
import * as types from '../types/index.js';
|
6
|
+
import { AccessedMethod } from './AccessedMethod.js';
|
7
|
+
import { FoundNamedDeclaration } from './FoundDeclaration.js';
|
8
|
+
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
9
|
+
import * as scope from './Scope.js';
|
10
|
+
import * as variableAccess from './VariableAccess.js';
|
11
|
+
import { Analyzer, TargetTypeHint } from './index.js';
|
12
|
+
export declare class Resolver {
|
13
|
+
private readonly _identifierValue;
|
14
|
+
private readonly _accessKind;
|
15
|
+
private readonly _semanticContext;
|
16
|
+
private readonly _analyzer;
|
17
|
+
private readonly _node;
|
18
|
+
private readonly _targetTypeHint;
|
19
|
+
constructor(analyzer: Analyzer, node: IdentifierExpression, targetTypeHint: TargetTypeHint | undefined);
|
20
|
+
private get identifierSearchName();
|
21
|
+
private get accessKind();
|
22
|
+
private get semanticContext();
|
23
|
+
resolve(): ResolutionResult;
|
24
|
+
private resolveMethodOverload;
|
25
|
+
private createAccessedMethod;
|
26
|
+
}
|
27
|
+
export declare class ResolutionResult {
|
28
|
+
readonly meaning: Meaning;
|
29
|
+
readonly diagnostic?: Diagnostic | undefined;
|
30
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined);
|
31
|
+
}
|
32
|
+
export type Meaning = Meaning_variantAccess | Meaning_variableAccess | Meaning_methodAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | Meaning_typeAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
33
|
+
declare class Meaning_variantAccess {
|
34
|
+
readonly variant: FoundNamedDeclaration<VariantEntity>;
|
35
|
+
readonly kind = "variant-access";
|
36
|
+
constructor(variant: FoundNamedDeclaration<VariantEntity>);
|
37
|
+
}
|
38
|
+
declare class Meaning_variableAccess {
|
39
|
+
readonly variable: FoundNamedDeclaration<AccessedVariable>;
|
40
|
+
readonly access: variableAccess.VariableAccess;
|
41
|
+
readonly kind = "variable-access";
|
42
|
+
constructor(variable: FoundNamedDeclaration<AccessedVariable>, access: variableAccess.VariableAccess);
|
43
|
+
}
|
44
|
+
declare class Meaning_methodAccess {
|
45
|
+
readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
|
46
|
+
readonly suitableMethods: readonly FoundNamedDeclaration<AccessedMethod>[];
|
47
|
+
readonly kind = "method-access";
|
48
|
+
get singleSuitableMethod(): FoundNamedDeclaration<AccessedMethod> | undefined;
|
49
|
+
constructor(candidates: readonly FoundNamedDeclaration<AccessedMethod>[], suitableMethods: readonly FoundNamedDeclaration<AccessedMethod>[]);
|
50
|
+
}
|
51
|
+
declare class Meaning_packageAliasAccess {
|
52
|
+
readonly packageAlias: PackageAliasEntity;
|
53
|
+
readonly kind = "package-alias-access";
|
54
|
+
constructor(packageAlias: PackageAliasEntity);
|
55
|
+
}
|
56
|
+
declare class Meaning_packageNameSegmentAccess {
|
57
|
+
readonly packageTreeNode: PackageNameTreeNode;
|
58
|
+
readonly kind = "package-name-segment-access";
|
59
|
+
constructor(packageTreeNode: PackageNameTreeNode);
|
60
|
+
}
|
61
|
+
declare class Meaning_typeAccess {
|
62
|
+
readonly candidates: readonly FoundNamedDeclaration<NamedTypeEntity>[];
|
63
|
+
readonly suitableTypes: readonly FoundNamedDeclaration<types.Type>[];
|
64
|
+
readonly kind = "type-access";
|
65
|
+
get singleSuitableType(): FoundNamedDeclaration<types.Type> | undefined;
|
66
|
+
constructor(candidates: readonly FoundNamedDeclaration<NamedTypeEntity>[], suitableTypes: readonly FoundNamedDeclaration<types.Type>[]);
|
67
|
+
}
|
68
|
+
declare class Meaning_mixedAmbiguousAccess {
|
69
|
+
readonly declarations: readonly FoundNamedDeclaration<scope.NamedDeclaration>[];
|
70
|
+
readonly kind = "mixed-ambiguous-access";
|
71
|
+
constructor(declarations: readonly FoundNamedDeclaration<scope.NamedDeclaration>[]);
|
72
|
+
}
|
73
|
+
declare class Meaning_unresolved {
|
74
|
+
readonly kind = "unresolved";
|
75
|
+
}
|
76
|
+
export type AccessedVariable = AccessedVariable_entity | AccessedVariable_typeMember;
|
77
|
+
export declare class AccessedVariable_entity implements IAccessedVariable {
|
78
|
+
readonly value: VariableEntity;
|
79
|
+
readonly kind = "entity";
|
80
|
+
constructor(value: VariableEntity);
|
81
|
+
getEntity(): VariableEntity;
|
82
|
+
getName(): Name;
|
83
|
+
getType(): types.Type;
|
84
|
+
}
|
85
|
+
export declare class AccessedVariable_typeMember implements IAccessedVariable {
|
86
|
+
readonly value: types.Variable;
|
87
|
+
readonly kind = "type-member";
|
88
|
+
constructor(value: types.Variable);
|
89
|
+
getEntity(): VariableEntity;
|
90
|
+
getName(): Name;
|
91
|
+
getType(): types.Type;
|
92
|
+
}
|
93
|
+
interface IAccessedVariable {
|
94
|
+
getEntity(): VariableEntity;
|
95
|
+
getName(): Name;
|
96
|
+
getType(): types.Type;
|
97
|
+
}
|
98
|
+
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Name } from '../common/index.js';
|
2
|
+
import { PackageEntity } from '../entities/PackageEntity.js';
|
3
|
+
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
4
|
+
import { PackageImportInfo } from './Analyzer.js';
|
5
|
+
export declare class ImportedPackageNameTree {
|
6
|
+
private readonly _rootNodes;
|
7
|
+
get rootNodes(): ReadonlyMap<string, PackageNameTreeNode>;
|
8
|
+
constructor(owningPackage: PackageEntity, packageImportInfos: readonly PackageImportInfo[]);
|
9
|
+
private add;
|
10
|
+
}
|
11
|
+
export interface PackageNameTreeNode {
|
12
|
+
readonly name: Name;
|
13
|
+
readonly package: ImportedPackage | undefined;
|
14
|
+
getChild(name: Name): PackageNameTreeNode | undefined;
|
15
|
+
hasChild(name: Name): boolean;
|
16
|
+
getChildren(): Iterable<PackageNameTreeNode>;
|
17
|
+
}
|
18
|
+
export declare class ImportedPackage {
|
19
|
+
readonly value: PackageEntity;
|
20
|
+
readonly translationPackage: AnalyzedTranslationPackage | undefined;
|
21
|
+
constructor(value: PackageEntity, translationPackage: AnalyzedTranslationPackage | undefined);
|
22
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { IndexedAccessExpression } from '../tree/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
5
|
+
import * as indexerAccess from './IndexerAccess.js';
|
6
|
+
import { Analyzer } from './index.js';
|
7
|
+
export declare class Resolver {
|
8
|
+
private readonly _analyzer;
|
9
|
+
private readonly _node;
|
10
|
+
constructor(_analyzer: Analyzer, _node: IndexedAccessExpression);
|
11
|
+
resolve(): Meaning;
|
12
|
+
private getArgumentsRangeWithBrackets;
|
13
|
+
}
|
14
|
+
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
15
|
+
declare class Meaning_resolved {
|
16
|
+
readonly indexer: FoundAnonymousDeclaration<types.Indexer>;
|
17
|
+
readonly access: indexerAccess.IndexerAccess;
|
18
|
+
readonly kind = "resolved";
|
19
|
+
constructor(indexer: FoundAnonymousDeclaration<types.Indexer>, access: indexerAccess.IndexerAccess);
|
20
|
+
}
|
21
|
+
declare class Meaning_unresolved {
|
22
|
+
readonly diagnostic: Diagnostic | undefined;
|
23
|
+
readonly kind = "unresolved";
|
24
|
+
constructor(diagnostic: Diagnostic | undefined);
|
25
|
+
}
|
26
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { AccessKind } from '../common/index.js';
|
2
|
+
import { IndexerEntity, GetterEntity, SetterEntity } from '../entities/index.js';
|
3
|
+
export type IndexerAccess = {
|
4
|
+
kind: AccessKind.Get;
|
5
|
+
accessorEntity: GetterEntity | undefined;
|
6
|
+
} | {
|
7
|
+
kind: AccessKind.Set;
|
8
|
+
accessorEntity: SetterEntity | undefined;
|
9
|
+
};
|
10
|
+
export declare function create(indexerEntity: IndexerEntity, accessKind: AccessKind): IndexerAccess;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { PackageLocale, Name } from '../common/index.js';
|
2
|
+
import { Entity } from '../entities/index.js';
|
3
|
+
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
4
|
+
export type Localization = Localization.Original | Localization.Translated;
|
5
|
+
export declare namespace Localization {
|
6
|
+
export class Original implements ILocalization {
|
7
|
+
readonly locale: PackageLocale;
|
8
|
+
readonly kind = "original";
|
9
|
+
constructor(locale: PackageLocale);
|
10
|
+
equals(other: Localization): boolean;
|
11
|
+
static ofEntity(entity: Entity): Localization.Original;
|
12
|
+
}
|
13
|
+
export class Translated implements ILocalization {
|
14
|
+
readonly translation: Translation;
|
15
|
+
readonly kind = "translated";
|
16
|
+
get locale(): PackageLocale;
|
17
|
+
constructor(translation: Translation);
|
18
|
+
equals(other: Localization): boolean;
|
19
|
+
}
|
20
|
+
interface ILocalization {
|
21
|
+
readonly locale: PackageLocale;
|
22
|
+
equals(other: Localization): boolean;
|
23
|
+
}
|
24
|
+
export {};
|
25
|
+
}
|
26
|
+
export interface WithLocalization<T> {
|
27
|
+
readonly value: T;
|
28
|
+
readonly localization: Localization;
|
29
|
+
}
|
30
|
+
export declare class Translation {
|
31
|
+
readonly translationPackage: AnalyzedTranslationPackage;
|
32
|
+
constructor(translationPackage: AnalyzedTranslationPackage);
|
33
|
+
equals(other: Translation): boolean;
|
34
|
+
}
|
35
|
+
export type LocalizedName = LocalizedName.Original | LocalizedName.Translated;
|
36
|
+
export declare namespace LocalizedName {
|
37
|
+
export class Original implements ILocalizedName {
|
38
|
+
readonly value: Name;
|
39
|
+
readonly localization: Localization.Original;
|
40
|
+
readonly kind = "original";
|
41
|
+
constructor(value: Name, localization: Localization.Original);
|
42
|
+
}
|
43
|
+
export class Translated implements ILocalizedName {
|
44
|
+
readonly value: Name;
|
45
|
+
readonly localization: Localization.Translated;
|
46
|
+
readonly kind = "translated";
|
47
|
+
constructor(value: Name, localization: Localization.Translated);
|
48
|
+
}
|
49
|
+
interface ILocalizedName {
|
50
|
+
readonly value: Name;
|
51
|
+
readonly localization: Localization;
|
52
|
+
}
|
53
|
+
export {};
|
54
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { PackageLocale, Name } from '../common/index.js';
|
2
|
+
import { AliasTypeEntity, MethodEntity, PackageAliasEntity, PackageEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity, TypeEntity, TypeParameterEntity, VariableEntity, VariantEntity, VariantTypeEntity } from '../entities/index.js';
|
3
|
+
import { AnalyzedTranslationPackage, TranslatedTypeEntityMembers, TranslatedVariants } from './AnalyzedTranslationPackage.js';
|
4
|
+
export declare class LocalizationContext {
|
5
|
+
readonly originalLocale: PackageLocale;
|
6
|
+
private readonly _translationPackageByTranslated;
|
7
|
+
get translationPackages(): Iterable<AnalyzedTranslationPackage>;
|
8
|
+
constructor(translationPackages: readonly AnalyzedTranslationPackage[], originalLocale: PackageLocale);
|
9
|
+
getTranslationPackage(packageEntity: PackageEntity): AnalyzedTranslationPackage | undefined;
|
10
|
+
getTranslationLocale(packageEntity: PackageEntity): PackageLocale;
|
11
|
+
getTranslatedTypeEntityMembers(typeEntity: TypeEntity): TranslatedTypeEntityMembers | undefined;
|
12
|
+
getTranslatedVariants(typeEntity: VariantTypeEntity): TranslatedVariants | undefined;
|
13
|
+
getEntityName(entity: NamedEntity): Name;
|
14
|
+
}
|
15
|
+
export type NamedEntity = VariableEntity | VariantEntity | PackageVariantTypeEntity | MethodEntity | TypeParameterEntity | PackageMethodTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Query, SearchName } from '../common/index.js';
|
2
|
+
import { IEntityHidingMatcher, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
|
3
|
+
import { FoundNamedDeclaration } from './FoundDeclaration.js';
|
4
|
+
import { IScope, NamedDeclaration, TypeOrContainerWithTypes } from './Scope.js';
|
5
|
+
export declare class Lookup {
|
6
|
+
private readonly _scopeChain;
|
7
|
+
private readonly _hidingMatcher;
|
8
|
+
constructor(_scopeChain: ScopeChain, _hidingMatcher: IEntityHidingMatcher);
|
9
|
+
getTypesOrContainersWithTypes(): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
10
|
+
getTypesOrContainersWithTypesByName(name: SearchName): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
11
|
+
getNamedDeclarations(): FoundNamedDeclaration<NamedDeclaration>[];
|
12
|
+
getNamedDeclarationsByName(name: SearchName): FoundNamedDeclaration<NamedDeclaration>[];
|
13
|
+
getTypeExtensionsByType(type: TypeEntity): TypeExtensionEntity[];
|
14
|
+
private checkTypeOrPackageDeclarationShadowing;
|
15
|
+
private checkNamedDeclarationShadowing;
|
16
|
+
}
|
17
|
+
export declare class ScopeChain {
|
18
|
+
private readonly _entry;
|
19
|
+
private constructor();
|
20
|
+
addFirst(scope: IScope): ScopeChain;
|
21
|
+
toQuery(): Query<IScope>;
|
22
|
+
static withSingleScope(scope: IScope): ScopeChain;
|
23
|
+
}
|