Bump LKG and package.json to 5.0.0-dev.20230112 (#51787)

This commit is contained in:
Jake Bailey 2023-01-12 19:17:37 -08:00 коммит произвёл GitHub
Родитель 3e9703f126
Коммит ef81c80482
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
18 изменённых файлов: 239364 добавлений и 171828 удалений

Просмотреть файл

@ -6,6 +6,7 @@ import { task } from "hereby";
import _glob from "glob";
import util from "util";
import chalk from "chalk";
import fsExtra from "fs-extra";
import { Debouncer, Deferred, exec, getDiffTool, getDirSize, memoize, needsUpdate, readJson } from "./scripts/build/utils.mjs";
import { localBaseline, localRwcBaseline, refBaseline, refRwcBaseline, runConsoleTests } from "./scripts/build/tests.mjs";
import { buildProject, cleanProject, watchProject } from "./scripts/build/projects.mjs";
@ -854,3 +855,14 @@ export const help = task({
hiddenFromTaskList: true,
run: () => exec("hereby", ["--tasks"], { hidePrompt: true }),
});
export const bumpLkgToNightly = task({
name: "bump-lkg-to-nightly",
description: "Bumps typescript in package.json to the latest nightly and copies it to LKG.",
run: async () => {
await exec("npm", ["install", "--save-dev", "--save-exact", "typescript@next"]);
await fs.promises.rm("lib", { recursive: true, force: true });
await fsExtra.copy("node_modules/typescript/lib", "lib");
await fs.promises.writeFile("lib/.gitattributes", "* text eol=lf");
}
});

Просмотреть файл

@ -30,6 +30,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
@ -77,6 +81,7 @@ function createCancellationToken(args) {
} else {
return {
isCancellationRequested: () => pipeExists(cancellationPipeName),
// TODO: GH#18217
setRequest: (_requestId) => void 0,
resetRequest: (_requestId) => void 0
};

15
lib/lib.es2021.intl.d.ts поставляемый
Просмотреть файл

@ -85,6 +85,12 @@ declare namespace Intl {
style?: ListFormatStyle | undefined;
}
interface ResolvedListFormatOptions {
locale: string;
style: ListFormatStyle;
type: ListFormatType;
}
interface ListFormat {
/**
* Returns a string with a language-specific representation of the list.
@ -111,6 +117,15 @@ declare namespace Intl {
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
*/
formatToParts(list: Iterable<string>): { type: "element" | "literal", value: string; }[];
/**
* Returns a new object with properties reflecting the locale and style
* formatting options computed during the construction of the current
* `Intl.ListFormat` object.
*
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
*/
resolvedOptions(): ResolvedListFormatOptions;
}
const ListFormat: {

1
lib/lib.es2022.d.ts поставляемый
Просмотреть файл

@ -25,3 +25,4 @@ and limitations under the License.
/// <reference lib="es2022.object" />
/// <reference lib="es2022.sharedmemory" />
/// <reference lib="es2022.string" />
/// <reference lib="es2022.regexp" />

41
lib/lib.es2022.regexp.d.ts поставляемый Normal file
Просмотреть файл

@ -0,0 +1,41 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface RegExpMatchArray {
indices?: RegExpIndicesArray;
}
interface RegExpExecArray {
indices?: RegExpIndicesArray;
}
interface RegExpIndicesArray extends Array<[number, number]> {
groups?: {
[key: string]: [number, number];
};
}
interface RegExp {
/**
* Returns a Boolean value indicating the state of the hasIndices flag (d) used with with a regular expression.
* Default is false. Read-only.
*/
readonly hasIndices: boolean;
}

16
lib/lib.es2022.sharedmemory.d.ts поставляемый
Просмотреть файл

@ -22,6 +22,20 @@ interface Atomics {
/**
* A non-blocking, asynchronous version of wait which is usable on the main thread.
* Waits asynchronously on a shared memory location and returns a Promise
* @param typedArray A shared Int32Array or BigInt64Array.
* @param index The position in the typedArray to wait on.
* @param value The expected value to test.
* @param [timeout] The expected value to test.
*/
waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> };
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> };
/**
* A non-blocking, asynchronous version of wait which is usable on the main thread.
* Waits asynchronously on a shared memory location and returns a Promise
* @param typedArray A shared Int32Array or BigInt64Array.
* @param index The position in the typedArray to wait on.
* @param value The expected value to test.
* @param [timeout] The expected value to test.
*/
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> };
}

7
lib/lib.es5.d.ts поставляемый
Просмотреть файл

@ -1137,6 +1137,13 @@ interface JSON {
* If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: Function | Symbol | undefined, replacer?: (number | string)[] | null, space?: string | number): undefined;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.

20417
lib/tsc.js

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

308
lib/tsserverlibrary.d.ts поставляемый
Просмотреть файл

