summaryrefslogtreecommitdiff
path: root/cli/dts/typescript.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/typescript.d.ts')
-rw-r--r--cli/dts/typescript.d.ts45
1 files changed, 29 insertions, 16 deletions
diff --git a/cli/dts/typescript.d.ts b/cli/dts/typescript.d.ts
index 1885ae339..0c1763205 100644
--- a/cli/dts/typescript.d.ts
+++ b/cli/dts/typescript.d.ts
@@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */
declare namespace ts {
- const versionMajorMinor = "4.5";
+ const versionMajorMinor = "4.6";
/** The version of the TypeScript compiler release */
const version: string;
/**
@@ -572,7 +572,7 @@ declare namespace ts {
}
export interface JSDocContainer {
}
- export 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 | EndOfFileToken;
+ export 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 | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -897,7 +897,7 @@ declare namespace ts {
export interface TypePredicateNode extends TypeNode {
readonly kind: SyntaxKind.TypePredicate;
readonly parent: SignatureDeclaration | JSDocTypeExpression;
- readonly assertsModifier?: AssertsToken;
+ readonly assertsModifier?: AssertsKeyword;
readonly parameterName: Identifier | ThisTypeNode;
readonly type?: TypeNode;
}
@@ -968,7 +968,7 @@ declare namespace ts {
}
export interface MappedTypeNode extends TypeNode, Declaration {
readonly kind: SyntaxKind.MappedType;
- readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
+ readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
readonly typeParameter: TypeParameterDeclaration;
readonly nameType?: TypeNode;
readonly questionToken?: QuestionToken | PlusToken | MinusToken;
@@ -1465,7 +1465,7 @@ declare namespace ts {
}
export interface ForOfStatement extends IterationStatement {
readonly kind: SyntaxKind.ForOfStatement;
- readonly awaitModifier?: AwaitKeywordToken;
+ readonly awaitModifier?: AwaitKeyword;
readonly initializer: ForInitializer;
readonly expression: Expression;
}
@@ -1652,7 +1652,7 @@ declare namespace ts {
readonly kind: SyntaxKind.AssertEntry;
readonly parent: AssertClause;
readonly name: AssertionKey;
- readonly value: StringLiteral;
+ readonly value: Expression;
}
export interface AssertClause extends Node {
readonly kind: SyntaxKind.AssertClause;
@@ -1702,7 +1702,7 @@ declare namespace ts {
readonly name: Identifier;
readonly isTypeOnly: boolean;
}
- export interface ExportSpecifier extends NamedDeclaration {
+ export interface ExportSpecifier extends NamedDeclaration, JSDocContainer {
readonly kind: SyntaxKind.ExportSpecifier;
readonly parent: NamedExports;
readonly isTypeOnly: boolean;
@@ -1720,19 +1720,23 @@ declare namespace ts {
readonly parent: ImportClause & {
readonly isTypeOnly: true;
};
- } | ImportSpecifier & {
+ } | ImportSpecifier & ({
+ readonly isTypeOnly: true;
+ } | {
readonly parent: NamedImports & {
readonly parent: ImportClause & {
readonly isTypeOnly: true;
};
};
- } | ExportSpecifier & {
+ }) | ExportSpecifier & ({
+ readonly isTypeOnly: true;
+ } | {
readonly parent: NamedExports & {
readonly parent: ExportDeclaration & {
readonly isTypeOnly: true;
};
};
- };
+ });
/**
* This is either an `export =` or an `export default` declaration.
* Unless `isExportEquals` is set, this node was parsed as an `export default`.
@@ -3078,6 +3082,7 @@ declare namespace ts {
ES2019 = 6,
ES2020 = 7,
ES2021 = 8,
+ ES2022 = 9,
ESNext = 99,
JSON = 100,
Latest = 99
@@ -3343,7 +3348,7 @@ declare namespace ts {
createTrue(): TrueLiteral;
createFalse(): FalseLiteral;
createModifier<T extends ModifierSyntaxKind>(kind: T): ModifierToken<T>;
- createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[];
+ createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined;
createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
createComputedPropertyName(expression: Expression): ComputedPropertyName;
@@ -3575,8 +3580,8 @@ declare namespace ts {
updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
createAssertClause(elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
updateAssertClause(node: AssertClause, elements: NodeArray<AssertEntry>, multiLine?: boolean): AssertClause;
- createAssertEntry(name: AssertionKey, value: StringLiteral): AssertEntry;
- updateAssertEntry(node: AssertEntry, name: AssertionKey, value: StringLiteral): AssertEntry;
+ createAssertEntry(name: AssertionKey, value: Expression): AssertEntry;
+ updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry;
createNamespaceImport(name: Identifier): NamespaceImport;
updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
createNamespaceExport(name: Identifier): NamespaceExport;
@@ -5351,7 +5356,11 @@ declare namespace ts {
traceResolution?: boolean;
[option: string]: CompilerOptionsValue | undefined;
}
- type ReportEmitErrorSummary = (errorCount: number) => void;
+ type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void;
+ interface ReportFileInError {
+ fileName: string;
+ line: number;
+ }
interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
createDirectory?(path: string): void;
/**
@@ -5559,6 +5568,7 @@ declare namespace ts {
isTypeParameter(): this is TypeParameter;
isClassOrInterface(): this is InterfaceType;
isClass(): this is InterfaceType;
+ isIndexType(): this is IndexType;
}
interface TypeReference {
typeArguments?: readonly Type[];
@@ -5567,6 +5577,7 @@ declare namespace ts {
getDeclaration(): SignatureDeclaration;
getTypeParameters(): TypeParameter[] | undefined;
getParameters(): Symbol[];
+ getTypeParameterAtPosition(pos: number): Type;
getReturnType(): Type;
getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
getJsDocTags(): JSDocTagInfo[];
@@ -5753,8 +5764,9 @@ declare namespace ts {
* @param position A zero-based index of the character where you want the entries
* @param options An object describing how the request was triggered and what kinds
* of code actions can be returned with the completions.
+ * @param formattingSettings settings needed for calling formatting functions.
*/
- getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined): WithMetadata<CompletionInfo> | undefined;
+ getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata<CompletionInfo> | undefined;
/**
* Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
*
@@ -6586,6 +6598,7 @@ declare namespace ts {
externalModuleName = "external module name",
/**
* <JsxTagName attribute1 attribute2={0} />
+ * @deprecated
*/
jsxAttribute = "JSX attribute",
/** String literal */
@@ -6855,7 +6868,7 @@ declare namespace ts {
/** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */
const createModifier: <T extends ModifierSyntaxKind>(kind: T) => ModifierToken<T>;
/** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */
- const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[];
+ const createModifiersFromModifierFlags: (flags: ModifierFlags) => Modifier[] | undefined;
/** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */
const createQualifiedName: (left: EntityName, right: string | Identifier) => QualifiedName;
/** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */