Bump version to 4.3.1-rc and LKG

This commit is contained in:
TypeScript Bot
2021-05-09 07:27:07 +00:00
parent bab601b5e6
commit d805ce877a
12 changed files with 14619 additions and 13413 deletions
+8 -2
View File
@@ -501,6 +501,7 @@ declare namespace ts.server.protocol {
type OrganizeImportsScope = GetCombinedCodeFixScope;
interface OrganizeImportsRequestArgs {
scope: OrganizeImportsScope;
skipDestructiveCodeActions?: boolean;
}
interface OrganizeImportsResponse extends Response {
body: readonly FileCodeEdits[];
@@ -736,7 +737,7 @@ declare namespace ts.server.protocol {
* Definition response message. Gives text range for definition.
*/
interface DefinitionResponse extends Response {
body?: FileSpanWithContext[];
body?: DefinitionInfo[];
}
interface DefinitionInfoAndBoundSpanResponse extends Response {
body?: DefinitionInfoAndBoundSpan;
@@ -1725,9 +1726,14 @@ declare namespace ts.server.protocol {
isFromUncheckedFile?: true;
/**
* If true, this completion was for an auto-import of a module not yet in the program, but listed
* in the project package.json.
* in the project package.json. Used for telemetry reporting.
*/
isPackageJsonImport?: true;
/**
* If true, this completion was an auto-import-style completion of an import statement (i.e., the
* module specifier was inserted along with the imported identifier). Used for telemetry reporting.
*/
isImportStatementCompletion?: true;
/**
* A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
* that allows TS Server to look up the symbol represented by the completion item, disambiguating
+1902 -1917
View File
File diff suppressed because it is too large Load Diff
+2599 -2310
View File
File diff suppressed because it is too large Load Diff
+87 -46
View File
@@ -540,7 +540,7 @@ declare namespace ts {
Override = 16384,
HasComputedFlags = 536870912,
AccessibilityModifier = 28,
ParameterPropertyModifier = 92,
ParameterPropertyModifier = 16476,
NonPublicAccessibilityModifier = 24,
TypeScriptModifier = 18654,
ExportDefault = 513,
@@ -563,7 +563,7 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -1380,7 +1380,7 @@ declare namespace ts {
readonly containsOnlyTriviaWhiteSpaces: boolean;
}
export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
export interface Statement extends Node {
export interface Statement extends Node, JSDocContainer {
_statementBrand: any;
}
export interface NotEmittedStatement extends Statement {
@@ -1408,11 +1408,11 @@ declare namespace ts {
readonly kind: SyntaxKind.Block;
readonly statements: NodeArray<Statement>;
}
export interface VariableStatement extends Statement, JSDocContainer {
export interface VariableStatement extends Statement {
readonly kind: SyntaxKind.VariableStatement;
readonly declarationList: VariableDeclarationList;
}
export interface ExpressionStatement extends Statement, JSDocContainer {
export interface ExpressionStatement extends Statement {
readonly kind: SyntaxKind.ExpressionStatement;
readonly expression: Expression;
}
@@ -1493,7 +1493,7 @@ declare namespace ts {
readonly statements: NodeArray<Statement>;
}
export type CaseOrDefaultClause = CaseClause | DefaultClause;
export interface LabeledStatement extends Statement, JSDocContainer {
export interface LabeledStatement extends Statement {
readonly kind: SyntaxKind.LabeledStatement;
readonly label: Identifier;
readonly statement: Statement;
@@ -1613,7 +1613,7 @@ declare namespace ts {
readonly parent: ImportEqualsDeclaration;
readonly expression: Expression;
}
export interface ImportDeclaration extends Statement, JSDocContainer {
export interface ImportDeclaration extends Statement {
readonly kind: SyntaxKind.ImportDeclaration;
readonly parent: SourceFile | ModuleBlock;
readonly importClause?: ImportClause;
@@ -2291,8 +2291,7 @@ declare namespace ts {
IgnoreErrors = 70221824,
InObjectTypeLiteral = 4194304,
InTypeAlias = 8388608,
InInitialEntityName = 16777216,
InReverseMappedType = 33554432
InInitialEntityName = 16777216
}
export enum TypeFormatFlags {
None = 0,
@@ -2560,15 +2559,15 @@ declare namespace ts {
ObjectLiteral = 128,
EvolvingArray = 256,
ObjectLiteralPatternWithComputedProperties = 512,
ContainsSpread = 1024,
ReverseMapped = 2048,
JsxAttributes = 4096,
MarkerType = 8192,
JSLiteral = 16384,
FreshLiteral = 32768,
ArrayLiteral = 65536,
ObjectRestType = 131072,
ReverseMapped = 1024,
JsxAttributes = 2048,
MarkerType = 4096,
JSLiteral = 8192,
FreshLiteral = 16384,
ArrayLiteral = 32768,
ClassOrInterface = 3,
ContainsSpread = 4194304,
ObjectRestType = 8388608,
}
export interface ObjectType extends Type {
objectFlags: ObjectFlags;
@@ -2682,6 +2681,7 @@ declare namespace ts {
type: Type;
}
export interface SubstitutionType extends InstantiableType {
objectFlags: ObjectFlags;
baseType: Type;
substitute: Type;
}
@@ -2706,16 +2706,17 @@ declare namespace ts {
export enum InferencePriority {
NakedTypeVariable = 1,
SpeculativeTuple = 2,
HomomorphicMappedType = 4,
PartialHomomorphicMappedType = 8,
MappedTypeConstraint = 16,
ContravariantConditional = 32,
ReturnType = 64,
LiteralKeyof = 128,
NoConstraints = 256,
AlwaysStrict = 512,
MaxValue = 1024,
PriorityImpliesCombination = 208,
SubstituteSource = 4,
HomomorphicMappedType = 8,
PartialHomomorphicMappedType = 16,
MappedTypeConstraint = 32,
ContravariantConditional = 64,
ReturnType = 128,
LiteralKeyof = 256,
NoConstraints = 512,
AlwaysStrict = 1024,
MaxValue = 2048,
PriorityImpliesCombination = 416,
Circularity = -1
}
/** @deprecated Use FileExtensionInfo instead. */
@@ -4708,13 +4709,13 @@ declare namespace ts {
export {};
}
declare namespace ts {
function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
/**
* @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
* This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
* is assumed to be the same as root directory of the project.
*/
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
/**
* Given a set of options, returns the set of type directive names
* that should be included for this program automatically.
@@ -4723,30 +4724,46 @@ declare namespace ts {
* More type directives might appear in the program later as a result of loading actual source files;
* this list is only the set of defaults that are implicitly included.
*/
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
}
/**
* Cached module resolutions per containing directory.
* Cached resolutions per containing directory.
* This assumes that any module id will have the same resolution for sibling files located in the same folder.
*/
interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<ResolvedModuleWithFailedLookupLocations>;
export interface PerDirectoryResolutionCache<T> {
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<T>;
clear(): void;
/**
* Updates with the current compilerOptions the cache will operate with.
* This updates the redirects map as well if needed so module resolutions are cached if they can across the projects
*/
update(options: CompilerOptions): void;
}
export interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
getPackageJsonInfoCache(): PackageJsonInfoCache;
}
/**
* Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
* We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
*/
interface NonRelativeModuleNameResolutionCache {
export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
getOrCreateCacheForModuleName(nonRelativeModuleName: string, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
}
interface PerModuleNameCache {
export interface PackageJsonInfoCache {
clear(): void;
}
export interface PerModuleNameCache {
get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
}
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
export function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
export function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export {};
}
declare namespace ts {
/**
@@ -5202,9 +5219,9 @@ declare namespace ts {
interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
}
interface SolutionBuilder<T extends BuilderProgram> {
build(project?: string, cancellationToken?: CancellationToken): ExitStatus;
build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
clean(project?: string): ExitStatus;
buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus;
buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
cleanReferences(project?: string): ExitStatus;
getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
}
@@ -5650,7 +5667,7 @@ declare namespace ts {
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[];
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
getProgram(): Program | undefined;
@@ -5667,7 +5684,9 @@ declare namespace ts {
type: "file";
fileName: string;
}
type OrganizeImportsScope = CombinedCodeFixScope;
interface OrganizeImportsArgs extends CombinedCodeFixScope {
skipDestructiveCodeActions?: boolean;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
interface GetCompletionsAtPositionOptions extends UserPreferences {
/**
@@ -6196,6 +6215,7 @@ declare namespace ts {
isRecommended?: true;
isFromUncheckedFile?: true;
isPackageJsonImport?: true;
isImportStatementCompletion?: true;
/**
* A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
* that allows TS Server to look up the symbol represented by the completion item, disambiguating
@@ -6517,8 +6537,23 @@ declare namespace ts {
* @param fileName The name of the file to be released
* @param compilationSettings The compilation settings used to acquire the file
*/
/**@deprecated pass scriptKind for correctness */
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
/**
* Informs the DocumentRegistry that a file is not needed any longer.
*
* Note: It is not allowed to call release on a SourceFile that was not acquired from
* this registry originally.
*
* @param fileName The name of the file to be released
* @param compilationSettings The compilation settings used to acquire the file
* @param scriptKind The script kind of the file to be released
*/
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind): void;
/**
* @deprecated pass scriptKind for correctness */
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind): void;
reportStats(): string;
}
type DocumentRegistryBucketKey = string & {
@@ -7154,6 +7189,7 @@ declare namespace ts.server.protocol {
type OrganizeImportsScope = GetCombinedCodeFixScope;
interface OrganizeImportsRequestArgs {
scope: OrganizeImportsScope;
skipDestructiveCodeActions?: boolean;
}
interface OrganizeImportsResponse extends Response {
body: readonly FileCodeEdits[];
@@ -7389,7 +7425,7 @@ declare namespace ts.server.protocol {
* Definition response message. Gives text range for definition.
*/
interface DefinitionResponse extends Response {
body?: FileSpanWithContext[];
body?: DefinitionInfo[];
}
interface DefinitionInfoAndBoundSpanResponse extends Response {
body?: DefinitionInfoAndBoundSpan;
@@ -8378,9 +8414,14 @@ declare namespace ts.server.protocol {
isFromUncheckedFile?: true;
/**
* If true, this completion was for an auto-import of a module not yet in the program, but listed
* in the project package.json.
* in the project package.json. Used for telemetry reporting.
*/
isPackageJsonImport?: true;
/**
* If true, this completion was an auto-import-style completion of an import statement (i.e., the
* module specifier was inserted along with the imported identifier). Used for telemetry reporting.
*/
isImportStatementCompletion?: true;
/**
* A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
* that allows TS Server to look up the symbol represented by the completion item, disambiguating
+2599 -2310
View File
File diff suppressed because it is too large Load Diff
+79 -44
View File
@@ -540,7 +540,7 @@ declare namespace ts {
Override = 16384,
HasComputedFlags = 536870912,
AccessibilityModifier = 28,
ParameterPropertyModifier = 92,
ParameterPropertyModifier = 16476,
NonPublicAccessibilityModifier = 24,
TypeScriptModifier = 18654,
ExportDefault = 513,
@@ -563,7 +563,7 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -1380,7 +1380,7 @@ declare namespace ts {
readonly containsOnlyTriviaWhiteSpaces: boolean;
}
export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
export interface Statement extends Node {
export interface Statement extends Node, JSDocContainer {
_statementBrand: any;
}
export interface NotEmittedStatement extends Statement {
@@ -1408,11 +1408,11 @@ declare namespace ts {
readonly kind: SyntaxKind.Block;
readonly statements: NodeArray<Statement>;
}
export interface VariableStatement extends Statement, JSDocContainer {
export interface VariableStatement extends Statement {
readonly kind: SyntaxKind.VariableStatement;
readonly declarationList: VariableDeclarationList;
}
export interface ExpressionStatement extends Statement, JSDocContainer {
export interface ExpressionStatement extends Statement {
readonly kind: SyntaxKind.ExpressionStatement;
readonly expression: Expression;
}
@@ -1493,7 +1493,7 @@ declare namespace ts {
readonly statements: NodeArray<Statement>;
}
export type CaseOrDefaultClause = CaseClause | DefaultClause;
export interface LabeledStatement extends Statement, JSDocContainer {
export interface LabeledStatement extends Statement {
readonly kind: SyntaxKind.LabeledStatement;
readonly label: Identifier;
readonly statement: Statement;
@@ -1613,7 +1613,7 @@ declare namespace ts {
readonly parent: ImportEqualsDeclaration;
readonly expression: Expression;
}
export interface ImportDeclaration extends Statement, JSDocContainer {
export interface ImportDeclaration extends Statement {
readonly kind: SyntaxKind.ImportDeclaration;
readonly parent: SourceFile | ModuleBlock;
readonly importClause?: ImportClause;
@@ -2291,8 +2291,7 @@ declare namespace ts {
IgnoreErrors = 70221824,
InObjectTypeLiteral = 4194304,
InTypeAlias = 8388608,
InInitialEntityName = 16777216,
InReverseMappedType = 33554432
InInitialEntityName = 16777216
}
export enum TypeFormatFlags {
None = 0,
@@ -2560,15 +2559,15 @@ declare namespace ts {
ObjectLiteral = 128,
EvolvingArray = 256,
ObjectLiteralPatternWithComputedProperties = 512,
ContainsSpread = 1024,
ReverseMapped = 2048,
JsxAttributes = 4096,
MarkerType = 8192,
JSLiteral = 16384,
FreshLiteral = 32768,
ArrayLiteral = 65536,
ObjectRestType = 131072,
ReverseMapped = 1024,
JsxAttributes = 2048,
MarkerType = 4096,
JSLiteral = 8192,
FreshLiteral = 16384,
ArrayLiteral = 32768,
ClassOrInterface = 3,
ContainsSpread = 4194304,
ObjectRestType = 8388608,
}
export interface ObjectType extends Type {
objectFlags: ObjectFlags;
@@ -2682,6 +2681,7 @@ declare namespace ts {
type: Type;
}
export interface SubstitutionType extends InstantiableType {
objectFlags: ObjectFlags;
baseType: Type;
substitute: Type;
}
@@ -2706,16 +2706,17 @@ declare namespace ts {
export enum InferencePriority {
NakedTypeVariable = 1,
SpeculativeTuple = 2,
HomomorphicMappedType = 4,
PartialHomomorphicMappedType = 8,
MappedTypeConstraint = 16,
ContravariantConditional = 32,
ReturnType = 64,
LiteralKeyof = 128,
NoConstraints = 256,
AlwaysStrict = 512,
MaxValue = 1024,
PriorityImpliesCombination = 208,
SubstituteSource = 4,
HomomorphicMappedType = 8,
PartialHomomorphicMappedType = 16,
MappedTypeConstraint = 32,
ContravariantConditional = 64,
ReturnType = 128,
LiteralKeyof = 256,
NoConstraints = 512,
AlwaysStrict = 1024,
MaxValue = 2048,
PriorityImpliesCombination = 416,
Circularity = -1
}
/** @deprecated Use FileExtensionInfo instead. */
@@ -4708,13 +4709,13 @@ declare namespace ts {
export {};
}
declare namespace ts {
function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
/**
* @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
* This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
* is assumed to be the same as root directory of the project.
*/
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
/**
* Given a set of options, returns the set of type directive names
* that should be included for this program automatically.
@@ -4723,30 +4724,46 @@ declare namespace ts {
* More type directives might appear in the program later as a result of loading actual source files;
* this list is only the set of defaults that are implicitly included.
*/
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
}
/**
* Cached module resolutions per containing directory.
* Cached resolutions per containing directory.
* This assumes that any module id will have the same resolution for sibling files located in the same folder.
*/
interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<ResolvedModuleWithFailedLookupLocations>;
export interface PerDirectoryResolutionCache<T> {
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<T>;
clear(): void;
/**
* Updates with the current compilerOptions the cache will operate with.
* This updates the redirects map as well if needed so module resolutions are cached if they can across the projects
*/
update(options: CompilerOptions): void;
}
export interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
getPackageJsonInfoCache(): PackageJsonInfoCache;
}
/**
* Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
* We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
*/
interface NonRelativeModuleNameResolutionCache {
export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
getOrCreateCacheForModuleName(nonRelativeModuleName: string, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
}
interface PerModuleNameCache {
export interface PackageJsonInfoCache {
clear(): void;
}
export interface PerModuleNameCache {
get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
}
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
export function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
export function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export {};
}
declare namespace ts {
/**
@@ -5202,9 +5219,9 @@ declare namespace ts {
interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
}
interface SolutionBuilder<T extends BuilderProgram> {
build(project?: string, cancellationToken?: CancellationToken): ExitStatus;
build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
clean(project?: string): ExitStatus;
buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus;
buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
cleanReferences(project?: string): ExitStatus;
getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
}
@@ -5650,7 +5667,7 @@ declare namespace ts {
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[];
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
getProgram(): Program | undefined;
@@ -5667,7 +5684,9 @@ declare namespace ts {
type: "file";
fileName: string;
}
type OrganizeImportsScope = CombinedCodeFixScope;
interface OrganizeImportsArgs extends CombinedCodeFixScope {
skipDestructiveCodeActions?: boolean;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
interface GetCompletionsAtPositionOptions extends UserPreferences {
/**
@@ -6196,6 +6215,7 @@ declare namespace ts {
isRecommended?: true;
isFromUncheckedFile?: true;
isPackageJsonImport?: true;
isImportStatementCompletion?: true;
/**
* A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
* that allows TS Server to look up the symbol represented by the completion item, disambiguating
@@ -6517,8 +6537,23 @@ declare namespace ts {
* @param fileName The name of the file to be released
* @param compilationSettings The compilation settings used to acquire the file
*/
/**@deprecated pass scriptKind for correctness */
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
/**
* Informs the DocumentRegistry that a file is not needed any longer.
*
* Note: It is not allowed to call release on a SourceFile that was not acquired from
* this registry originally.
*
* @param fileName The name of the file to be released
* @param compilationSettings The compilation settings used to acquire the file
* @param scriptKind The script kind of the file to be released
*/
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind): void;
/**
* @deprecated pass scriptKind for correctness */
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind): void;
reportStats(): string;
}
type DocumentRegistryBucketKey = string & {
+2576 -2294
View File
File diff suppressed because it is too large Load Diff
+79 -44
View File
@@ -540,7 +540,7 @@ declare namespace ts {
Override = 16384,
HasComputedFlags = 536870912,
AccessibilityModifier = 28,
ParameterPropertyModifier = 92,
ParameterPropertyModifier = 16476,
NonPublicAccessibilityModifier = 24,
TypeScriptModifier = 18654,
ExportDefault = 513,
@@ -563,7 +563,7 @@ declare namespace ts {
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -1380,7 +1380,7 @@ declare namespace ts {
readonly containsOnlyTriviaWhiteSpaces: boolean;
}
export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
export interface Statement extends Node {
export interface Statement extends Node, JSDocContainer {
_statementBrand: any;
}
export interface NotEmittedStatement extends Statement {
@@ -1408,11 +1408,11 @@ declare namespace ts {
readonly kind: SyntaxKind.Block;
readonly statements: NodeArray<Statement>;
}
export interface VariableStatement extends Statement, JSDocContainer {
export interface VariableStatement extends Statement {
readonly kind: SyntaxKind.VariableStatement;
readonly declarationList: VariableDeclarationList;
}
export interface ExpressionStatement extends Statement, JSDocContainer {
export interface ExpressionStatement extends Statement {
readonly kind: SyntaxKind.ExpressionStatement;
readonly expression: Expression;
}
@@ -1493,7 +1493,7 @@ declare namespace ts {
readonly statements: NodeArray<Statement>;
}
export type CaseOrDefaultClause = CaseClause | DefaultClause;
export interface LabeledStatement extends Statement, JSDocContainer {
export interface LabeledStatement extends Statement {
readonly kind: SyntaxKind.LabeledStatement;
readonly label: Identifier;
readonly statement: Statement;
@@ -1613,7 +1613,7 @@ declare namespace ts {
readonly parent: ImportEqualsDeclaration;
readonly expression: Expression;
}
export interface ImportDeclaration extends Statement, JSDocContainer {
export interface ImportDeclaration extends Statement {
readonly kind: SyntaxKind.ImportDeclaration;
readonly parent: SourceFile | ModuleBlock;
readonly importClause?: ImportClause;
@@ -2291,8 +2291,7 @@ declare namespace ts {
IgnoreErrors = 70221824,
InObjectTypeLiteral = 4194304,
InTypeAlias = 8388608,
InInitialEntityName = 16777216,
InReverseMappedType = 33554432
InInitialEntityName = 16777216
}
export enum TypeFormatFlags {
None = 0,
@@ -2560,15 +2559,15 @@ declare namespace ts {
ObjectLiteral = 128,
EvolvingArray = 256,
ObjectLiteralPatternWithComputedProperties = 512,
ContainsSpread = 1024,
ReverseMapped = 2048,
JsxAttributes = 4096,
MarkerType = 8192,
JSLiteral = 16384,
FreshLiteral = 32768,
ArrayLiteral = 65536,
ObjectRestType = 131072,
ReverseMapped = 1024,
JsxAttributes = 2048,
MarkerType = 4096,
JSLiteral = 8192,
FreshLiteral = 16384,
ArrayLiteral = 32768,
ClassOrInterface = 3,
ContainsSpread = 4194304,
ObjectRestType = 8388608,
}
export interface ObjectType extends Type {
objectFlags: ObjectFlags;
@@ -2682,6 +2681,7 @@ declare namespace ts {
type: Type;
}
export interface SubstitutionType extends InstantiableType {
objectFlags: ObjectFlags;
baseType: Type;
substitute: Type;
}
@@ -2706,16 +2706,17 @@ declare namespace ts {
export enum InferencePriority {
NakedTypeVariable = 1,
SpeculativeTuple = 2,
HomomorphicMappedType = 4,
PartialHomomorphicMappedType = 8,
MappedTypeConstraint = 16,
ContravariantConditional = 32,
ReturnType = 64,
LiteralKeyof = 128,
NoConstraints = 256,
AlwaysStrict = 512,
MaxValue = 1024,
PriorityImpliesCombination = 208,
SubstituteSource = 4,
HomomorphicMappedType = 8,
PartialHomomorphicMappedType = 16,
MappedTypeConstraint = 32,
ContravariantConditional = 64,
ReturnType = 128,
LiteralKeyof = 256,
NoConstraints = 512,
AlwaysStrict = 1024,
MaxValue = 2048,
PriorityImpliesCombination = 416,
Circularity = -1
}
/** @deprecated Use FileExtensionInfo instead. */
@@ -4708,13 +4709,13 @@ declare namespace ts {
export {};
}
declare namespace ts {
function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
/**
* @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
* This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
* is assumed to be the same as root directory of the project.
*/
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
/**
* Given a set of options, returns the set of type directive names
* that should be included for this program automatically.
@@ -4723,30 +4724,46 @@ declare namespace ts {
* More type directives might appear in the program later as a result of loading actual source files;
* this list is only the set of defaults that are implicitly included.
*/
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
}
/**
* Cached module resolutions per containing directory.
* Cached resolutions per containing directory.
* This assumes that any module id will have the same resolution for sibling files located in the same folder.
*/
interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<ResolvedModuleWithFailedLookupLocations>;
export interface PerDirectoryResolutionCache<T> {
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<T>;
clear(): void;
/**
* Updates with the current compilerOptions the cache will operate with.
* This updates the redirects map as well if needed so module resolutions are cached if they can across the projects
*/
update(options: CompilerOptions): void;
}
export interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
getPackageJsonInfoCache(): PackageJsonInfoCache;
}
/**
* Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
* We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
*/
interface NonRelativeModuleNameResolutionCache {
export interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
getOrCreateCacheForModuleName(nonRelativeModuleName: string, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
}
interface PerModuleNameCache {
export interface PackageJsonInfoCache {
clear(): void;
}
export interface PerModuleNameCache {
get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
}
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
export function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
export function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
export function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
export {};
}
declare namespace ts {
/**
@@ -5202,9 +5219,9 @@ declare namespace ts {
interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
}
interface SolutionBuilder<T extends BuilderProgram> {
build(project?: string, cancellationToken?: CancellationToken): ExitStatus;
build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
clean(project?: string): ExitStatus;
buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus;
buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus;
cleanReferences(project?: string): ExitStatus;
getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
}
@@ -5650,7 +5667,7 @@ declare namespace ts {
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): ApplicableRefactorInfo[];
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
getProgram(): Program | undefined;
@@ -5667,7 +5684,9 @@ declare namespace ts {
type: "file";
fileName: string;
}
type OrganizeImportsScope = CombinedCodeFixScope;
interface OrganizeImportsArgs extends CombinedCodeFixScope {
skipDestructiveCodeActions?: boolean;
}
type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " ";
interface GetCompletionsAtPositionOptions extends UserPreferences {
/**
@@ -6196,6 +6215,7 @@ declare namespace ts {
isRecommended?: true;
isFromUncheckedFile?: true;
isPackageJsonImport?: true;
isImportStatementCompletion?: true;
/**
* A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`,
* that allows TS Server to look up the symbol represented by the completion item, disambiguating
@@ -6517,8 +6537,23 @@ declare namespace ts {
* @param fileName The name of the file to be released
* @param compilationSettings The compilation settings used to acquire the file
*/
/**@deprecated pass scriptKind for correctness */
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
/**
* Informs the DocumentRegistry that a file is not needed any longer.
*
* Note: It is not allowed to call release on a SourceFile that was not acquired from
* this registry originally.
*
* @param fileName The name of the file to be released
* @param compilationSettings The compilation settings used to acquire the file
* @param scriptKind The script kind of the file to be released
*/
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind): void;
/**
* @deprecated pass scriptKind for correctness */
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind): void;
reportStats(): string;
}
type DocumentRegistryBucketKey = string & {
+2576 -2294
View File
File diff suppressed because it is too large Load Diff
+2112 -2150
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "4.3.0-beta",
"version": "4.3.1-rc",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
+1 -1
View File
@@ -5,7 +5,7 @@ namespace ts {
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
export const version = `${versionMajorMinor}.0-beta`;
export const version = "4.3.1-rc" as string;
/**
* Type of objects whose values are all of the same type.