@ -691,6 +691,7 @@ declare namespace ts {
*/
interface GetSupportedCodeFixesRequest extends Request {
command: CommandTypes.GetSupportedCodeFixes;
arguments?: Partial<FileRequestArgs>;
}
/**
* A response for GetSupportedCodeFixesRequest request.
@ -2801,6 +2802,7 @@ declare namespace ts {
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
readonly autoImportFileExcludePatterns?: string[];
readonly organizeImportsIgnoreCase?: "auto" | boolean;
/**
* Indicates whether {@link ReferencesResponseItem.lineText} is supported.
*/
@ -3183,10 +3185,7 @@ declare namespace ts {
readFile(fileName: string): string | undefined;
writeFile(fileName: string, content: string): void;
fileExists(file: string): boolean;
resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModuleFull | undefined)[];
getModuleResolutionCache(): ModuleResolutionCache | undefined;
getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
resolveTypeReferenceDirectives(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
directoryExists(path: string): boolean;
getDirectories(path: string): string[];
log(s: string): void;
@ -3967,21 +3966,6 @@ declare namespace ts {
interface SortedArray<T> extends Array<T> {
" __sortedArrayBrand": any;
}
/** Common read methods for ES6 Map/Set. */
interface ReadonlyCollection<K> {
readonly size: number;
has(key: K): boolean;
keys(): Iterator<K>;
}
/** Common write methods for ES6 Map/Set. */
interface Collection<K> extends ReadonlyCollection<K> {
delete(key: K): boolean;
clear(): void;
}
/** Array that is only intended to be pushed to, never read. */
interface Push<T> {
push(...values: T[]): void;
}
type Path = string & {
__pathBrand: any;
};
@ -4340,23 +4324,25 @@ declare namespace ts {
JSDocReadonlyTag = 339,
JSDocOverrideTag = 340,
JSDocCallbackTag = 341,
JSDocEnumTag = 342,
JSDocParameterTag = 343,
JSDocReturnTag = 344,
JSDocThisTag = 345,
JSDocTypeTag = 346,
JSDocTemplateTag = 347,
JSDocTypedefTag = 348,
JSDocSeeTag = 349,
JSDocPropertyTag = 350,
SyntaxList = 351,
NotEmittedStatement = 352,
PartiallyEmittedExpression = 353,
CommaListExpression = 354,
MergeDeclarationMarker = 355,
EndOfDeclarationMarker = 356,
SyntheticReferenceExpression = 357,
Count = 358,
JSDocOverloadTag = 342,
JSDocEnumTag = 343,
JSDocParameterTag = 344,
JSDocReturnTag = 345,
JSDocThisTag = 346,
JSDocTypeTag = 347,
JSDocTemplateTag = 348,
JSDocTypedefTag = 349,
JSDocSeeTag = 350,
JSDocPropertyTag = 351,
JSDocThrowsTag = 352,
SyntaxList = 353,
NotEmittedStatement = 354,
PartiallyEmittedExpression = 355,
CommaListExpression = 356,
MergeDeclarationMarker = 357,
EndOfDeclarationMarker = 358,
SyntheticReferenceExpression = 359,
Count = 360,
FirstAssignment = 63,
LastAssignment = 78,
FirstCompoundAssignment = 64,
@ -4385,9 +4371,9 @@ declare namespace ts {
LastStatement = 256,
FirstNode = 163,
FirstJSDocNode = 312,
LastJSDocNode = 350,
LastJSDocNode = 352,
FirstJSDocTagNode = 330,
LastJSDocTagNode = 350
LastJSDocTagNode = 352
}
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@ -4513,9 +4499,16 @@ declare namespace ts {
*/
readonly modifiers?: NodeArray<ModifierLike> | undefined;
}
interface JSDocContainer {
interface JSDocContainer extends Node {
_jsdocContainerBrand: any;
}
type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | 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 | ExportSpecifier | CaseClause | EndOfFileToken;
interface LocalsContainer extends Node {
_localsContainerBrand: any;
}
interface FlowContainer extends Node {
_flowContainerBrand: any;
}
type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@ -4547,6 +4540,7 @@ declare namespace ts {
type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>;
type AssertKeyword = KeywordToken<SyntaxKind.AssertKeyword>;
type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>;
type CaseKeyword = KeywordToken<SyntaxKind.CaseKeyword>;
/** @deprecated Use `AwaitKeyword` instead. */
type AwaitKeywordToken = AwaitKeyword;
/** @deprecated Use `AssertsKeyword` instead. */
@ -4583,7 +4577,7 @@ declare namespace ts {
FileLevel = 32,
AllowNameSubstitution = 64
}
interface Identifier extends PrimaryExpression, Declaration {
interface Identifier extends PrimaryExpression, Declaration, JSDocContainer, FlowContainer {
readonly kind: SyntaxKind.Identifier;
/**
* Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
@ -4599,7 +4593,7 @@ declare namespace ts {
interface TransientIdentifier extends Identifier {
resolvedSymbol: Symbol;
}
interface QualifiedName extends Node {
interface QualifiedName extends Node, FlowContainer {
readonly kind: SyntaxKind.QualifiedName;
readonly left: EntityName;
readonly right: Identifier;
@ -4634,7 +4628,7 @@ declare namespace ts {
readonly parent: NamedDeclaration;
readonly expression: LeftHandSideExpression;
}
interface TypeParameterDeclaration extends NamedDeclaration {
interface TypeParameterDeclaration extends NamedDeclaration, JSDocContainer {
readonly kind: SyntaxKind.TypeParameter;
readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
readonly modifiers?: NodeArray<Modifier>;
@ -4652,10 +4646,10 @@ declare namespace ts {
readonly type?: TypeNode | undefined;
}
type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.CallSignature;
}
interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.ConstructSignature;
}
type BindingName = Identifier | BindingPattern;
@ -4682,7 +4676,7 @@ declare namespace ts {
readonly type?: TypeNode;
readonly initializer?: Expression;
}
interface BindingElement extends NamedDeclaration {
interface BindingElement extends NamedDeclaration, FlowContainer {
readonly kind: SyntaxKind.BindingElement;
readonly parent: BindingPattern;
readonly propertyName?: PropertyName;
@ -4692,6 +4686,7 @@ declare namespace ts {
}
interface PropertySignature extends TypeElement, JSDocContainer {
readonly kind: SyntaxKind.PropertySignature;
readonly parent: TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name: PropertyName;
readonly questionToken?: QuestionToken;
@ -4753,9 +4748,6 @@ declare namespace ts {
readonly expression: Expression;
}
type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
interface PropertyLikeDeclaration extends NamedDeclaration {
readonly name: PropertyName;
}
interface ObjectBindingPattern extends Node {
readonly kind: SyntaxKind.ObjectBindingPattern;
readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
@ -4786,26 +4778,26 @@ declare namespace ts {
type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
/** @deprecated Use SignatureDeclaration */
type FunctionLike = SignatureDeclaration;
interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement, LocalsContainer {
readonly kind: SyntaxKind.FunctionDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name?: Identifier;
readonly body?: FunctionBody;
}
interface MethodSignature extends SignatureDeclarationBase, TypeElement {
interface MethodSignature extends SignatureDeclarationBase, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.MethodSignature;
readonly parent: ObjectTypeDeclaration;
readonly parent: TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name: PropertyName;
}
interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.MethodDeclaration;
readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
readonly modifiers?: NodeArray<ModifierLike> | undefined;
readonly name: PropertyName;
readonly body?: FunctionBody | undefined;
}
interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.Constructor;
readonly parent: ClassLikeDeclaration;
readonly modifiers?: NodeArray<Modifier> | undefined;
@ -4816,14 +4808,14 @@ declare namespace ts {
readonly kind: SyntaxKind.SemicolonClassElement;
readonly parent: ClassLikeDeclaration;
}
interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.GetAccessor;
readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<ModifierLike>;
readonly name: PropertyName;
readonly body?: FunctionBody;
}
interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.SetAccessor;
readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<ModifierLike>;
@ -4831,13 +4823,13 @@ declare namespace ts {
readonly body?: FunctionBody;
}
type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.IndexSignature;
readonly parent: ObjectTypeDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly type: TypeNode;
}
interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
readonly parent: ClassDeclaration | ClassExpression;
readonly body: Block;
@ -4869,14 +4861,14 @@ declare namespace ts {
readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
readonly type: TypeNode;
}
interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
readonly kind: SyntaxKind.FunctionType;
}
interface FunctionTypeNode {
/** @deprecated A function type cannot have modifiers */
readonly modifiers?: NodeArray<Modifier> | undefined;
}
interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
readonly kind: SyntaxKind.ConstructorType;
readonly modifiers?: NodeArray<Modifier>;
}
@ -4911,7 +4903,7 @@ declare namespace ts {
readonly kind: SyntaxKind.TupleType;
readonly elements: NodeArray<TypeNode | NamedTupleMember>;
}
interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration {
interface NamedTupleMember extends TypeNode, Declaration, JSDocContainer {
readonly kind: SyntaxKind.NamedTupleMember;
readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
readonly name: Identifier;
@ -4935,7 +4927,7 @@ declare namespace ts {
readonly kind: SyntaxKind.IntersectionType;
readonly types: NodeArray<TypeNode>;
}
interface ConditionalTypeNode extends TypeNode {
interface ConditionalTypeNode extends TypeNode, LocalsContainer {
readonly kind: SyntaxKind.ConditionalType;
readonly checkType: TypeNode;
readonly extendsType: TypeNode;
@ -4960,7 +4952,7 @@ declare namespace ts {
readonly objectType: TypeNode;
readonly indexType: TypeNode;
}
interface MappedTypeNode extends TypeNode, Declaration {
interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
readonly kind: SyntaxKind.MappedType;
readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
readonly typeParameter: TypeParameterDeclaration;
@ -5039,10 +5031,10 @@ declare namespace ts {
readonly kind: SyntaxKind.FalseKeyword;
}
type BooleanLiteral = TrueLiteral | FalseLiteral;
interface ThisExpression extends PrimaryExpression {
interface ThisExpression extends PrimaryExpression, FlowContainer {
readonly kind: SyntaxKind.ThisKeyword;
}
interface SuperExpression extends PrimaryExpression {
interface SuperExpression extends PrimaryExpression, FlowContainer {
readonly kind: SyntaxKind.SuperKeyword;
}
interface ImportExpression extends PrimaryExpression {
@ -5096,7 +5088,7 @@ declare namespace ts {
type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
type BinaryOperatorToken = Token<BinaryOperator>;
interface BinaryExpression extends Expression, Declaration {
interface BinaryExpression extends Expression, Declaration, JSDocContainer {
readonly kind: SyntaxKind.BinaryExpression;
readonly left: Expression;
readonly operatorToken: BinaryOperatorToken;
@ -5133,13 +5125,13 @@ declare namespace ts {
}
type FunctionBody = Block;
type ConciseBody = FunctionBody | Expression;
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.FunctionExpression;
readonly modifiers?: NodeArray<Modifier>;
readonly name?: Identifier;
readonly body: FunctionBody;
}
interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ArrowFunction;
readonly modifiers?: NodeArray<Modifier>;
readonly equalsGreaterThanToken: EqualsGreaterThanToken;
@ -5226,13 +5218,13 @@ declare namespace ts {
interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
readonly properties: NodeArray<T>;
}
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike>, JSDocContainer {
readonly kind: SyntaxKind.ObjectLiteralExpression;
}
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
interface PropertyAccessExpression extends MemberExpression, NamedDeclaration, JSDocContainer, FlowContainer {
readonly kind: SyntaxKind.PropertyAccessExpression;
readonly expression: LeftHandSideExpression;
readonly questionDotToken?: QuestionDotToken;
@ -5251,7 +5243,7 @@ declare namespace ts {
readonly expression: EntityNameExpression;
readonly name: Identifier;
}
interface ElementAccessExpression extends MemberExpression {
interface ElementAccessExpression extends MemberExpression, Declaration, JSDocContainer, FlowContainer {
readonly kind: SyntaxKind.ElementAccessExpression;
readonly expression: LeftHandSideExpression;
readonly questionDotToken?: QuestionDotToken;
@ -5321,7 +5313,7 @@ declare namespace ts {
interface NonNullChain extends NonNullExpression {
_optionalChainBrand: any;
}
interface MetaProperty extends PrimaryExpression {
interface MetaProperty extends PrimaryExpression, FlowContainer {
readonly kind: SyntaxKind.MetaProperty;
readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
readonly name: Identifier;
@ -5414,7 +5406,7 @@ declare namespace ts {
interface EmptyStatement extends Statement {
readonly kind: SyntaxKind.EmptyStatement;
}
interface DebuggerStatement extends Statement {
interface DebuggerStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.DebuggerStatement;
}
interface MissingDeclaration extends DeclarationStatement {
@ -5422,20 +5414,20 @@ declare namespace ts {
readonly name?: Identifier;
}
type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
interface Block extends Statement {
interface Block extends Statement, LocalsContainer {
readonly kind: SyntaxKind.Block;
readonly statements: NodeArray<Statement>;
}
interface VariableStatement extends Statement {
interface VariableStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.VariableStatement;
readonly modifiers?: NodeArray<Modifier>;
readonly declarationList: VariableDeclarationList;
}
interface ExpressionStatement extends Statement {
interface ExpressionStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ExpressionStatement;
readonly expression: Expression;
}
interface IfStatement extends Statement {
interface IfStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.IfStatement;
readonly expression: Expression;
readonly thenStatement: Statement;
@ -5444,58 +5436,58 @@ declare namespace ts {
interface IterationStatement extends Statement {
readonly statement: Statement;
}
interface DoStatement extends IterationStatement {
interface DoStatement extends IterationStatement, FlowContainer {
readonly kind: SyntaxKind.DoStatement;
readonly expression: Expression;
}
interface WhileStatement extends IterationStatement {
interface WhileStatement extends IterationStatement, FlowContainer {
readonly kind: SyntaxKind.WhileStatement;
readonly expression: Expression;
}
type ForInitializer = VariableDeclarationList | Expression;
interface ForStatement extends IterationStatement {
interface ForStatement extends IterationStatement, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ForStatement;
readonly initializer?: ForInitializer;
readonly condition?: Expression;
readonly incrementor?: Expression;
}
type ForInOrOfStatement = ForInStatement | ForOfStatement;
interface ForInStatement extends IterationStatement {
interface ForInStatement extends IterationStatement, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ForInStatement;
readonly initializer: ForInitializer;
readonly expression: Expression;
}
interface ForOfStatement extends IterationStatement {
interface ForOfStatement extends IterationStatement, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ForOfStatement;
readonly awaitModifier?: AwaitKeyword;
readonly initializer: ForInitializer;
readonly expression: Expression;
}
interface BreakStatement extends Statement {
interface BreakStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.BreakStatement;
readonly label?: Identifier;
}
interface ContinueStatement extends Statement {
interface ContinueStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ContinueStatement;
readonly label?: Identifier;
}
type BreakOrContinueStatement = BreakStatement | ContinueStatement;
interface ReturnStatement extends Statement {
interface ReturnStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ReturnStatement;
readonly expression?: Expression;
}
interface WithStatement extends Statement {
interface WithStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.WithStatement;
readonly expression: Expression;
readonly statement: Statement;
}
interface SwitchStatement extends Statement {
interface SwitchStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.SwitchStatement;
readonly expression: Expression;
readonly caseBlock: CaseBlock;
possiblyExhaustive?: boolean;
}
interface CaseBlock extends Node {
interface CaseBlock extends Node, LocalsContainer {
readonly kind: SyntaxKind.CaseBlock;
readonly parent: SwitchStatement;
readonly clauses: NodeArray<CaseOrDefaultClause>;
@ -5512,22 +5504,22 @@ declare namespace ts {
readonly statements: NodeArray<Statement>;
}
type CaseOrDefaultClause = CaseClause | DefaultClause;
interface LabeledStatement extends Statement {
interface LabeledStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.LabeledStatement;
readonly label: Identifier;
readonly statement: Statement;
}
interface ThrowStatement extends Statement {
interface ThrowStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ThrowStatement;
readonly expression: Expression;
}
interface TryStatement extends Statement {
interface TryStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.TryStatement;
readonly tryBlock: Block;
readonly catchClause?: CatchClause;
readonly finallyBlock?: Block;
}
interface CatchClause extends Node {
interface CatchClause extends Node, LocalsContainer {
readonly kind: SyntaxKind.CatchClause;
readonly parent: TryStatement;
readonly variableDeclaration?: VariableDeclaration;
@ -5577,7 +5569,7 @@ declare namespace ts {
readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
readonly types: NodeArray<ExpressionWithTypeArguments>;
}
interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.TypeAliasDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name: Identifier;
@ -5598,7 +5590,7 @@ declare namespace ts {
}
type ModuleName = Identifier | StringLiteral;
type ModuleBody = NamespaceBody | JSDocNamespaceBody;
interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
interface ModuleDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.ModuleDeclaration;
readonly parent: ModuleBody | SourceFile;
readonly modifiers?: NodeArray<Modifier>;
@ -5814,7 +5806,7 @@ declare namespace ts {
readonly kind: SyntaxKind.JSDocOptionalType;
readonly type: TypeNode;
}
interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase, LocalsContainer {
readonly kind: SyntaxKind.JSDocFunctionType;
}
interface JSDocVariadicType extends JSDocType {
@ -5900,7 +5892,7 @@ declare namespace ts {
interface JSDocOverrideTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocOverrideTag;
}
interface JSDocEnumTag extends JSDocTag, Declaration {
interface JSDocEnumTag extends JSDocTag, Declaration, LocalsContainer {
readonly kind: SyntaxKind.JSDocEnumTag;
readonly parent: JSDoc;
readonly typeExpression: JSDocTypeExpression;
@ -5926,21 +5918,30 @@ declare namespace ts {
readonly kind: SyntaxKind.JSDocTypeTag;
readonly typeExpression: JSDocTypeExpression;
}
interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
interface JSDocTypedefTag extends JSDocTag, NamedDeclaration, LocalsContainer {
readonly kind: SyntaxKind.JSDocTypedefTag;
readonly parent: JSDoc;
readonly fullName?: JSDocNamespaceDeclaration | Identifier;
readonly name?: Identifier;
readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
}
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration, LocalsContainer {
readonly kind: SyntaxKind.JSDocCallbackTag;
readonly parent: JSDoc;
readonly fullName?: JSDocNamespaceDeclaration | Identifier;
readonly name?: Identifier;
readonly typeExpression: JSDocSignature;
}
interface JSDocSignature extends JSDocType, Declaration {
interface JSDocOverloadTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocOverloadTag;
readonly parent: JSDoc;
readonly typeExpression: JSDocSignature;
}
interface JSDocThrowsTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocThrowsTag;
readonly typeExpression?: JSDocTypeExpression;
}
interface JSDocSignature extends JSDocType, Declaration, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.JSDocSignature;
readonly typeParameters?: readonly JSDocTemplateTag[];
readonly parameters: readonly JSDocParameterTag[];
@ -5960,7 +5961,7 @@ declare namespace ts {
interface JSDocParameterTag extends JSDocPropertyLikeTag {
readonly kind: SyntaxKind.JSDocParameterTag;
}
interface JSDocTypeLiteral extends JSDocType {
interface JSDocTypeLiteral extends JSDocType, Declaration {
readonly kind: SyntaxKind.JSDocTypeLiteral;
readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
/** If true, then this type literal represents an *array* of its type. */
@ -6040,7 +6041,7 @@ declare namespace ts {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
interface SourceFile extends Declaration {
interface SourceFile extends Declaration, LocalsContainer {
readonly kind: SyntaxKind.SourceFile;
readonly statements: NodeArray<Statement>;
readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
@ -6961,9 +6962,10 @@ declare namespace ts {
}
enum ModuleResolutionKind {
Classic = 1,
NodeJs = 2,
Node10 = 2,
Node16 = 3,
NodeNext = 99
NodeNext = 99,
Bundler = 100
}
enum ModuleDetectionKind {
/**
@ -7014,7 +7016,9 @@ declare namespace ts {
}
type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
interface CompilerOptions {
allowImportingTsExtensions?: boolean;
allowJs?: boolean;
allowArbitraryExtensions?: boolean;
allowSyntheticDefaultImports?: boolean;
allowUmdGlobalAccess?: boolean;
allowUnreachableCode?: boolean;
@ -7023,6 +7027,7 @@ declare namespace ts {
baseUrl?: string;
charset?: string;
checkJs?: boolean;
customConditions?: string[];
declaration?: boolean;
declarationMap?: boolean;
emitDeclarationOnly?: boolean;
@ -7037,6 +7042,7 @@ declare namespace ts {
exactOptionalPropertyTypes?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
ignoreDeprecations?: string;
importHelpers?: boolean;
importsNotUsedAsValues?: ImportsNotUsedAsValues;
inlineSourceMap?: boolean;
@ -7087,6 +7093,8 @@ declare namespace ts {
incremental?: boolean;
tsBuildInfoFile?: string;
removeComments?: boolean;
resolvePackageJsonExports?: boolean;
resolvePackageJsonImports?: boolean;
rootDir?: string;
rootDirs?: string[];
skipLibCheck?: boolean;
@ -7258,6 +7266,11 @@ declare namespace ts {
resolvedFileName: string;
/** True if `resolvedFileName` comes from `node_modules`. */
isExternalLibraryImport?: boolean;
/**
* True if the original module reference used a .ts extension to refer directly to a .ts file,
* which should produce an error during checking if emit is enabled.
*/
resolvedUsingTsExtension?: boolean;
}
/**
* ResolvedModule with an explicitly provided `extension` property.
@ -7269,7 +7282,7 @@ declare namespace ts {
* Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
* This is optional for backwards-compatibility, but will be added if not provided.
*/
extension: Extension;
extension: string;
packageId?: PackageId;
}
/**
@ -7318,14 +7331,7 @@ declare namespace ts {
}
interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
readonly failedLookupLocations: string[];
}
interface ResolutionInfo<T> {
names: readonly T[];
reusedNames: readonly T[] | undefined;
}
type ModuleResolutionInfo = ResolutionInfo<StringLiteralLike>;
type TypeReferenceDirectiveResolutionInfo = ResolutionInfo<string | FileReference>;
interface CompilerHost extends ModuleResolutionHost {
getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
@ -7338,15 +7344,20 @@ declare namespace ts {
useCaseSensitiveFileNames(): boolean;
getNewLine(): string;
readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
/**
* Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
*/
getModuleResolutionCache?(): ModuleResolutionCache | undefined;
/**
* @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext
*
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
*/
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
getEnvironmentVariable?(name: string): string | undefined;
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
hasInvalidatedResolutions?(filePath: Path): boolean;
@ -7468,11 +7479,12 @@ declare namespace ts {
createToken(token: SyntaxKind.NullKeyword): NullLiteral;
createToken(token: SyntaxKind.TrueKeyword): TrueLiteral;
createToken(token: SyntaxKind.FalseKeyword): FalseLiteral;
createToken(token: SyntaxKind.EndOfFileToken): EndOfFileToken;
createToken(token: SyntaxKind.Unknown): Token<SyntaxKind.Unknown>;
createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>;
createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>;
createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>;
createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>;
createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>;
createSuper(): SuperExpression;
createThis(): ThisExpression;
createNull(): NullLiteral;
@ -7781,6 +7793,8 @@ declare namespace ts {
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
createJSDocOverloadTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, comment?: string | NodeArray<JSDocComment>): JSDocOverloadTag;
updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, comment: string | NodeArray<JSDocComment> | undefined): JSDocOverloadTag;
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
@ -7803,6 +7817,8 @@ declare namespace ts {
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment>): JSDocThrowsTag;
updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined): JSDocThrowsTag;
createJSDocText(text: string): JSDocText;
updateJSDocText(node: JSDocText, text: string): JSDocText;
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
@ -8373,6 +8389,7 @@ declare namespace ts {
readonly includeInlayEnumMemberValueHints?: boolean;
readonly allowRenameOfImportPath?: boolean;
readonly autoImportFileExcludePatterns?: string[];
readonly organizeImportsIgnoreCase?: "auto" | boolean;
}
/** Represents a bigint literal value without requiring bigint support */
interface PseudoBigInt {
@ -8538,7 +8555,7 @@ declare namespace ts {
resolvePath(path: string): string;
fileExists(fileName: string): boolean;
readFile(fileName: string): string | undefined;
}, errors?: Push<Diagnostic>): void;
}, errors?: Diagnostic[]): void;
function getOriginalNode(node: Node): Node;
function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
function getOriginalNode(node: Node | undefined): Node | undefined;
@ -8763,6 +8780,7 @@ declare namespace ts {
parent: ConstructorDeclaration;
name: Identifier;
};
function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
function createUnparsedSourceFile(text: string): UnparsedSource;
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
@ -9031,6 +9049,7 @@ declare namespace ts {
function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag;
function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag;
function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
function isJSDocSeeTag(node: Node): node is JSDocSeeTag;
function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
@ -9043,6 +9062,7 @@ declare namespace ts {
function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag;
function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
function canHaveModifiers(node: Node): node is HasModifiers;
function canHaveDecorators(node: Node): node is HasDecorators;
@ -9115,7 +9135,7 @@ declare namespace ts {
/**
* Convert the json syntax tree into the json value
*/
function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
function convertToObject(sourceFile: JsonSourceFile, errors: Diagnostic[]): any;
/**
* Parse the contents of a config file (tsconfig.json).
* @param json The contents of the config file to parse
@ -9164,7 +9184,7 @@ declare namespace ts {
/**
* Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
*/
extendedConfigPath?: string;
extendedConfigPath?: string | string[];
}
interface ExtendedConfigCacheEntry {
extendedResult: TsConfigSourceFile;
@ -9190,9 +9210,11 @@ declare namespace ts {
function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
function bundlerModuleNameResolver(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;
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
function shouldAllowImportingTsExtension(compilerOptions: CompilerOptions, fromFileName?: string): boolean | "" | undefined;
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, NonRelativeNameResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
}
interface ModeAwareCache<T> {
get(key: string, mode: ResolutionMode): T | undefined;
@ -9207,6 +9229,7 @@ declare namespace ts {
* This assumes that any module id will have the same resolution for sibling files located in the same folder.
*/
interface PerDirectoryResolutionCache<T> {
getFromDirectoryCache(name: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined;
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>;
clear(): void;
/**
@ -9215,6 +9238,20 @@ declare namespace ts {
*/
update(options: CompilerOptions): void;
}
interface NonRelativeNameResolutionCache<T> {
getFromNonRelativeNameCache(nonRelativeName: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined;
getOrCreateCacheForNonRelativeName(nonRelativeName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerNonRelativeNameCache<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;
}
interface PerNonRelativeNameCache<T> {
get(directory: string): T | undefined;
set(directory: string, result: T): void;
}
interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
getPackageJsonInfoCache(): PackageJsonInfoCache;
}
@ -9222,16 +9259,14 @@ declare namespace ts {
* 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 extends PackageJsonInfoCache {
interface NonRelativeModuleNameResolutionCache extends NonRelativeNameResolutionCache<ResolvedModuleWithFailedLookupLocations>, PackageJsonInfoCache {
/** @deprecated Use getOrCreateCacheForNonRelativeName */
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
}
interface PackageJsonInfoCache {
clear(): void;
}
interface PerModuleNameCache {
get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
}
type PerModuleNameCache = PerNonRelativeNameCache<ResolvedModuleWithFailedLookupLocations>;
/**
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
*
@ -9614,10 +9649,20 @@ declare namespace ts {
trace?(s: string): void;
/** If provided is used to get the environment variable */
getEnvironmentVariable?(name: string): string | undefined;
/** If provided, used to resolve the module names, otherwise typescript's default module resolution */
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
/** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
/**
* @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext
*
* If provided, used to resolve the module names, otherwise typescript's default module resolution
*/
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
/**
* @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext
*
* If provided, used to resolve type reference directives, otherwise typescript's default resolution
*/
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
hasInvalidatedResolutions?(filePath: Path): boolean;
/**
@ -9849,9 +9894,13 @@ declare namespace ts {
readFile(path: string, encoding?: string): string | undefined;
fileExists(path: string): boolean;
getTypeRootsVersion?(): number;
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
/** @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext */
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
getDirectories?(directoryName: string): string[];
/**
* Gets a set of custom transformers to use during emit.
@ -10029,6 +10078,7 @@ declare namespace ts {
toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[];
commentSelection(fileName: string, textRange: TextRange): TextChange[];
uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
getSupportedCodeFixes(fileName?: string): readonly string[];
dispose(): void;
}
interface JsxClosingTagInfo {
@ -11011,7 +11061,7 @@ declare namespace ts {
function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
function getDefaultCompilerOptions(): CompilerOptions;
function getSupportedCodeFixes(): string[];
function getSupportedCodeFixes(): readonly string[];
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

303
lib/typescript.d.ts поставляемый
Просмотреть файл

@ -31,21 +31,6 @@ declare namespace ts {
interface SortedArray<T> extends Array<T> {
" __sortedArrayBrand": any;
}
/** Common read methods for ES6 Map/Set. */
interface ReadonlyCollection<K> {
readonly size: number;
has(key: K): boolean;
keys(): Iterator<K>;
}
/** Common write methods for ES6 Map/Set. */
interface Collection<K> extends ReadonlyCollection<K> {
delete(key: K): boolean;
clear(): void;
}
/** Array that is only intended to be pushed to, never read. */
interface Push<T> {
push(...values: T[]): void;
}
type Path = string & {
__pathBrand: any;
};
@ -404,23 +389,25 @@ declare namespace ts {
JSDocReadonlyTag = 339,
JSDocOverrideTag = 340,
JSDocCallbackTag = 341,
JSDocEnumTag = 342,
JSDocParameterTag = 343,
JSDocReturnTag = 344,
JSDocThisTag = 345,
JSDocTypeTag = 346,
JSDocTemplateTag = 347,
JSDocTypedefTag = 348,
JSDocSeeTag = 349,
JSDocPropertyTag = 350,
SyntaxList = 351,
NotEmittedStatement = 352,
PartiallyEmittedExpression = 353,
CommaListExpression = 354,
MergeDeclarationMarker = 355,
EndOfDeclarationMarker = 356,
SyntheticReferenceExpression = 357,
Count = 358,
JSDocOverloadTag = 342,
JSDocEnumTag = 343,
JSDocParameterTag = 344,
JSDocReturnTag = 345,
JSDocThisTag = 346,
JSDocTypeTag = 347,
JSDocTemplateTag = 348,
JSDocTypedefTag = 349,
JSDocSeeTag = 350,
JSDocPropertyTag = 351,
JSDocThrowsTag = 352,
SyntaxList = 353,
NotEmittedStatement = 354,
PartiallyEmittedExpression = 355,
CommaListExpression = 356,
MergeDeclarationMarker = 357,
EndOfDeclarationMarker = 358,
SyntheticReferenceExpression = 359,
Count = 360,
FirstAssignment = 63,
LastAssignment = 78,
FirstCompoundAssignment = 64,
@ -449,9 +436,9 @@ declare namespace ts {
LastStatement = 256,
FirstNode = 163,
FirstJSDocNode = 312,
LastJSDocNode = 350,
LastJSDocNode = 352,
FirstJSDocTagNode = 330,
LastJSDocTagNode = 350
LastJSDocTagNode = 352
}
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@ -577,9 +564,16 @@ declare namespace ts {
*/
readonly modifiers?: NodeArray<ModifierLike> | undefined;
}
interface JSDocContainer {
interface JSDocContainer extends Node {
_jsdocContainerBrand: any;
}
type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | 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 | ExportSpecifier | CaseClause | EndOfFileToken;
interface LocalsContainer extends Node {
_localsContainerBrand: any;
}
interface FlowContainer extends Node {
_flowContainerBrand: any;
}
type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@ -611,6 +605,7 @@ declare namespace ts {
type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>;
type AssertKeyword = KeywordToken<SyntaxKind.AssertKeyword>;
type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>;
type CaseKeyword = KeywordToken<SyntaxKind.CaseKeyword>;
/** @deprecated Use `AwaitKeyword` instead. */
type AwaitKeywordToken = AwaitKeyword;
/** @deprecated Use `AssertsKeyword` instead. */
@ -647,7 +642,7 @@ declare namespace ts {
FileLevel = 32,
AllowNameSubstitution = 64
}
interface Identifier extends PrimaryExpression, Declaration {
interface Identifier extends PrimaryExpression, Declaration, JSDocContainer, FlowContainer {
readonly kind: SyntaxKind.Identifier;
/**
* Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
@ -663,7 +658,7 @@ declare namespace ts {
interface TransientIdentifier extends Identifier {
resolvedSymbol: Symbol;
}
interface QualifiedName extends Node {
interface QualifiedName extends Node, FlowContainer {
readonly kind: SyntaxKind.QualifiedName;
readonly left: EntityName;
readonly right: Identifier;
@ -698,7 +693,7 @@ declare namespace ts {
readonly parent: NamedDeclaration;
readonly expression: LeftHandSideExpression;
}
interface TypeParameterDeclaration extends NamedDeclaration {
interface TypeParameterDeclaration extends NamedDeclaration, JSDocContainer {
readonly kind: SyntaxKind.TypeParameter;
readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
readonly modifiers?: NodeArray<Modifier>;
@ -716,10 +711,10 @@ declare namespace ts {
readonly type?: TypeNode | undefined;
}
type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.CallSignature;
}
interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.ConstructSignature;
}
type BindingName = Identifier | BindingPattern;
@ -746,7 +741,7 @@ declare namespace ts {
readonly type?: TypeNode;
readonly initializer?: Expression;
}
interface BindingElement extends NamedDeclaration {
interface BindingElement extends NamedDeclaration, FlowContainer {
readonly kind: SyntaxKind.BindingElement;
readonly parent: BindingPattern;
readonly propertyName?: PropertyName;
@ -756,6 +751,7 @@ declare namespace ts {
}
interface PropertySignature extends TypeElement, JSDocContainer {
readonly kind: SyntaxKind.PropertySignature;
readonly parent: TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name: PropertyName;
readonly questionToken?: QuestionToken;
@ -817,9 +813,6 @@ declare namespace ts {
readonly expression: Expression;
}
type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
interface PropertyLikeDeclaration extends NamedDeclaration {
readonly name: PropertyName;
}
interface ObjectBindingPattern extends Node {
readonly kind: SyntaxKind.ObjectBindingPattern;
readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
@ -850,26 +843,26 @@ declare namespace ts {
type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
/** @deprecated Use SignatureDeclaration */
type FunctionLike = SignatureDeclaration;
interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement, LocalsContainer {
readonly kind: SyntaxKind.FunctionDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name?: Identifier;
readonly body?: FunctionBody;
}
interface MethodSignature extends SignatureDeclarationBase, TypeElement {
interface MethodSignature extends SignatureDeclarationBase, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.MethodSignature;
readonly parent: ObjectTypeDeclaration;
readonly parent: TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name: PropertyName;
}
interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.MethodDeclaration;
readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
readonly modifiers?: NodeArray<ModifierLike> | undefined;
readonly name: PropertyName;
readonly body?: FunctionBody | undefined;
}
interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.Constructor;
readonly parent: ClassLikeDeclaration;
readonly modifiers?: NodeArray<Modifier> | undefined;
@ -880,14 +873,14 @@ declare namespace ts {
readonly kind: SyntaxKind.SemicolonClassElement;
readonly parent: ClassLikeDeclaration;
}
interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.GetAccessor;
readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<ModifierLike>;
readonly name: PropertyName;
readonly body?: FunctionBody;
}
interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.SetAccessor;
readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
readonly modifiers?: NodeArray<ModifierLike>;
@ -895,13 +888,13 @@ declare namespace ts {
readonly body?: FunctionBody;
}
type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement, LocalsContainer {
readonly kind: SyntaxKind.IndexSignature;
readonly parent: ObjectTypeDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly type: TypeNode;
}
interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
readonly parent: ClassDeclaration | ClassExpression;
readonly body: Block;
@ -933,14 +926,14 @@ declare namespace ts {
readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
readonly type: TypeNode;
}
interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
readonly kind: SyntaxKind.FunctionType;
}
interface FunctionTypeNode {
/** @deprecated A function type cannot have modifiers */
readonly modifiers?: NodeArray<Modifier> | undefined;
}
interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
readonly kind: SyntaxKind.ConstructorType;
readonly modifiers?: NodeArray<Modifier>;
}
@ -975,7 +968,7 @@ declare namespace ts {
readonly kind: SyntaxKind.TupleType;
readonly elements: NodeArray<TypeNode | NamedTupleMember>;
}
interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration {
interface NamedTupleMember extends TypeNode, Declaration, JSDocContainer {
readonly kind: SyntaxKind.NamedTupleMember;
readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
readonly name: Identifier;
@ -999,7 +992,7 @@ declare namespace ts {
readonly kind: SyntaxKind.IntersectionType;
readonly types: NodeArray<TypeNode>;
}
interface ConditionalTypeNode extends TypeNode {
interface ConditionalTypeNode extends TypeNode, LocalsContainer {
readonly kind: SyntaxKind.ConditionalType;
readonly checkType: TypeNode;
readonly extendsType: TypeNode;
@ -1024,7 +1017,7 @@ declare namespace ts {
readonly objectType: TypeNode;
readonly indexType: TypeNode;
}
interface MappedTypeNode extends TypeNode, Declaration {
interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
readonly kind: SyntaxKind.MappedType;
readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
readonly typeParameter: TypeParameterDeclaration;
@ -1103,10 +1096,10 @@ declare namespace ts {
readonly kind: SyntaxKind.FalseKeyword;
}
type BooleanLiteral = TrueLiteral | FalseLiteral;
interface ThisExpression extends PrimaryExpression {
interface ThisExpression extends PrimaryExpression, FlowContainer {
readonly kind: SyntaxKind.ThisKeyword;
}
interface SuperExpression extends PrimaryExpression {
interface SuperExpression extends PrimaryExpression, FlowContainer {
readonly kind: SyntaxKind.SuperKeyword;
}
interface ImportExpression extends PrimaryExpression {
@ -1160,7 +1153,7 @@ declare namespace ts {
type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
type BinaryOperatorToken = Token<BinaryOperator>;
interface BinaryExpression extends Expression, Declaration {
interface BinaryExpression extends Expression, Declaration, JSDocContainer {
readonly kind: SyntaxKind.BinaryExpression;
readonly left: Expression;
readonly operatorToken: BinaryOperatorToken;
@ -1197,13 +1190,13 @@ declare namespace ts {
}
type FunctionBody = Block;
type ConciseBody = FunctionBody | Expression;
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.FunctionExpression;
readonly modifiers?: NodeArray<Modifier>;
readonly name?: Identifier;
readonly body: FunctionBody;
}
interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ArrowFunction;
readonly modifiers?: NodeArray<Modifier>;
readonly equalsGreaterThanToken: EqualsGreaterThanToken;
@ -1290,13 +1283,13 @@ declare namespace ts {
interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
readonly properties: NodeArray<T>;
}
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike>, JSDocContainer {
readonly kind: SyntaxKind.ObjectLiteralExpression;
}
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
interface PropertyAccessExpression extends MemberExpression, NamedDeclaration, JSDocContainer, FlowContainer {
readonly kind: SyntaxKind.PropertyAccessExpression;
readonly expression: LeftHandSideExpression;
readonly questionDotToken?: QuestionDotToken;
@ -1315,7 +1308,7 @@ declare namespace ts {
readonly expression: EntityNameExpression;
readonly name: Identifier;
}
interface ElementAccessExpression extends MemberExpression {
interface ElementAccessExpression extends MemberExpression, Declaration, JSDocContainer, FlowContainer {
readonly kind: SyntaxKind.ElementAccessExpression;
readonly expression: LeftHandSideExpression;
readonly questionDotToken?: QuestionDotToken;
@ -1385,7 +1378,7 @@ declare namespace ts {
interface NonNullChain extends NonNullExpression {
_optionalChainBrand: any;
}
interface MetaProperty extends PrimaryExpression {
interface MetaProperty extends PrimaryExpression, FlowContainer {
readonly kind: SyntaxKind.MetaProperty;
readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
readonly name: Identifier;
@ -1478,7 +1471,7 @@ declare namespace ts {
interface EmptyStatement extends Statement {
readonly kind: SyntaxKind.EmptyStatement;
}
interface DebuggerStatement extends Statement {
interface DebuggerStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.DebuggerStatement;
}
interface MissingDeclaration extends DeclarationStatement {
@ -1486,20 +1479,20 @@ declare namespace ts {
readonly name?: Identifier;
}
type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
interface Block extends Statement {
interface Block extends Statement, LocalsContainer {
readonly kind: SyntaxKind.Block;
readonly statements: NodeArray<Statement>;
}
interface VariableStatement extends Statement {
interface VariableStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.VariableStatement;
readonly modifiers?: NodeArray<Modifier>;
readonly declarationList: VariableDeclarationList;
}
interface ExpressionStatement extends Statement {
interface ExpressionStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ExpressionStatement;
readonly expression: Expression;
}
interface IfStatement extends Statement {
interface IfStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.IfStatement;
readonly expression: Expression;
readonly thenStatement: Statement;
@ -1508,58 +1501,58 @@ declare namespace ts {
interface IterationStatement extends Statement {
readonly statement: Statement;
}
interface DoStatement extends IterationStatement {
interface DoStatement extends IterationStatement, FlowContainer {
readonly kind: SyntaxKind.DoStatement;
readonly expression: Expression;
}
interface WhileStatement extends IterationStatement {
interface WhileStatement extends IterationStatement, FlowContainer {
readonly kind: SyntaxKind.WhileStatement;
readonly expression: Expression;
}
type ForInitializer = VariableDeclarationList | Expression;
interface ForStatement extends IterationStatement {
interface ForStatement extends IterationStatement, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ForStatement;
readonly initializer?: ForInitializer;
readonly condition?: Expression;
readonly incrementor?: Expression;
}
type ForInOrOfStatement = ForInStatement | ForOfStatement;
interface ForInStatement extends IterationStatement {
interface ForInStatement extends IterationStatement, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ForInStatement;
readonly initializer: ForInitializer;
readonly expression: Expression;
}
interface ForOfStatement extends IterationStatement {
interface ForOfStatement extends IterationStatement, LocalsContainer, FlowContainer {
readonly kind: SyntaxKind.ForOfStatement;
readonly awaitModifier?: AwaitKeyword;
readonly initializer: ForInitializer;
readonly expression: Expression;
}
interface BreakStatement extends Statement {
interface BreakStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.BreakStatement;
readonly label?: Identifier;
}
interface ContinueStatement extends Statement {
interface ContinueStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ContinueStatement;
readonly label?: Identifier;
}
type BreakOrContinueStatement = BreakStatement | ContinueStatement;
interface ReturnStatement extends Statement {
interface ReturnStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ReturnStatement;
readonly expression?: Expression;
}
interface WithStatement extends Statement {
interface WithStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.WithStatement;
readonly expression: Expression;
readonly statement: Statement;
}
interface SwitchStatement extends Statement {
interface SwitchStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.SwitchStatement;
readonly expression: Expression;
readonly caseBlock: CaseBlock;
possiblyExhaustive?: boolean;
}
interface CaseBlock extends Node {
interface CaseBlock extends Node, LocalsContainer {
readonly kind: SyntaxKind.CaseBlock;
readonly parent: SwitchStatement;
readonly clauses: NodeArray<CaseOrDefaultClause>;
@ -1576,22 +1569,22 @@ declare namespace ts {
readonly statements: NodeArray<Statement>;
}
type CaseOrDefaultClause = CaseClause | DefaultClause;
interface LabeledStatement extends Statement {
interface LabeledStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.LabeledStatement;
readonly label: Identifier;
readonly statement: Statement;
}
interface ThrowStatement extends Statement {
interface ThrowStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.ThrowStatement;
readonly expression: Expression;
}
interface TryStatement extends Statement {
interface TryStatement extends Statement, FlowContainer {
readonly kind: SyntaxKind.TryStatement;
readonly tryBlock: Block;
readonly catchClause?: CatchClause;
readonly finallyBlock?: Block;
}
interface CatchClause extends Node {
interface CatchClause extends Node, LocalsContainer {
readonly kind: SyntaxKind.CatchClause;
readonly parent: TryStatement;
readonly variableDeclaration?: VariableDeclaration;
@ -1641,7 +1634,7 @@ declare namespace ts {
readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
readonly types: NodeArray<ExpressionWithTypeArguments>;
}
interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.TypeAliasDeclaration;
readonly modifiers?: NodeArray<Modifier>;
readonly name: Identifier;
@ -1662,7 +1655,7 @@ declare namespace ts {
}
type ModuleName = Identifier | StringLiteral;
type ModuleBody = NamespaceBody | JSDocNamespaceBody;
interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
interface ModuleDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.ModuleDeclaration;
readonly parent: ModuleBody | SourceFile;
readonly modifiers?: NodeArray<Modifier>;
@ -1878,7 +1871,7 @@ declare namespace ts {
readonly kind: SyntaxKind.JSDocOptionalType;
readonly type: TypeNode;
}
interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase, LocalsContainer {
readonly kind: SyntaxKind.JSDocFunctionType;
}
interface JSDocVariadicType extends JSDocType {
@ -1964,7 +1957,7 @@ declare namespace ts {
interface JSDocOverrideTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocOverrideTag;
}
interface JSDocEnumTag extends JSDocTag, Declaration {
interface JSDocEnumTag extends JSDocTag, Declaration, LocalsContainer {
readonly kind: SyntaxKind.JSDocEnumTag;
readonly parent: JSDoc;
readonly typeExpression: JSDocTypeExpression;
@ -1990,21 +1983,30 @@ declare namespace ts {
readonly kind: SyntaxKind.JSDocTypeTag;
readonly typeExpression: JSDocTypeExpression;
}
interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
interface JSDocTypedefTag extends JSDocTag, NamedDeclaration, LocalsContainer {
readonly kind: SyntaxKind.JSDocTypedefTag;
readonly parent: JSDoc;
readonly fullName?: JSDocNamespaceDeclaration | Identifier;
readonly name?: Identifier;
readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
}
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration, LocalsContainer {
readonly kind: SyntaxKind.JSDocCallbackTag;
readonly parent: JSDoc;
readonly fullName?: JSDocNamespaceDeclaration | Identifier;
readonly name?: Identifier;
readonly typeExpression: JSDocSignature;
}
interface JSDocSignature extends JSDocType, Declaration {
interface JSDocOverloadTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocOverloadTag;
readonly parent: JSDoc;
readonly typeExpression: JSDocSignature;
}
interface JSDocThrowsTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocThrowsTag;
readonly typeExpression?: JSDocTypeExpression;
}
interface JSDocSignature extends JSDocType, Declaration, JSDocContainer, LocalsContainer {
readonly kind: SyntaxKind.JSDocSignature;
readonly typeParameters?: readonly JSDocTemplateTag[];
readonly parameters: readonly JSDocParameterTag[];
@ -2024,7 +2026,7 @@ declare namespace ts {
interface JSDocParameterTag extends JSDocPropertyLikeTag {
readonly kind: SyntaxKind.JSDocParameterTag;
}
interface JSDocTypeLiteral extends JSDocType {
interface JSDocTypeLiteral extends JSDocType, Declaration {
readonly kind: SyntaxKind.JSDocTypeLiteral;
readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
/** If true, then this type literal represents an *array* of its type. */
@ -2104,7 +2106,7 @@ declare namespace ts {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
interface SourceFile extends Declaration {
interface SourceFile extends Declaration, LocalsContainer {
readonly kind: SyntaxKind.SourceFile;
readonly statements: NodeArray<Statement>;
readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
@ -3025,9 +3027,10 @@ declare namespace ts {
}
enum ModuleResolutionKind {
Classic = 1,
NodeJs = 2,
Node10 = 2,
Node16 = 3,
NodeNext = 99
NodeNext = 99,
Bundler = 100
}
enum ModuleDetectionKind {
/**
@ -3078,7 +3081,9 @@ declare namespace ts {
}
type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
interface CompilerOptions {
allowImportingTsExtensions?: boolean;
allowJs?: boolean;
allowArbitraryExtensions?: boolean;
allowSyntheticDefaultImports?: boolean;
allowUmdGlobalAccess?: boolean;
allowUnreachableCode?: boolean;
@ -3087,6 +3092,7 @@ declare namespace ts {
baseUrl?: string;
charset?: string;
checkJs?: boolean;
customConditions?: string[];
declaration?: boolean;
declarationMap?: boolean;
emitDeclarationOnly?: boolean;
@ -3101,6 +3107,7 @@ declare namespace ts {
exactOptionalPropertyTypes?: boolean;
experimentalDecorators?: boolean;
forceConsistentCasingInFileNames?: boolean;
ignoreDeprecations?: string;
importHelpers?: boolean;
importsNotUsedAsValues?: ImportsNotUsedAsValues;
inlineSourceMap?: boolean;
@ -3151,6 +3158,8 @@ declare namespace ts {
incremental?: boolean;
tsBuildInfoFile?: string;
removeComments?: boolean;
resolvePackageJsonExports?: boolean;
resolvePackageJsonImports?: boolean;
rootDir?: string;
rootDirs?: string[];
skipLibCheck?: boolean;
@ -3322,6 +3331,11 @@ declare namespace ts {
resolvedFileName: string;
/** True if `resolvedFileName` comes from `node_modules`. */
isExternalLibraryImport?: boolean;
/**
* True if the original module reference used a .ts extension to refer directly to a .ts file,
* which should produce an error during checking if emit is enabled.
*/
resolvedUsingTsExtension?: boolean;
}
/**
* ResolvedModule with an explicitly provided `extension` property.
@ -3333,7 +3347,7 @@ declare namespace ts {
* Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
* This is optional for backwards-compatibility, but will be added if not provided.
*/
extension: Extension;
extension: string;
packageId?: PackageId;
}
/**
@ -3382,14 +3396,7 @@ declare namespace ts {
}
interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
readonly failedLookupLocations: string[];
}
interface ResolutionInfo<T> {
names: readonly T[];
reusedNames: readonly T[] | undefined;
}
type ModuleResolutionInfo = ResolutionInfo<StringLiteralLike>;
type TypeReferenceDirectiveResolutionInfo = ResolutionInfo<string | FileReference>;
interface CompilerHost extends ModuleResolutionHost {
getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
@ -3402,15 +3409,20 @@ declare namespace ts {
useCaseSensitiveFileNames(): boolean;
getNewLine(): string;
readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
/**
* Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
*/
getModuleResolutionCache?(): ModuleResolutionCache | undefined;
/**
* @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext
*
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
*/
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
getEnvironmentVariable?(name: string): string | undefined;
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
hasInvalidatedResolutions?(filePath: Path): boolean;
@ -3532,11 +3544,12 @@ declare namespace ts {
createToken(token: SyntaxKind.NullKeyword): NullLiteral;
createToken(token: SyntaxKind.TrueKeyword): TrueLiteral;
createToken(token: SyntaxKind.FalseKeyword): FalseLiteral;
createToken(token: SyntaxKind.EndOfFileToken): EndOfFileToken;
createToken(token: SyntaxKind.Unknown): Token<SyntaxKind.Unknown>;
createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>;
createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>;
createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>;
createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>;
createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>;
createSuper(): SuperExpression;
createThis(): ThisExpression;
createNull(): NullLiteral;
@ -3845,6 +3858,8 @@ declare namespace ts {
updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
createJSDocOverloadTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, comment?: string | NodeArray<JSDocComment>): JSDocOverloadTag;
updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, comment: string | NodeArray<JSDocComment> | undefined): JSDocOverloadTag;
createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
@ -3867,6 +3882,8 @@ declare namespace ts {
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment>): JSDocThrowsTag;
updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined): JSDocThrowsTag;
createJSDocText(text: string): JSDocText;
updateJSDocText(node: JSDocText, text: string): JSDocText;
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
@ -4437,6 +4454,7 @@ declare namespace ts {
readonly includeInlayEnumMemberValueHints?: boolean;
readonly allowRenameOfImportPath?: boolean;
readonly autoImportFileExcludePatterns?: string[];
readonly organizeImportsIgnoreCase?: "auto" | boolean;
}
/** Represents a bigint literal value without requiring bigint support */
interface PseudoBigInt {
@ -4602,7 +4620,7 @@ declare namespace ts {
resolvePath(path: string): string;
fileExists(fileName: string): boolean;
readFile(fileName: string): string | undefined;
}, errors?: Push<Diagnostic>): void;
}, errors?: Diagnostic[]): void;
function getOriginalNode(node: Node): Node;
function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
function getOriginalNode(node: Node | undefined): Node | undefined;
@ -4827,6 +4845,7 @@ declare namespace ts {
parent: ConstructorDeclaration;
name: Identifier;
};
function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
function createUnparsedSourceFile(text: string): UnparsedSource;
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
@ -5095,6 +5114,7 @@ declare namespace ts {
function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag;
function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag;
function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
function isJSDocSeeTag(node: Node): node is JSDocSeeTag;
function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
@ -5107,6 +5127,7 @@ declare namespace ts {
function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag;
function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
function canHaveModifiers(node: Node): node is HasModifiers;
function canHaveDecorators(node: Node): node is HasDecorators;
@ -5179,7 +5200,7 @@ declare namespace ts {
/**
* Convert the json syntax tree into the json value
*/
function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
function convertToObject(sourceFile: JsonSourceFile, errors: Diagnostic[]): any;
/**
* Parse the contents of a config file (tsconfig.json).
* @param json The contents of the config file to parse
@ -5228,7 +5249,7 @@ declare namespace ts {
/**
* Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
*/
extendedConfigPath?: string;
extendedConfigPath?: string | string[];
}
interface ExtendedConfigCacheEntry {
extendedResult: TsConfigSourceFile;
@ -5254,9 +5275,11 @@ declare namespace ts {
function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
function bundlerModuleNameResolver(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;
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
function shouldAllowImportingTsExtension(compilerOptions: CompilerOptions, fromFileName?: string): boolean | "" | undefined;
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, NonRelativeNameResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
}
interface ModeAwareCache<T> {
get(key: string, mode: ResolutionMode): T | undefined;
@ -5271,6 +5294,7 @@ declare namespace ts {
* This assumes that any module id will have the same resolution for sibling files located in the same folder.
*/
interface PerDirectoryResolutionCache<T> {
getFromDirectoryCache(name: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined;
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>;
clear(): void;
/**
@ -5279,6 +5303,20 @@ declare namespace ts {
*/
update(options: CompilerOptions): void;
}
interface NonRelativeNameResolutionCache<T> {
getFromNonRelativeNameCache(nonRelativeName: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined;
getOrCreateCacheForNonRelativeName(nonRelativeName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerNonRelativeNameCache<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;
}
interface PerNonRelativeNameCache<T> {
get(directory: string): T | undefined;
set(directory: string, result: T): void;
}
interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
getPackageJsonInfoCache(): PackageJsonInfoCache;
}
@ -5286,16 +5324,14 @@ declare namespace ts {
* 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 extends PackageJsonInfoCache {
interface NonRelativeModuleNameResolutionCache extends NonRelativeNameResolutionCache<ResolvedModuleWithFailedLookupLocations>, PackageJsonInfoCache {
/** @deprecated Use getOrCreateCacheForNonRelativeName */
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
}
interface PackageJsonInfoCache {
clear(): void;
}
interface PerModuleNameCache {
get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
}
type PerModuleNameCache = PerNonRelativeNameCache<ResolvedModuleWithFailedLookupLocations>;
/**
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
*
@ -5678,10 +5714,20 @@ declare namespace ts {
trace?(s: string): void;
/** If provided is used to get the environment variable */
getEnvironmentVariable?(name: string): string | undefined;
/** If provided, used to resolve the module names, otherwise typescript's default module resolution */
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
/** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
/**
* @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext
*
* If provided, used to resolve the module names, otherwise typescript's default module resolution
*/
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
/**
* @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext
*
* If provided, used to resolve type reference directives, otherwise typescript's default resolution
*/
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
hasInvalidatedResolutions?(filePath: Path): boolean;
/**
@ -5986,9 +6032,13 @@ declare namespace ts {
readFile(path: string, encoding?: string): string | undefined;
fileExists(path: string): boolean;
getTypeRootsVersion?(): number;
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
/** @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext */
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
getDirectories?(directoryName: string): string[];
/**
* Gets a set of custom transformers to use during emit.
@ -6166,6 +6216,7 @@ declare namespace ts {
toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[];
commentSelection(fileName: string, textRange: TextRange): TextChange[];
uncommentSelection(fileName: string, textRange: TextRange): TextChange[];
getSupportedCodeFixes(fileName?: string): readonly string[];
dispose(): void;
}
interface JsxClosingTagInfo {
@ -7148,7 +7199,7 @@ declare namespace ts {
function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
function getDefaultCompilerOptions(): CompilerOptions;
function getSupportedCodeFixes(): string[];
function getSupportedCodeFixes(): readonly string[];
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -30,6 +30,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));

14
package-lock.json сгенерированный
Просмотреть файл

@ -51,7 +51,7 @@
"ms": "^2.1.3",
"node-fetch": "^3.2.10",
"source-map-support": "latest",
"typescript": "^4.8.4",
"typescript": "5.0.0-dev.20230112",
"which": "^2.0.2"
},
"engines": {
@ -4375,9 +4375,9 @@
}
},
"node_modules/typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"version": "5.0.0-dev.20230112",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.0-dev.20230112.tgz",
"integrity": "sha512-cO+lTlZiNKqZIkjDOZWjh4WtFz8Jba/Ut4nvjcguXGgHoEnHD3+LSmgJjotPcWxALJZyvpd4EuAd5D3H9XF8Ig==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@ -7675,9 +7675,9 @@
}
},
"typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"version": "5.0.0-dev.20230112",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.0-dev.20230112.tgz",
"integrity": "sha512-cO+lTlZiNKqZIkjDOZWjh4WtFz8Jba/Ut4nvjcguXGgHoEnHD3+LSmgJjotPcWxALJZyvpd4EuAd5D3H9XF8Ig==",
"dev": true
},
"typical": {

Просмотреть файл

@ -77,9 +77,12 @@
"ms": "^2.1.3",
"node-fetch": "^3.2.10",
"source-map-support": "latest",
"typescript": "^4.8.4",
"typescript": "5.0.0-dev.20230112",
"which": "^2.0.2"
},
"overrides": {
"typescript@*": "$typescript"
},
"scripts": {
"test": "hereby runtests-parallel --light=false",
"test:eslint-rules": "hereby run-eslint-rules-tests",

Просмотреть файл

@ -390,7 +390,6 @@ import {
ImportSpecifier,
ImportTypeAssertionContainer,
ImportTypeNode,
IncompleteType,
IndexedAccessType,
IndexedAccessTypeNode,
IndexInfo,
@ -25560,7 +25559,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
function getTypeFromFlowType(flowType: FlowType) {
return flowType.flags === 0 ? (flowType as IncompleteType).type : flowType as Type;
return flowType.flags === 0 ? flowType.type : flowType as Type;
}
function createFlowType(type: Type, incomplete: boolean): FlowType {