@artel/artc 0.6.25277 → 0.6.25279
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 +14 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +609 -565
- package/build/{chunk-QK3TWMY2.js → chunk-65GDIOT3.js} +20 -24
- package/build/{chunk-DKZTCPRN.js → chunk-C4HHHOM5.js} +15 -15
- package/build/{chunk-EVYL6VFM.js → chunk-HPU7DXMO.js} +2235 -1500
- package/build/types/analysis/AccessedFunction.d.ts +3 -3
- package/build/types/analysis/AnalyzedTextTranslationPackage.d.ts +2 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +11 -8
- package/build/types/analysis/Analyzer.d.ts +23 -19
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +2 -2
- package/build/types/analysis/{DiagnosticCollector.d.ts → SourceFileAnalyzer.d.ts} +4 -5
- package/build/types/analysis/SourcePackageDependencyGraph.d.ts +2 -2
- package/build/types/analysis/SubstitutedFunction.d.ts +3 -3
- package/build/types/analysis/TranslatedEntityNameConflictsValidator.d.ts +28 -0
- package/build/types/analysis/Translation.d.ts +1 -2
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/index.d.ts +1 -1
- package/build/types/analysis/semantic-context/Declarations.d.ts +3 -3
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -2
- package/build/types/api/Api.d.ts +1 -1
- package/build/types/api/ApiServices.d.ts +1 -1
- package/build/types/common/TaskController.d.ts +14 -0
- package/build/types/common/TreeTraversal.d.ts +10 -9
- package/build/types/common/index.d.ts +1 -5
- package/build/types/diagnostic/DiagnosticCode.d.ts +5 -1
- package/build/types/{common → diagnostic}/WithDiagnostics.d.ts +1 -1
- package/build/types/emitter/Emitter.d.ts +3 -3
- package/build/types/emitter/EmitterContext.d.ts +1 -1
- package/build/types/emitter/EntityMap.d.ts +1 -1
- package/build/types/entities/Entity.d.ts +3 -1
- package/build/types/entities/EntityNaming.d.ts +2 -0
- package/build/types/entities/interfaces/FunctionEntity.d.ts +19 -6
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -2
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +3 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +86 -5
- package/build/types/entities/source/SourceVariableEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +1 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +29 -14
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +19 -9
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +21 -10
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +0 -2
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +0 -1
- package/build/types/executor/Compiler.d.ts +6 -6
- package/build/types/executor/NodeCompiler.d.ts +6 -6
- package/build/types/project/CompilationLoader.d.ts +5 -5
- package/build/types/project/FileSystemTree.d.ts +1 -1
- package/build/types/project/PackageContentCreator.d.ts +2 -1
- package/build/types/services/{CustomCommand.d.ts → CustomRequests.d.ts} +20 -51
- package/build/types/services/DefinitionService.d.ts +2 -2
- package/build/types/services/DeleteBlockFromScriptService.d.ts +6 -0
- package/build/types/services/DisplayService.d.ts +22 -7
- package/build/types/services/DocumentHighlightsService.d.ts +2 -2
- package/build/types/services/LanguageServer.d.ts +4 -3
- package/build/types/services/NodeSemanticInfo.d.ts +1 -6
- package/build/types/services/ReferencesService.d.ts +3 -3
- package/build/types/services/RenameService.d.ts +2 -2
- package/build/types/services/SemanticTokensService.d.ts +4 -4
- package/build/types/services/source-generation/SourceGenerationService.d.ts +6 -5
- package/build/types/services/workspace/CompilationController.d.ts +7 -5
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +2 -2
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +2 -2
- package/build/types/services/workspace/Workspace.d.ts +3 -5
- package/build/types/services/workspace/WorkspaceFiles.d.ts +3 -3
- package/build/types/ts-interop/Entities.d.ts +3 -0
- package/package.json +1 -1
- package/build/types/common/Delayed.d.ts +0 -7
- package/build/types/common/ThrottledCancellationToken.d.ts +0 -17
- package/build/types/common/YieldExecution.d.ts +0 -1
- /package/build/types/{common → analysis}/TreeQuery.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { MethodEntity, NamedFunctionEntity, PackageOrNestedFunctionEntity, ParameterEntity, TypeParameterEntity } from '../entities/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
5
5
|
import { SubstitutedFunction } from './SubstitutedFunction.js';
|
|
@@ -44,7 +44,7 @@ export declare class AccessedFunction_substitutedFunction implements IAccessedFu
|
|
|
44
44
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
45
45
|
getParameters(): readonly AccessedFunctionParameter[];
|
|
46
46
|
getReturnType(): types.Type;
|
|
47
|
-
getEntity():
|
|
47
|
+
getEntity(): NamedFunctionEntity;
|
|
48
48
|
getName(): Name;
|
|
49
49
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
50
50
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
@@ -58,7 +58,7 @@ interface IAccessedFunction {
|
|
|
58
58
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
59
59
|
getParameters(): readonly AccessedFunctionParameter[];
|
|
60
60
|
getReturnType(): types.Type;
|
|
61
|
-
getEntity():
|
|
61
|
+
getEntity(): NamedFunctionEntity;
|
|
62
62
|
getName(): Name;
|
|
63
63
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
64
64
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
@@ -15,6 +15,6 @@ export declare class AnalyzedTextTranslationPackage {
|
|
|
15
15
|
getTranslationLocale(): string;
|
|
16
16
|
getEntitiesByTextKey(textKey: TextKey): readonly TextTranslationEntity[] | undefined;
|
|
17
17
|
private createEntitiesByTextKey;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
18
|
+
private textTranslationDeclarations;
|
|
19
|
+
private translationsDeclarations;
|
|
20
20
|
}
|
|
@@ -12,32 +12,34 @@ export declare class AnalyzedTranslationPackage {
|
|
|
12
12
|
private readonly analyzer;
|
|
13
13
|
private readonly package_;
|
|
14
14
|
private readonly targetPackage;
|
|
15
|
-
private readonly
|
|
15
|
+
private readonly entityNameConflictsValidator;
|
|
16
16
|
private readonly localizedPackageByOriginalReferencedPackage;
|
|
17
17
|
private readonly translatedEntityByOriginal;
|
|
18
|
-
private hasCreatedPackageMembers;
|
|
19
|
-
private readonly typesOrExtensionsWithCreatedMembers;
|
|
20
18
|
private readonly packageMemberTranslationTargetsByNode;
|
|
21
19
|
private readonly typeMemberTranslationTargetsByNode;
|
|
20
|
+
private readonly translatedPackageMembers;
|
|
21
|
+
private readonly translatedTypeMembersByTypeOrExtensionEntity;
|
|
22
22
|
constructor(analyzer: Analyzer, package_: TranslationPackage, targetPackage: PackageEntity);
|
|
23
23
|
getTargetPackage(): PackageEntity;
|
|
24
24
|
getDefinition(): TranslationPackage;
|
|
25
25
|
getTranslatedName(): PackageName;
|
|
26
26
|
getTranslationLocale(): PackageLocale;
|
|
27
27
|
getLocalizedPackageByOriginalReferencedPackage(): ReadonlyMap<PackageEntity, PackageEntity>;
|
|
28
|
-
|
|
28
|
+
getTranslatedPackageMembers(): PackageEntityMembers;
|
|
29
|
+
ensureAllLazyDiagnosticsReportedForSourceFile(sourceFile: SourceFile): void;
|
|
30
|
+
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
29
31
|
getPackageMemberTranslationTargets(node: tree.TranslationDeclaration): TranslationTargets<PackageMemberEntity> | undefined;
|
|
30
32
|
getTypeMemberTranslationTargets(node: tree.TypeMemberTranslation): TranslationTargets<TypeMemberEntity> | undefined;
|
|
31
33
|
getTranslatedPackageMember(entity: PackageMemberEntity): PackageMemberEntity;
|
|
32
34
|
getTranslatedTypeMember(entity: TypeMemberEntity): TypeMemberEntity;
|
|
33
35
|
getTranslatedAnonymousTypeEntity(entity: AnonymousTypeEntity): AnonymousTypeEntity;
|
|
34
|
-
|
|
35
|
-
createTranslatedTypeOrExtensionMembers(translatedTypeEntity: TypeWithMembersOrExtensionEntity, typeTranslationDeclaration: tree.TypeTranslationDeclaration | undefined): TypeEntityMembers;
|
|
36
|
+
getTranslatedTypeOrExtensionMembers(translatedTypeEntity: TypeWithMembersOrExtensionEntity): TypeEntityMembers;
|
|
36
37
|
createTranslatedTypeParameters(original: readonly TypeParameterEntity[], node: tree.TranslationTypeParameterList | undefined, containingEntity: EntityContainingTypeParameter): readonly TypeParameterEntity[];
|
|
37
38
|
createTranslatedParameters(original: readonly ParameterEntity[], node: tree.TranslationParameterList | undefined, containingEntity: EntityContainingParameter): readonly ParameterEntity[];
|
|
38
39
|
static isPackageMemberEntityThatShouldBeTranslatedByUser(entity: PackageMemberEntity): boolean;
|
|
39
40
|
static isTypeMemberEntityThatShouldBeTranslatedByUser(entity: TypeMemberEntity): boolean;
|
|
40
|
-
private
|
|
41
|
+
private createTranslatedPackageMembers;
|
|
42
|
+
private createTranslatedTypeOrExtensionMembers;
|
|
41
43
|
private ensureTypeMembersHaveBeenCreated;
|
|
42
44
|
private reportPackageMemberHasAlreadyBeenTranslatedDiagnostic;
|
|
43
45
|
private reportTypeMemberHasAlreadyBeenTranslatedDiagnostic;
|
|
@@ -59,7 +61,8 @@ export declare class AnalyzedTranslationPackage {
|
|
|
59
61
|
private createNotTranslatedEntitiesDiagnostic;
|
|
60
62
|
private createLocalizedPackageByOriginalReferencedPackage;
|
|
61
63
|
private createTranslatedDefaultConstructorEntity;
|
|
62
|
-
private
|
|
64
|
+
private tryCreateAutomaticTranslationOfDerivedTypeMember;
|
|
65
|
+
private translationsDeclarations;
|
|
63
66
|
}
|
|
64
67
|
export interface TranslationTargets<T extends Entity = Entity> {
|
|
65
68
|
readonly values: readonly T[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import {
|
|
2
|
+
import { DisplayableOrPrimitive, Name, PackageLocale, Query, Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { Diagnostic, DiagnosticAcceptor, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
|
|
4
4
|
import { DiagnosticCode } from '../diagnostic/DiagnosticCode.js';
|
|
5
5
|
import { DiagnosticFlags, DiagnosticKind } from '../diagnostic/DiagnosticData.js';
|
|
@@ -38,6 +38,8 @@ import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationC
|
|
|
38
38
|
import * as controlFlow from './control-flow/index.js';
|
|
39
39
|
import { WellKnownDeclarations } from './index.js';
|
|
40
40
|
import * as semanticContext from './semantic-context/index.js';
|
|
41
|
+
import { TypeWithMembersOrTypeExtensionDeclaration } from './TreeQuery.js';
|
|
42
|
+
import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
|
|
41
43
|
export declare class Analyzer {
|
|
42
44
|
readonly compilation: project.Compilation;
|
|
43
45
|
/**
|
|
@@ -91,7 +93,6 @@ export declare class Analyzer {
|
|
|
91
93
|
private readonly prefixUnaryExpressionOperatorResolutionResults;
|
|
92
94
|
private readonly binaryExpressionUserDefinableOperatorResolutionResults;
|
|
93
95
|
private readonly assignmentStatementOperatorResolutionResults;
|
|
94
|
-
private readonly parametersOfFunctionBlockLiterals;
|
|
95
96
|
private readonly extendedTypes;
|
|
96
97
|
private readonly analyzedTranslationPackages;
|
|
97
98
|
private readonly analyzedTextTranslationPackages;
|
|
@@ -138,7 +139,7 @@ export declare class Analyzer {
|
|
|
138
139
|
getUnambiguousTargetReferenceType(targetType: types.Type | undefined): types.Type | undefined;
|
|
139
140
|
resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.FirstStageResolutionResult;
|
|
140
141
|
resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.ResolutionResult;
|
|
141
|
-
|
|
142
|
+
getPackageImportsOfDirective(packageImportDirectives: Iterable<tree.PackageImportDirective>): Iterable<tree.PackageImport>;
|
|
142
143
|
getSourceFileMembers(node: tree.SourceFile): SourceFileMembers;
|
|
143
144
|
resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.ResolutionResult;
|
|
144
145
|
getRespectiveParameter(node: tree.Argument): MatchResultParameter | undefined;
|
|
@@ -204,7 +205,7 @@ export declare class Analyzer {
|
|
|
204
205
|
* возвращаемого значения допустимо). В таком случае это генератор, не возвращающий ни одного элемента.
|
|
205
206
|
*/
|
|
206
207
|
isFunctionGenerator(node: FunctionDeclaration): boolean;
|
|
207
|
-
|
|
208
|
+
allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
|
|
208
209
|
checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
|
|
209
210
|
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<types.Operator>;
|
|
210
211
|
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): WithDiagnostics<types.Operator>;
|
|
@@ -260,7 +261,6 @@ export declare class Analyzer {
|
|
|
260
261
|
excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
|
|
261
262
|
isParameterVariadic(entity: e.VariableEntity): boolean;
|
|
262
263
|
getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
|
|
263
|
-
getFunctionBlockLiteralParameters(node: tree.FunctionBlockLiteral): readonly e.ParameterEntity[];
|
|
264
264
|
getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
|
|
265
265
|
getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
|
|
266
266
|
getAnalyzedTextTranslationPackageIfTargetResolved(package_: project.TextTranslationPackage): AnalyzedTextTranslationPackage | undefined;
|
|
@@ -286,9 +286,9 @@ export declare class Analyzer {
|
|
|
286
286
|
instantiateTypeMemberByIdentitySubstitution(entity: e.TypeMemberEntity): types.TypeMember;
|
|
287
287
|
createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
|
288
288
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
|
289
|
-
collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind,
|
|
290
|
-
getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile,
|
|
291
|
-
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage,
|
|
289
|
+
collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind, taskController: TaskController): Promise<Map<tree.SourceFile, DeclarationsUsageMap>>;
|
|
290
|
+
getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile, taskController: TaskController): Promise<DeclarationsUsageMap>;
|
|
291
|
+
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage, taskController: TaskController): Promise<readonly Diagnostic[]>;
|
|
292
292
|
createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.ConstructorEntity[];
|
|
293
293
|
createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
|
294
294
|
createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
|
@@ -308,8 +308,7 @@ export declare class Analyzer {
|
|
|
308
308
|
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Diagnostic;
|
|
309
309
|
addDiagnosticComputedLazily(diagnostic: Diagnostic): void;
|
|
310
310
|
getAcceptorForDiagnosticsComputedLazily(): DiagnosticAcceptor;
|
|
311
|
-
|
|
312
|
-
getDiagnosticsWithoutLocationComputedLazily(): readonly Diagnostic[];
|
|
311
|
+
accumulateSourceFileDiagnosticsComputedLazily(sourceFile: project.SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
313
312
|
validateSourcePackageMemberConflicts(pkg: project.ProgramPackage): readonly Diagnostic[];
|
|
314
313
|
getNotExplicitlyImplementedAbstractMembers(typeEntity: e.TypeEntityWithMembers): readonly types.TypeMember[];
|
|
315
314
|
getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
|
|
@@ -388,9 +387,10 @@ declare class Type {
|
|
|
388
387
|
ofExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type;
|
|
389
388
|
ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
|
|
390
389
|
ofAccessedOperator(operator: types.Operator): types.Type;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
390
|
+
private ofFunctionBlockLiteral;
|
|
391
|
+
private ofFunctionLiteral;
|
|
392
|
+
private ofRegularOrBlockFunctionLiteral;
|
|
393
|
+
private createFunctionTypeOfFunctionEntity;
|
|
394
394
|
private ofArrayLiteral;
|
|
395
395
|
private ofAssertionExpression;
|
|
396
396
|
private ofAssumptionExpression;
|
|
@@ -431,10 +431,6 @@ declare class Type {
|
|
|
431
431
|
private ofUnionTypeSpecifier;
|
|
432
432
|
private ofIntersectionTypeSpecifier;
|
|
433
433
|
private ofInvalidTypeSpecifier;
|
|
434
|
-
private createFunctionLiteralType;
|
|
435
|
-
private createFunctionBlockLiteralType;
|
|
436
|
-
private inferAndCacheReturnTypeOfRegularOrBlockFunctionLiteral;
|
|
437
|
-
private replaceReturnTypeOfFunctionType;
|
|
438
434
|
private reportReturnTypeCanNotBeInferredDiagnostic;
|
|
439
435
|
private getNarrowedTypeIfNarrowableReference;
|
|
440
436
|
}
|
|
@@ -485,6 +481,8 @@ declare class Entity {
|
|
|
485
481
|
private readonly packageAliasEntities;
|
|
486
482
|
private readonly translationTextTemplateParameterEntities;
|
|
487
483
|
private readonly textTranslationDeclarationEntities;
|
|
484
|
+
private readonly functionLiteralEntities;
|
|
485
|
+
private readonly functionBlockLiteralEntities;
|
|
488
486
|
constructor(analyzer: Analyzer);
|
|
489
487
|
ofPackage(pkg: SourcePackage): e.PackageEntity;
|
|
490
488
|
ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
|
|
@@ -531,6 +529,12 @@ declare class Entity {
|
|
|
531
529
|
ofTypeWithMembersOrExtensionDeclaration(node: TypeWithMembersOrTypeExtensionDeclaration): e.TypeWithMembersOrExtensionEntity;
|
|
532
530
|
ofTranslationTextTemplateParameter(node: tree.TranslationTextTemplateParameter): e.ParameterEntity;
|
|
533
531
|
ofTextTranslationDeclaration(node: tree.TextTranslationSource): e.TextTranslationEntity;
|
|
532
|
+
ofFunctionLiteral(node: tree.FunctionLiteral): e.AnonymousFunctionEntity;
|
|
533
|
+
ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.AnonymousFunctionEntity;
|
|
534
|
+
ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral): e.AnonymousFunctionEntity;
|
|
535
|
+
ofFunctionLiteralInternal(node: tree.FunctionLiteral): e.FunctionLiteralEntity;
|
|
536
|
+
ofFunctionBlockLiteralInternal(node: tree.FunctionBlockLiteral): e.FunctionBlockLiteralEntity;
|
|
537
|
+
ofFunctionLiteralParameterDeclarationInternal(node: tree.ParameterDeclaration, literal: tree.FunctionLiteral): e.FunctionLiteralParameterDeclarationEntity;
|
|
534
538
|
private getContainingPackageLoadedFromDts;
|
|
535
539
|
private createComputedFieldEntities;
|
|
536
540
|
private createDereferenceOperatorEntities;
|
|
@@ -599,8 +603,8 @@ declare class OverriddenMember {
|
|
|
599
603
|
private checkMethodOverridesOrShadowsMethod;
|
|
600
604
|
private checkOperatorOverridesOrShadowsOperator;
|
|
601
605
|
private checkIndexerOverridesOrShadowsIndexer;
|
|
602
|
-
private
|
|
603
|
-
private
|
|
606
|
+
private typeMemberLookups;
|
|
607
|
+
private typesForOverriddenMemberLookup;
|
|
604
608
|
private entityCanOverrideOrShadow;
|
|
605
609
|
}
|
|
606
610
|
export declare enum ShadowReason {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaskController } from '../common/index.js';
|
|
2
2
|
import { Entity, NamedEntity } from '../entities/index.js';
|
|
3
3
|
import * as tree from '../tree/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -7,7 +7,7 @@ export declare class DeclarationsUsageCounter {
|
|
|
7
7
|
private readonly sourceFile;
|
|
8
8
|
private readonly usageInfoByEntity;
|
|
9
9
|
constructor(analyzer: Analyzer, sourceFile: tree.SourceFile);
|
|
10
|
-
count(
|
|
10
|
+
count(taskController: TaskController): Promise<DeclarationsUsageMap>;
|
|
11
11
|
private recordUsage;
|
|
12
12
|
}
|
|
13
13
|
export declare class DeclarationsUsageMap {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaskController } from '../common/index.js';
|
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import * as project from '../project/index.js';
|
|
4
4
|
import { Analyzer } from './index.js';
|
|
5
|
-
export declare class
|
|
6
|
-
static readonly CancellationTokenThrottleTime = 50;
|
|
5
|
+
export declare class SourceFileAnalyzer {
|
|
7
6
|
private readonly analyzer;
|
|
8
7
|
private readonly sourceFile;
|
|
9
8
|
private readonly diagnosticArgumentFactory;
|
|
@@ -19,8 +18,8 @@ export declare class DiagnosticCollector {
|
|
|
19
18
|
private get isInterfacePackageFile();
|
|
20
19
|
private get standardTypes();
|
|
21
20
|
constructor(analyzer: Analyzer, sourceFile: project.SourceFile);
|
|
22
|
-
|
|
23
|
-
private
|
|
21
|
+
analyze(taskController: TaskController): Promise<Diagnostic[]>;
|
|
22
|
+
private analyzeNode;
|
|
24
23
|
private checkTypeParameterList;
|
|
25
24
|
private checkTypeParameterDeclaration;
|
|
26
25
|
private checkFunctionLiteral;
|
|
@@ -10,9 +10,9 @@ export declare class SourcePackageDependencyGraph {
|
|
|
10
10
|
* Перечислить все пакеты и их зависимости, включая транзитивные, начиная от корневых пакетов.
|
|
11
11
|
* @param platformKind Связывать многоплатформенные пакеты с реализацией для заданной платформы.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
packagesForTargetPlatform(platformKind: PlatformKind): Iterable<SourcePackage>;
|
|
14
14
|
private getNodeForPackage;
|
|
15
|
-
private
|
|
15
|
+
private nodeAndDependenciesRecursively;
|
|
16
16
|
}
|
|
17
17
|
export interface SourcePackageDependencyGraphNode {
|
|
18
18
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { MethodEntity, NamedFunctionEntity, PackageOrNestedFunctionEntity } from '../entities/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { AccessedFunctionParameter } from './AccessedFunction.js';
|
|
5
5
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -29,7 +29,7 @@ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunct
|
|
|
29
29
|
private readonly parameters;
|
|
30
30
|
get debuggerDisplay(): string;
|
|
31
31
|
constructor(method: types.Method, substitutions: types.Substitutions);
|
|
32
|
-
getEntity():
|
|
32
|
+
getEntity(): MethodEntity;
|
|
33
33
|
getName(): Name;
|
|
34
34
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
35
35
|
getSubstitutions(): types.Substitutions;
|
|
@@ -39,7 +39,7 @@ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunct
|
|
|
39
39
|
isAsync(): boolean;
|
|
40
40
|
}
|
|
41
41
|
interface ISubstitutedFunction {
|
|
42
|
-
getEntity():
|
|
42
|
+
getEntity(): NamedFunctionEntity;
|
|
43
43
|
getName(): Name;
|
|
44
44
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
45
45
|
getSubstitutions(): types.Substitutions;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
|
+
import { PackageEntity } from '../entities/index.js';
|
|
3
|
+
import { SourceFile } from '../project/SourceFile.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
/**
|
|
6
|
+
* Переведённые имена проверяются по следующим правилам:
|
|
7
|
+
* - Если объявления имеют одинаковые имена на исходном языке, то они должны иметь одинаковые имена на языке перевода.
|
|
8
|
+
* - Если объявления имеют разные имена на исходном языке, то они должны иметь разные имена на языке перевода.
|
|
9
|
+
* - Для членов типа: имя расширенного члена типа должно быть таким же, как имя базового члена типа.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TranslatedEntityNameConflictsValidator {
|
|
12
|
+
private readonly analyzer;
|
|
13
|
+
private readonly package_;
|
|
14
|
+
private readonly packageMemberDiagnostics;
|
|
15
|
+
private arePackageMembersValidated;
|
|
16
|
+
constructor(analyzer: Analyzer, package_: PackageEntity);
|
|
17
|
+
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
18
|
+
private ensurePackageMembersAreValidated;
|
|
19
|
+
private validatePackageMembers;
|
|
20
|
+
private validateTypeMembers;
|
|
21
|
+
private checkTranslatedMembersHaveSameName;
|
|
22
|
+
private checkOriginalMembersHaveSameName;
|
|
23
|
+
private getTranslatedNameNode;
|
|
24
|
+
private validateTypeParameterNameConflicts;
|
|
25
|
+
private validateParameterNameConflicts;
|
|
26
|
+
private checkOverridingMemberHasTheSameNameAsBaseMember;
|
|
27
|
+
private getTranslationDefinitionNode;
|
|
28
|
+
}
|
|
@@ -19,8 +19,7 @@ export declare class SourceTranslationDefinition {
|
|
|
19
19
|
}
|
|
20
20
|
export type SourceTranslationDefinitionNode = tree.TranslationDeclaration | tree.TypeMemberTranslation;
|
|
21
21
|
export declare class IntrinsicTranslationDefinition {
|
|
22
|
-
readonly isMissingTranslationReplacement: boolean;
|
|
23
22
|
readonly kind = "intrinsic";
|
|
24
|
-
constructor(
|
|
23
|
+
constructor();
|
|
25
24
|
equals(other: TranslationDefinition): boolean;
|
|
26
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WithDiagnostics } from '../
|
|
1
|
+
import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
|
|
2
2
|
import { BinaryOperatorKind } from '../entities/OperatorKind.js';
|
|
3
3
|
import * as tree from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './Analyzer.js';
|
|
2
2
|
export * from './ArgumentsToParametersMatcher.js';
|
|
3
3
|
export * from './DeclarationsUsageCounter.js';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './SourceFileAnalyzer.js';
|
|
5
5
|
export * from './FindModifier.js';
|
|
6
6
|
export * from './SourcePackageDependencyGraph.js';
|
|
7
7
|
export * from './Visitor.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { EntityHidingLevel,
|
|
2
|
+
import { EntityHidingLevel, MethodEntity, NamedFunctionEntity, NamedTypeEntity, PackageAliasEntity, PackageOrNestedFunctionEntity, VariableEntity } from '../../entities/index.js';
|
|
3
3
|
import * as types from '../../types/index.js';
|
|
4
4
|
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
5
5
|
export type TypeOrContainerWithTypes = NamedDeclaration_type | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
|
|
@@ -26,13 +26,13 @@ export declare class NamedDeclarationFunction_typeMember implements INamedDeclar
|
|
|
26
26
|
readonly value: types.Method;
|
|
27
27
|
constructor(value: types.Method);
|
|
28
28
|
getName(): Name;
|
|
29
|
-
getEntity():
|
|
29
|
+
getEntity(): MethodEntity;
|
|
30
30
|
getTypeParameterArity(): number;
|
|
31
31
|
isHidden(): EntityHidingLevel | undefined;
|
|
32
32
|
}
|
|
33
33
|
interface INamedDeclarationFunction {
|
|
34
34
|
getName(): Name;
|
|
35
|
-
getEntity():
|
|
35
|
+
getEntity(): NamedFunctionEntity;
|
|
36
36
|
getTypeParameterArity(): number;
|
|
37
37
|
isHidden(): EntityHidingLevel | undefined;
|
|
38
38
|
}
|
|
@@ -38,7 +38,7 @@ export declare abstract class SemanticContextBase {
|
|
|
38
38
|
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean): readonly types.Operator[];
|
|
39
39
|
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
|
40
40
|
getPrimaryTextTranslationEntityByTextKey(key: TextKey): TextTranslationEntity | undefined;
|
|
41
|
-
private
|
|
41
|
+
private semanticContexts;
|
|
42
42
|
private getSourceFileContext;
|
|
43
43
|
}
|
|
44
44
|
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.Operator | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.FunctionLiteral | SubprogramInfo.TextTranslationFunction;
|
|
@@ -136,7 +136,7 @@ export declare namespace SubprogramInfo {
|
|
|
136
136
|
isGenerator(): boolean;
|
|
137
137
|
allowsAsyncCalls(): boolean;
|
|
138
138
|
getNode(): RegularOrBlockFunctionLiteral;
|
|
139
|
-
private
|
|
139
|
+
private getEntity;
|
|
140
140
|
}
|
|
141
141
|
export class TextTranslationFunction implements ISubprogramInfo {
|
|
142
142
|
readonly kind = "text-translation-function";
|
package/build/types/api/Api.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { Meaning as AutotypeCallExpressionMeaning } from '../analysis/Autot
|
|
|
6
6
|
export type { Meaning as BaseExpressionMeaning } from '../analysis/BaseExpressionMeaning.js';
|
|
7
7
|
export type { Meaning as CallExpressionMeaning } from '../analysis/CallExpressionMeaning.js';
|
|
8
8
|
export type { Meaning as DereferenceExpressionMeaning } from '../analysis/DereferenceExpressionMeaning.js';
|
|
9
|
-
export * from '../analysis/
|
|
9
|
+
export * from '../analysis/SourceFileAnalyzer.js';
|
|
10
10
|
export * from '../analysis/FindModifier.js';
|
|
11
11
|
export type { Meaning as IdentifierExpressionMeaning, ResolutionResult as IdentifierExpressionResolutionResult } from '../analysis/IdentifierExpressionMeaning.js';
|
|
12
12
|
export * from '../analysis/ImportedPackageNameTree.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CancellationToken } from './CancellationToken.js';
|
|
2
|
+
export declare class TaskController {
|
|
3
|
+
private checkCount;
|
|
4
|
+
private lastTimeMs;
|
|
5
|
+
private timeSliceMs;
|
|
6
|
+
readonly cancellationToken: CancellationToken | undefined;
|
|
7
|
+
constructor(timeSliceMs?: number, cancellationToken?: CancellationToken);
|
|
8
|
+
shouldYieldOnceOutOf100(): boolean;
|
|
9
|
+
shouldYield(onceOutOf?: number): boolean;
|
|
10
|
+
isCancellationRequested(): boolean;
|
|
11
|
+
throwIfCancellationRequested(): void;
|
|
12
|
+
yieldTask(timeMs?: number): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare function yieldTask(timeMs?: number): Promise<void>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as tree from '../tree/index.js';
|
|
2
|
-
import {
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function traverseTree(root: tree.Node, visitNodeCb: (node: tree.Node, controller: TraversalController) => void): void;
|
|
2
|
+
import { TaskController } from './TaskController.js';
|
|
3
|
+
export declare function traverseTree(root: tree.Node, visitTokens: boolean, taskController: TaskController | undefined, nodeVisitor: (node: tree.Node, controller: TraversalController) => Promise<void> | undefined): Promise<void>;
|
|
5
4
|
export declare class TraversalController {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
private shouldStopTraverse_;
|
|
6
|
+
private shouldSkipChildrenTraverse_;
|
|
7
|
+
readonly task?: TaskController;
|
|
8
|
+
constructor(task?: TaskController);
|
|
9
|
+
shouldStopTraverse(): boolean;
|
|
10
|
+
shouldSkipChildrenTraverse(): boolean;
|
|
9
11
|
stopTraverse(): void;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
reset(): void;
|
|
12
|
+
skipChildrenTraverse(): void;
|
|
13
|
+
resetSkipChildrenTraverse(): void;
|
|
13
14
|
}
|
|
@@ -5,7 +5,6 @@ export * from './Cached.js';
|
|
|
5
5
|
export * from './CancellationToken.js';
|
|
6
6
|
export * from './Constants.js';
|
|
7
7
|
export * from './Debug.js';
|
|
8
|
-
export * from './Delayed.js';
|
|
9
8
|
export * from './Displayable.js';
|
|
10
9
|
export * from './FormatString.js';
|
|
11
10
|
export * from './Interner.js';
|
|
@@ -24,10 +23,7 @@ export * from './PerformanceMeasurement.js';
|
|
|
24
23
|
export * from './Query.js';
|
|
25
24
|
export * from './Range.js';
|
|
26
25
|
export * from './Result.js';
|
|
27
|
-
export * from './
|
|
28
|
-
export * from './TreeQuery.js';
|
|
26
|
+
export * from './TaskController.js';
|
|
29
27
|
export * from './TreeTraversal.js';
|
|
30
28
|
export * from './Uri.js';
|
|
31
29
|
export * from './UserLocale.js';
|
|
32
|
-
export * from './WithDiagnostics.js';
|
|
33
|
-
export * from './YieldExecution.js';
|
|
@@ -226,7 +226,11 @@ export declare enum DiagnosticCode {
|
|
|
226
226
|
TheNumberOfTranslatedParametersMustBeEqualToTheNumberOfSourceParameters = 388,
|
|
227
227
|
TheNumberOfTranslatedTypeParametersMustBeEqualToTheNumberOfSourceTypeParameters = 389,
|
|
228
228
|
TheNameOfTheTranslatedOperatorMustMeTheSameAsSourceOperatorName = 390,
|
|
229
|
-
|
|
229
|
+
TranslationOfFunctionTypeMustIncludeParameterList = 391,
|
|
230
|
+
OnlyOneTextTranslationPackageShouldBeMarkedAsPrimary = 392,
|
|
231
|
+
Declarations0And1HaveTheSameSourceNamesButDifferentTranslatedNames23 = 393,
|
|
232
|
+
TranslatedDeclarations0And1HaveTheSameTranslatedNamesButDifferentSourceNames23 = 394,
|
|
233
|
+
TranslatedOverridingMember0MustTheSameNameAsBaseMember1 = 395,
|
|
230
234
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
|
231
235
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
|
232
236
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Diagnostic } from '
|
|
1
|
+
import { Diagnostic } from './Diagnostic.js';
|
|
2
2
|
export type WithDiagnostics<T> = WithDiagnostics_ok<T> | WithDiagnostics_error<T>;
|
|
3
3
|
export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
|
|
4
4
|
readonly value: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TaskController, Uri } from '../common/index.js';
|
|
3
3
|
import { JavaScriptImplementationConfig, PlatformKind } from '../project/index.js';
|
|
4
4
|
import { NamedEntity, PackageEntity, PackageMemberEntity } from './Entities.js';
|
|
5
5
|
import * as ir from './ir/index.js';
|
|
@@ -12,8 +12,8 @@ export declare class Emitter {
|
|
|
12
12
|
private readonly entityMap;
|
|
13
13
|
private readonly ectx;
|
|
14
14
|
constructor(analyzer: Analyzer, options: EmitOptions | undefined);
|
|
15
|
-
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor,
|
|
16
|
-
emitToString(
|
|
15
|
+
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor, taskController: TaskController): Promise<void>;
|
|
16
|
+
emitToString(taskController: TaskController): Promise<string>;
|
|
17
17
|
private createEmitterPackageFromSource;
|
|
18
18
|
private enumerateEmittingSourcePackages;
|
|
19
19
|
private createPackageWithMainFunction;
|
|
@@ -22,7 +22,7 @@ export declare class EmitterContext {
|
|
|
22
22
|
isTypeEmittedAsClass(entity: TypeOrExtensionEntity): boolean;
|
|
23
23
|
isRefOrPlainObjectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
|
24
24
|
isAspectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
|
25
|
-
|
|
25
|
+
allOverriddenMembers<T extends TypeMemberEntity>(entity: T): Iterable<T>;
|
|
26
26
|
}
|
|
27
27
|
export declare class WellKnownDeclarationKeys {
|
|
28
28
|
static readonly jsObjectType = "Platform.JavaScript.Object";
|
|
@@ -18,7 +18,7 @@ export declare class EntityMap {
|
|
|
18
18
|
private readonly linkedPackages;
|
|
19
19
|
constructor(analyzer: Analyzer, targetPlatform: PlatformKind);
|
|
20
20
|
getVariableEntity(entity: analyzerEntities.VariableEntity): emitterEntities.VariableEntity;
|
|
21
|
-
|
|
21
|
+
getNamedFunctionEntity(entity: analyzerEntities.NamedFunctionEntity): emitterEntities.FunctionEntity;
|
|
22
22
|
getOperatorEntity(entity: analyzerEntities.OperatorEntity): emitterEntities.FunctionEntity;
|
|
23
23
|
getConstructorEntity(entity: analyzerEntities.ConstructorEntity): emitterEntities.FunctionEntity;
|
|
24
24
|
getDestructorEntity(entity: analyzerEntities.DestructorEntity): emitterEntities.FunctionEntity;
|
|
@@ -90,13 +90,15 @@ export declare namespace TypeMemberEntity {
|
|
|
90
90
|
}
|
|
91
91
|
export type NamedTypeMemberEntity = FieldEntity | MethodEntity;
|
|
92
92
|
export declare function isNamedTypeMemberEntity(entity: Entity): entity is NamedTypeMemberEntity;
|
|
93
|
-
export type NamedEntity = VariableEntity | PackageVariantTypeEntity |
|
|
93
|
+
export type NamedEntity = VariableEntity | PackageVariantTypeEntity | NamedFunctionEntity | TypeParameterEntity | PackageFunctionTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
|
94
94
|
export type PackageOrNestedFunctionEntity = PackageFunctionEntity | NestedFunctionEntity;
|
|
95
95
|
export type AccessorEntity = GetterEntity | SetterEntity;
|
|
96
96
|
export type EntityWithTypeParameters = EntityContainingTypeParameter;
|
|
97
97
|
export declare function isEntityWithTypeParameters(entity: Entity): entity is EntityWithTypeParameters;
|
|
98
98
|
export type EntityWithParameters = Exclude<EntityContainingParameter, PackageEntity>;
|
|
99
99
|
export declare function isEntityWithParameters(entity: Entity): entity is EntityWithParameters;
|
|
100
|
+
export type NamedFunctionEntity = PackageFunctionEntity | MethodEntity | NestedFunctionEntity;
|
|
101
|
+
export declare function isNamedFunctionEntity(entity: Entity): entity is NamedFunctionEntity;
|
|
100
102
|
export declare class EntityContext {
|
|
101
103
|
readonly containingPackage: PackageEntity;
|
|
102
104
|
readonly hidingMatcher: IEntityHidingMatcher;
|
|
@@ -5,8 +5,10 @@ export declare class EntityNaming_named {
|
|
|
5
5
|
readonly kind = "named";
|
|
6
6
|
constructor(value: Name);
|
|
7
7
|
toString(): string;
|
|
8
|
+
considerEqual(other: EntityNaming, considerBackQuotes: boolean): boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare class EntityNaming_anonymous {
|
|
10
11
|
readonly kind = "anonymous";
|
|
11
12
|
toString(): string;
|
|
13
|
+
considerEqual(other: EntityNaming, _considerBackQuotes: boolean): boolean;
|
|
12
14
|
}
|