Adopt TS 2.8.1

pull/2748/head
Alex Dima 7 years ago
parent 887aa9faa1
commit 3efd3be6db

8
package-lock.json generated

@ -138,7 +138,7 @@
"integrity": "sha512-7kUx8dtd5qVNVgUARBRhnM8oftPglYwlINfigC4yGUiuzqtIN22u1tly8umiOCIPR0eFiBLjt6aN23oZh2QJgg==", "integrity": "sha512-7kUx8dtd5qVNVgUARBRhnM8oftPglYwlINfigC4yGUiuzqtIN22u1tly8umiOCIPR0eFiBLjt6aN23oZh2QJgg==",
"dev": true, "dev": true,
"requires": { "requires": {
"typescript": "2.7.2" "typescript": "2.8.1"
} }
}, },
"ms": { "ms": {
@ -178,9 +178,9 @@
"dev": true "dev": true
}, },
"typescript": { "typescript": {
"version": "2.7.2", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.1.tgz",
"integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "integrity": "sha512-Ao/f6d/4EPLq0YwzsQz8iXflezpTkQzqAyenTiw4kCUGr1uPiFLC3+fZ+gMZz6eeI/qdRUqvC+HxIJzUAzEFdg==",
"dev": true "dev": true
}, },
"uglify-js": { "uglify-js": {

@ -25,7 +25,7 @@
"monaco-editor-core": "0.12.0", "monaco-editor-core": "0.12.0",
"monaco-plugin-helpers": "^1.0.2", "monaco-plugin-helpers": "^1.0.2",
"requirejs": "^2.3.5", "requirejs": "^2.3.5",
"typescript": "2.7.2", "typescript": "2.8.1",
"uglify-js": "^3.3.14" "uglify-js": "^3.3.14"
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -187,177 +187,180 @@ declare namespace ts {
ConstructorKeyword = 123, ConstructorKeyword = 123,
DeclareKeyword = 124, DeclareKeyword = 124,
GetKeyword = 125, GetKeyword = 125,
IsKeyword = 126, InferKeyword = 126,
KeyOfKeyword = 127, IsKeyword = 127,
ModuleKeyword = 128, KeyOfKeyword = 128,
NamespaceKeyword = 129, ModuleKeyword = 129,
NeverKeyword = 130, NamespaceKeyword = 130,
ReadonlyKeyword = 131, NeverKeyword = 131,
RequireKeyword = 132, ReadonlyKeyword = 132,
NumberKeyword = 133, RequireKeyword = 133,
ObjectKeyword = 134, NumberKeyword = 134,
SetKeyword = 135, ObjectKeyword = 135,
StringKeyword = 136, SetKeyword = 136,
SymbolKeyword = 137, StringKeyword = 137,
TypeKeyword = 138, SymbolKeyword = 138,
UndefinedKeyword = 139, TypeKeyword = 139,
UniqueKeyword = 140, UndefinedKeyword = 140,
FromKeyword = 141, UniqueKeyword = 141,
GlobalKeyword = 142, FromKeyword = 142,
OfKeyword = 143, GlobalKeyword = 143,
QualifiedName = 144, OfKeyword = 144,
ComputedPropertyName = 145, QualifiedName = 145,
TypeParameter = 146, ComputedPropertyName = 146,
Parameter = 147, TypeParameter = 147,
Decorator = 148, Parameter = 148,
PropertySignature = 149, Decorator = 149,
PropertyDeclaration = 150, PropertySignature = 150,
MethodSignature = 151, PropertyDeclaration = 151,
MethodDeclaration = 152, MethodSignature = 152,
Constructor = 153, MethodDeclaration = 153,
GetAccessor = 154, Constructor = 154,
SetAccessor = 155, GetAccessor = 155,
CallSignature = 156, SetAccessor = 156,
ConstructSignature = 157, CallSignature = 157,
IndexSignature = 158, ConstructSignature = 158,
TypePredicate = 159, IndexSignature = 159,
TypeReference = 160, TypePredicate = 160,
FunctionType = 161, TypeReference = 161,
ConstructorType = 162, FunctionType = 162,
TypeQuery = 163, ConstructorType = 163,
TypeLiteral = 164, TypeQuery = 164,
ArrayType = 165, TypeLiteral = 165,
TupleType = 166, ArrayType = 166,
UnionType = 167, TupleType = 167,
IntersectionType = 168, UnionType = 168,
ParenthesizedType = 169, IntersectionType = 169,
ThisType = 170, ConditionalType = 170,
TypeOperator = 171, InferType = 171,
IndexedAccessType = 172, ParenthesizedType = 172,
MappedType = 173, ThisType = 173,
LiteralType = 174, TypeOperator = 174,
ObjectBindingPattern = 175, IndexedAccessType = 175,
ArrayBindingPattern = 176, MappedType = 176,
BindingElement = 177, LiteralType = 177,
ArrayLiteralExpression = 178, ObjectBindingPattern = 178,
ObjectLiteralExpression = 179, ArrayBindingPattern = 179,
PropertyAccessExpression = 180, BindingElement = 180,
ElementAccessExpression = 181, ArrayLiteralExpression = 181,
CallExpression = 182, ObjectLiteralExpression = 182,
NewExpression = 183, PropertyAccessExpression = 183,
TaggedTemplateExpression = 184, ElementAccessExpression = 184,
TypeAssertionExpression = 185, CallExpression = 185,
ParenthesizedExpression = 186, NewExpression = 186,
FunctionExpression = 187, TaggedTemplateExpression = 187,
ArrowFunction = 188, TypeAssertionExpression = 188,
DeleteExpression = 189, ParenthesizedExpression = 189,
TypeOfExpression = 190, FunctionExpression = 190,
VoidExpression = 191, ArrowFunction = 191,
AwaitExpression = 192, DeleteExpression = 192,
PrefixUnaryExpression = 193, TypeOfExpression = 193,
PostfixUnaryExpression = 194, VoidExpression = 194,
BinaryExpression = 195, AwaitExpression = 195,
ConditionalExpression = 196, PrefixUnaryExpression = 196,
TemplateExpression = 197, PostfixUnaryExpression = 197,
YieldExpression = 198, BinaryExpression = 198,
SpreadElement = 199, ConditionalExpression = 199,
ClassExpression = 200, TemplateExpression = 200,
OmittedExpression = 201, YieldExpression = 201,
ExpressionWithTypeArguments = 202, SpreadElement = 202,
AsExpression = 203, ClassExpression = 203,
NonNullExpression = 204, OmittedExpression = 204,
MetaProperty = 205, ExpressionWithTypeArguments = 205,
TemplateSpan = 206, AsExpression = 206,
SemicolonClassElement = 207, NonNullExpression = 207,
Block = 208, MetaProperty = 208,
VariableStatement = 209, TemplateSpan = 209,
EmptyStatement = 210, SemicolonClassElement = 210,
ExpressionStatement = 211, Block = 211,
IfStatement = 212, VariableStatement = 212,
DoStatement = 213, EmptyStatement = 213,
WhileStatement = 214, ExpressionStatement = 214,
ForStatement = 215, IfStatement = 215,
ForInStatement = 216, DoStatement = 216,
ForOfStatement = 217, WhileStatement = 217,
ContinueStatement = 218, ForStatement = 218,
BreakStatement = 219, ForInStatement = 219,
ReturnStatement = 220, ForOfStatement = 220,
WithStatement = 221, ContinueStatement = 221,
SwitchStatement = 222, BreakStatement = 222,
LabeledStatement = 223, ReturnStatement = 223,
ThrowStatement = 224, WithStatement = 224,
TryStatement = 225, SwitchStatement = 225,
DebuggerStatement = 226, LabeledStatement = 226,
VariableDeclaration = 227, ThrowStatement = 227,
VariableDeclarationList = 228, TryStatement = 228,
FunctionDeclaration = 229, DebuggerStatement = 229,
ClassDeclaration = 230, VariableDeclaration = 230,
InterfaceDeclaration = 231, VariableDeclarationList = 231,
TypeAliasDeclaration = 232, FunctionDeclaration = 232,
EnumDeclaration = 233, ClassDeclaration = 233,
ModuleDeclaration = 234, InterfaceDeclaration = 234,
ModuleBlock = 235, TypeAliasDeclaration = 235,
CaseBlock = 236, EnumDeclaration = 236,
NamespaceExportDeclaration = 237, ModuleDeclaration = 237,
ImportEqualsDeclaration = 238, ModuleBlock = 238,
ImportDeclaration = 239, CaseBlock = 239,
ImportClause = 240, NamespaceExportDeclaration = 240,
NamespaceImport = 241, ImportEqualsDeclaration = 241,
NamedImports = 242, ImportDeclaration = 242,
ImportSpecifier = 243, ImportClause = 243,
ExportAssignment = 244, NamespaceImport = 244,
ExportDeclaration = 245, NamedImports = 245,
NamedExports = 246, ImportSpecifier = 246,
ExportSpecifier = 247, ExportAssignment = 247,
MissingDeclaration = 248, ExportDeclaration = 248,
ExternalModuleReference = 249, NamedExports = 249,
JsxElement = 250, ExportSpecifier = 250,
JsxSelfClosingElement = 251, MissingDeclaration = 251,
JsxOpeningElement = 252, ExternalModuleReference = 252,
JsxClosingElement = 253, JsxElement = 253,
JsxFragment = 254, JsxSelfClosingElement = 254,
JsxOpeningFragment = 255, JsxOpeningElement = 255,
JsxClosingFragment = 256, JsxClosingElement = 256,
JsxAttribute = 257, JsxFragment = 257,
JsxAttributes = 258, JsxOpeningFragment = 258,
JsxSpreadAttribute = 259, JsxClosingFragment = 259,
JsxExpression = 260, JsxAttribute = 260,
CaseClause = 261, JsxAttributes = 261,
DefaultClause = 262, JsxSpreadAttribute = 262,
HeritageClause = 263, JsxExpression = 263,
CatchClause = 264, CaseClause = 264,
PropertyAssignment = 265, DefaultClause = 265,
ShorthandPropertyAssignment = 266, HeritageClause = 266,
SpreadAssignment = 267, CatchClause = 267,
EnumMember = 268, PropertyAssignment = 268,
SourceFile = 269, ShorthandPropertyAssignment = 269,
Bundle = 270, SpreadAssignment = 270,
JSDocTypeExpression = 271, EnumMember = 271,
JSDocAllType = 272, SourceFile = 272,
JSDocUnknownType = 273, Bundle = 273,
JSDocNullableType = 274, JSDocTypeExpression = 274,
JSDocNonNullableType = 275, JSDocAllType = 275,
JSDocOptionalType = 276, JSDocUnknownType = 276,
JSDocFunctionType = 277, JSDocNullableType = 277,
JSDocVariadicType = 278, JSDocNonNullableType = 278,
JSDocComment = 279, JSDocOptionalType = 279,
JSDocTypeLiteral = 280, JSDocFunctionType = 280,
JSDocTag = 281, JSDocVariadicType = 281,
JSDocAugmentsTag = 282, JSDocComment = 282,
JSDocClassTag = 283, JSDocTypeLiteral = 283,
JSDocParameterTag = 284, JSDocTag = 284,
JSDocReturnTag = 285, JSDocAugmentsTag = 285,
JSDocTypeTag = 286, JSDocClassTag = 286,
JSDocTemplateTag = 287, JSDocParameterTag = 287,
JSDocTypedefTag = 288, JSDocReturnTag = 288,
JSDocPropertyTag = 289, JSDocTypeTag = 289,
SyntaxList = 290, JSDocTemplateTag = 290,
NotEmittedStatement = 291, JSDocTypedefTag = 291,
PartiallyEmittedExpression = 292, JSDocPropertyTag = 292,
CommaListExpression = 293, SyntaxList = 293,
MergeDeclarationMarker = 294, NotEmittedStatement = 294,
EndOfDeclarationMarker = 295, PartiallyEmittedExpression = 295,
Count = 296, CommaListExpression = 296,
MergeDeclarationMarker = 297,
EndOfDeclarationMarker = 298,
Count = 299,
FirstAssignment = 58, FirstAssignment = 58,
LastAssignment = 70, LastAssignment = 70,
FirstCompoundAssignment = 59, FirstCompoundAssignment = 59,
@ -365,15 +368,15 @@ declare namespace ts {
FirstReservedWord = 72, FirstReservedWord = 72,
LastReservedWord = 107, LastReservedWord = 107,
FirstKeyword = 72, FirstKeyword = 72,
LastKeyword = 143, LastKeyword = 144,
FirstFutureReservedWord = 108, FirstFutureReservedWord = 108,
LastFutureReservedWord = 116, LastFutureReservedWord = 116,
FirstTypeNode = 159, FirstTypeNode = 160,
LastTypeNode = 174, LastTypeNode = 177,
FirstPunctuation = 17, FirstPunctuation = 17,
LastPunctuation = 70, LastPunctuation = 70,
FirstToken = 0, FirstToken = 0,
LastToken = 143, LastToken = 144,
FirstTriviaToken = 2, FirstTriviaToken = 2,
LastTriviaToken = 7, LastTriviaToken = 7,
FirstLiteralToken = 8, FirstLiteralToken = 8,
@ -382,11 +385,11 @@ declare namespace ts {
LastTemplateToken = 16, LastTemplateToken = 16,
FirstBinaryOperator = 27, FirstBinaryOperator = 27,
LastBinaryOperator = 70, LastBinaryOperator = 70,
FirstNode = 144, FirstNode = 145,
FirstJSDocNode = 271, FirstJSDocNode = 274,
LastJSDocNode = 289, LastJSDocNode = 292,
FirstJSDocTagNode = 281, FirstJSDocTagNode = 284,
LastJSDocTagNode = 289, LastJSDocTagNode = 292,
} }
enum NodeFlags { enum NodeFlags {
None = 0, None = 0,
@ -474,6 +477,8 @@ declare namespace ts {
type AtToken = Token<SyntaxKind.AtToken>; type AtToken = Token<SyntaxKind.AtToken>;
type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>; type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>;
type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>; type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>;
type PlusToken = Token<SyntaxKind.PlusToken>;
type MinusToken = Token<SyntaxKind.MinusToken>;
type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>; type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>;
type ModifiersArray = NodeArray<Modifier>; type ModifiersArray = NodeArray<Modifier>;
interface Identifier extends PrimaryExpression, Declaration { interface Identifier extends PrimaryExpression, Declaration {
@ -517,7 +522,7 @@ declare namespace ts {
} }
interface TypeParameterDeclaration extends NamedDeclaration { interface TypeParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.TypeParameter; kind: SyntaxKind.TypeParameter;
parent?: DeclarationWithTypeParameters; parent?: DeclarationWithTypeParameters | InferTypeNode;
name: Identifier; name: Identifier;
constraint?: TypeNode; constraint?: TypeNode;
default?: TypeNode; default?: TypeNode;
@ -639,7 +644,8 @@ declare namespace ts {
body?: Block | Expression; body?: Block | Expression;
} }
type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | FunctionExpression | ArrowFunction; type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | FunctionExpression | ArrowFunction;
type FunctionLike = FunctionLikeDeclaration | FunctionTypeNode | ConstructorTypeNode | IndexSignatureDeclaration | MethodSignature | ConstructSignatureDeclaration | CallSignatureDeclaration | JSDocFunctionType; /** @deprecated Use SignatureDeclaration */
type FunctionLike = SignatureDeclaration;
interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement { interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
kind: SyntaxKind.FunctionDeclaration; kind: SyntaxKind.FunctionDeclaration;
name?: Identifier; name?: Identifier;
@ -647,10 +653,12 @@ declare namespace ts {
} }
interface MethodSignature extends SignatureDeclarationBase, TypeElement { interface MethodSignature extends SignatureDeclarationBase, TypeElement {
kind: SyntaxKind.MethodSignature; kind: SyntaxKind.MethodSignature;
parent?: ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
name: PropertyName; name: PropertyName;
} }
interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
kind: SyntaxKind.MethodDeclaration; kind: SyntaxKind.MethodDeclaration;
parent?: ClassLikeDeclaration | ObjectLiteralExpression;
name: PropertyName; name: PropertyName;
body?: FunctionBody; body?: FunctionBody;
} }
@ -734,6 +742,17 @@ declare namespace ts {
kind: SyntaxKind.IntersectionType; kind: SyntaxKind.IntersectionType;
types: NodeArray<TypeNode>; types: NodeArray<TypeNode>;
} }
interface ConditionalTypeNode extends TypeNode {
kind: SyntaxKind.ConditionalType;
checkType: TypeNode;
extendsType: TypeNode;
trueType: TypeNode;
falseType: TypeNode;
}
interface InferTypeNode extends TypeNode {
kind: SyntaxKind.InferType;
typeParameter: TypeParameterDeclaration;
}
interface ParenthesizedTypeNode extends TypeNode { interface ParenthesizedTypeNode extends TypeNode {
kind: SyntaxKind.ParenthesizedType; kind: SyntaxKind.ParenthesizedType;
type: TypeNode; type: TypeNode;
@ -750,9 +769,9 @@ declare namespace ts {
} }
interface MappedTypeNode extends TypeNode, Declaration { interface MappedTypeNode extends TypeNode, Declaration {
kind: SyntaxKind.MappedType; kind: SyntaxKind.MappedType;
readonlyToken?: ReadonlyToken; readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
typeParameter: TypeParameterDeclaration; typeParameter: TypeParameterDeclaration;
questionToken?: QuestionToken; questionToken?: QuestionToken | PlusToken | MinusToken;
type?: TypeNode; type?: TypeNode;
} }
interface LiteralTypeNode extends TypeNode { interface LiteralTypeNode extends TypeNode {
@ -762,6 +781,7 @@ declare namespace ts {
interface StringLiteral extends LiteralExpression { interface StringLiteral extends LiteralExpression {
kind: SyntaxKind.StringLiteral; kind: SyntaxKind.StringLiteral;
} }
type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
interface Expression extends Node { interface Expression extends Node {
_expressionBrand: any; _expressionBrand: any;
} }
@ -969,7 +989,7 @@ declare namespace ts {
interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> { interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
kind: SyntaxKind.ObjectLiteralExpression; kind: SyntaxKind.ObjectLiteralExpression;
} }
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression; type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
interface PropertyAccessExpression extends MemberExpression, NamedDeclaration { interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
kind: SyntaxKind.PropertyAccessExpression; kind: SyntaxKind.PropertyAccessExpression;
@ -1252,6 +1272,7 @@ declare namespace ts {
} }
interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement {
kind: SyntaxKind.ClassDeclaration; kind: SyntaxKind.ClassDeclaration;
/** May be undefined in `export default class { ... }`. */
name?: Identifier; name?: Identifier;
} }
interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression {
@ -1392,6 +1413,10 @@ declare namespace ts {
name: Identifier; name: Identifier;
} }
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
/**
* This is either an `export =` or an `export default` declaration.
* Unless `isExportEquals` is set, this node was parsed as an `export default`.
*/
interface ExportAssignment extends DeclarationStatement { interface ExportAssignment extends DeclarationStatement {
kind: SyntaxKind.ExportAssignment; kind: SyntaxKind.ExportAssignment;
parent?: SourceFile; parent?: SourceFile;
@ -1726,19 +1751,21 @@ declare namespace ts {
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode; typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): SignatureDeclaration; signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): SignatureDeclaration & {
typeArguments?: NodeArray<TypeNode>;
} | undefined;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): IndexSignatureDeclaration; indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): IndexSignatureDeclaration | undefined;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): EntityName; symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): EntityName | undefined;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Expression; symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Expression | undefined;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): NodeArray<TypeParameterDeclaration> | undefined; symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): NodeArray<TypeParameterDeclaration> | undefined;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): ParameterDeclaration; symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): ParameterDeclaration | undefined;
/** Note that the resulting nodes cannot be checked. */ /** Note that the resulting nodes cannot be checked. */
typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeParameterDeclaration; typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeParameterDeclaration | undefined;
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol | undefined; getSymbolAtLocation(node: Node): Symbol | undefined;
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
@ -1775,7 +1802,7 @@ declare namespace ts {
*/ */
getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature;
getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
isImplementationOfOverload(node: FunctionLike): boolean | undefined; isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
isUndefinedSymbol(symbol: Symbol): boolean; isUndefinedSymbol(symbol: Symbol): boolean;
isArgumentsSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean;
isUnknownSymbol(symbol: Symbol): boolean; isUnknownSymbol(symbol: Symbol): boolean;
@ -1785,7 +1812,7 @@ declare namespace ts {
getAliasedSymbol(symbol: Symbol): Symbol; getAliasedSymbol(symbol: Symbol): Symbol;
getExportsOfModule(moduleSymbol: Symbol): Symbol[]; getExportsOfModule(moduleSymbol: Symbol): Symbol[];
getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type | undefined; getAllAttributesTypeFromJsxOpeningLikeElement(elementNode: JsxOpeningLikeElement): Type | undefined;
getJsxIntrinsicTagNames(): Symbol[]; getJsxIntrinsicTagNamesAt(location: Node): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean; isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[]; getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined; tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
@ -1821,6 +1848,7 @@ declare namespace ts {
InObjectTypeLiteral = 4194304, InObjectTypeLiteral = 4194304,
InTypeAlias = 8388608, InTypeAlias = 8388608,
InInitialEntityName = 16777216, InInitialEntityName = 16777216,
InReverseMappedType = 33554432,
} }
enum TypeFormatFlags { enum TypeFormatFlags {
None = 0, None = 0,
@ -1933,28 +1961,28 @@ declare namespace ts {
JSContainer = 67108864, JSContainer = 67108864,
Enum = 384, Enum = 384,
Variable = 3, Variable = 3,
Value = 107455, Value = 67216319,
Type = 793064, Type = 67901928,
Namespace = 1920, Namespace = 1920,
Module = 1536, Module = 1536,
Accessor = 98304, Accessor = 98304,
FunctionScopedVariableExcludes = 107454, FunctionScopedVariableExcludes = 67216318,
BlockScopedVariableExcludes = 107455, BlockScopedVariableExcludes = 67216319,
ParameterExcludes = 107455, ParameterExcludes = 67216319,
PropertyExcludes = 0, PropertyExcludes = 0,
EnumMemberExcludes = 900095, EnumMemberExcludes = 68008959,
FunctionExcludes = 106927, FunctionExcludes = 67215791,
ClassExcludes = 899519, ClassExcludes = 68008383,
InterfaceExcludes = 792968, InterfaceExcludes = 67901832,
RegularEnumExcludes = 899327, RegularEnumExcludes = 68008191,
ConstEnumExcludes = 899967, ConstEnumExcludes = 68008831,
ValueModuleExcludes = 106639, ValueModuleExcludes = 67215503,
NamespaceModuleExcludes = 0, NamespaceModuleExcludes = 0,
MethodExcludes = 99263, MethodExcludes = 67208127,
GetAccessorExcludes = 41919, GetAccessorExcludes = 67150783,
SetAccessorExcludes = 74687, SetAccessorExcludes = 67183551,
TypeParameterExcludes = 530920, TypeParameterExcludes = 67639784,
TypeAliasExcludes = 793064, TypeAliasExcludes = 67901928,
AliasExcludes = 2097152, AliasExcludes = 2097152,
ModuleMember = 2623475, ModuleMember = 2623475,
ExportHasLocal = 944, ExportHasLocal = 944,
@ -2044,8 +2072,9 @@ declare namespace ts {
Intersection = 262144, Intersection = 262144,
Index = 524288, Index = 524288,
IndexedAccess = 1048576, IndexedAccess = 1048576,
NonPrimitive = 33554432, Conditional = 2097152,
MarkerType = 134217728, Substitution = 4194304,
NonPrimitive = 134217728,
Literal = 224, Literal = 224,
Unit = 13536, Unit = 13536,
StringOrNumberLiteral = 96, StringOrNumberLiteral = 96,
@ -2057,10 +2086,13 @@ declare namespace ts {
ESSymbolLike = 1536, ESSymbolLike = 1536,
UnionOrIntersection = 393216, UnionOrIntersection = 393216,
StructuredType = 458752, StructuredType = 458752,
StructuredOrTypeVariable = 2064384,
TypeVariable = 1081344, TypeVariable = 1081344,
Narrowable = 35620607, InstantiableNonPrimitive = 7372800,
NotUnionOrUnit = 33620481, InstantiablePrimitive = 524288,
Instantiable = 7897088,
StructuredOrInstantiable = 8355840,
Narrowable = 142575359,
NotUnionOrUnit = 134283777,
} }
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type { interface Type {
@ -2099,6 +2131,8 @@ declare namespace ts {
ObjectLiteralPatternWithComputedProperties = 512, ObjectLiteralPatternWithComputedProperties = 512,
ContainsSpread = 1024, ContainsSpread = 1024,
ReverseMapped = 2048, ReverseMapped = 2048,
JsxAttributes = 4096,
MarkerType = 8192,
ClassOrInterface = 3, ClassOrInterface = 3,
} }
interface ObjectType extends Type { interface ObjectType extends Type {
@ -2147,17 +2181,42 @@ declare namespace ts {
elementType: Type; elementType: Type;
finalArrayType?: Type; finalArrayType?: Type;
} }
interface TypeVariable extends Type { interface InstantiableType extends Type {
} }
interface TypeParameter extends TypeVariable { interface TypeParameter extends InstantiableType {
} }
interface IndexedAccessType extends TypeVariable { interface IndexedAccessType extends InstantiableType {
objectType: Type; objectType: Type;
indexType: Type; indexType: Type;
constraint?: Type; constraint?: Type;
} }
interface IndexType extends Type { type TypeVariable = TypeParameter | IndexedAccessType;
type: TypeVariable | UnionOrIntersectionType; interface IndexType extends InstantiableType {
type: InstantiableType | UnionOrIntersectionType;
}
interface ConditionalRoot {
node: ConditionalTypeNode;
checkType: Type;
extendsType: Type;
trueType: Type;
falseType: Type;
isDistributive: boolean;
inferTypeParameters: TypeParameter[];
outerTypeParameters?: TypeParameter[];
instantiations?: Map<Type>;
aliasSymbol: Symbol;
aliasTypeArguments: Type[];
}
interface ConditionalType extends InstantiableType {
root: ConditionalRoot;
checkType: Type;
extendsType: Type;
resolvedTrueType?: Type;
resolvedFalseType?: Type;
}
interface SubstitutionType extends InstantiableType {
typeVariable: TypeVariable;
substitute: Type;
} }
enum SignatureKind { enum SignatureKind {
Call = 0, Call = 0,
@ -2179,39 +2238,14 @@ declare namespace ts {
} }
enum InferencePriority { enum InferencePriority {
NakedTypeVariable = 1, NakedTypeVariable = 1,
MappedType = 2, HomomorphicMappedType = 2,
ReturnType = 4, MappedTypeConstraint = 4,
} ReturnType = 8,
interface InferenceInfo { LiteralKeyof = 16,
typeParameter: TypeParameter; NoConstraints = 32,
candidates: Type[]; AlwaysStrict = 64,
contraCandidates: Type[]; PriorityImpliesCombination = 28,
inferredType: Type;
priority: InferencePriority;
topLevel: boolean;
isFixed: boolean;
}
enum InferenceFlags {
None = 0,
InferUnionTypes = 1,
NoDefault = 2,
AnyDefault = 4,
} }
/**
* Ternary values are defined such that
* x & y is False if either x or y is False.
* x & y is Maybe if either x or y is Maybe, but neither x or y is False.
* x & y is True if both x and y are True.
* x | y is False if both x and y are False.
* x | y is Maybe if either x or y is Maybe, but neither x or y is True.
* x | y is True if either x or y is True.
*/
enum Ternary {
False = 0,
Maybe = 1,
True = -1,
}
type TypeComparer = (s: Type, t: Type, reportErrors?: boolean) => Ternary;
interface JsFileExtensionInfo { interface JsFileExtensionInfo {
extension: string; extension: string;
isMixedContent: boolean; isMixedContent: boolean;
@ -2247,7 +2281,8 @@ declare namespace ts {
enum DiagnosticCategory { enum DiagnosticCategory {
Warning = 0, Warning = 0,
Error = 1, Error = 1,
Message = 2, Suggestion = 2,
Message = 3,
} }
enum ModuleResolutionKind { enum ModuleResolutionKind {
Classic = 1, Classic = 1,
@ -2338,15 +2373,6 @@ declare namespace ts {
exclude?: string[]; exclude?: string[];
[option: string]: string[] | boolean | undefined; [option: string]: string[] | boolean | undefined;
} }
interface DiscoverTypingsInfo {
fileNames: string[];
projectRootPath: string;
safeListPath: string;
packageNameToTypingLocation: Map<string>;
typeAcquisition: TypeAcquisition;
compilerOptions: CompilerOptions;
unresolvedImports: ReadonlyArray<string>;
}
enum ModuleKind { enum ModuleKind {
None = 0, None = 0,
CommonJS = 1, CommonJS = 1,
@ -2726,6 +2752,7 @@ declare namespace ts {
newLine?: NewLineKind; newLine?: NewLineKind;
omitTrailingSemicolon?: boolean; omitTrailingSemicolon?: boolean;
} }
/** @deprecated See comment on SymbolWriter */
interface SymbolTracker { interface SymbolTracker {
trackSymbol?(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; trackSymbol?(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError?(): void; reportInaccessibleThisError?(): void;
@ -2740,6 +2767,9 @@ declare namespace ts {
span: TextSpan; span: TextSpan;
newLength: number; newLength: number;
} }
interface SortedArray<T> extends Array<T> {
" __sortedArrayBrand": any;
}
interface SyntaxList extends Node { interface SyntaxList extends Node {
_children: Node[]; _children: Node[];
} }
@ -2810,12 +2840,13 @@ declare namespace ts {
} }
} }
declare namespace ts { declare namespace ts {
const versionMajorMinor = "2.7"; const versionMajorMinor = "2.8";
/** The version of the TypeScript compiler release */ /** The version of the TypeScript compiler release */
const version: string; const version: string;
} }
declare namespace ts { declare namespace ts {
function isExternalModuleNameRelative(moduleName: string): boolean; function isExternalModuleNameRelative(moduleName: string): boolean;
function sortAndDeduplicateDiagnostics(diagnostics: ReadonlyArray<Diagnostic>): Diagnostic[];
} }
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any; declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void; declare function clearTimeout(handle: any): void;
@ -2827,11 +2858,6 @@ declare namespace ts {
} }
type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void; type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void;
type DirectoryWatcherCallback = (fileName: string) => void; type DirectoryWatcherCallback = (fileName: string) => void;
interface WatchedFile {
fileName: string;
callback: FileWatcherCallback;
mtime?: Date;
}
interface System { interface System {
args: string[]; args: string[];
newLine: string; newLine: string;
@ -3103,6 +3129,8 @@ declare namespace ts {
function isTupleTypeNode(node: Node): node is TupleTypeNode; function isTupleTypeNode(node: Node): node is TupleTypeNode;
function isUnionTypeNode(node: Node): node is UnionTypeNode; function isUnionTypeNode(node: Node): node is UnionTypeNode;
function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
function isInferTypeNode(node: Node): node is InferTypeNode;
function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
function isThisTypeNode(node: Node): node is ThisTypeNode; function isThisTypeNode(node: Node): node is ThisTypeNode;
function isTypeOperatorNode(node: Node): node is TypeOperatorNode; function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
@ -3231,6 +3259,7 @@ declare namespace ts {
/** /**
* True if node is of some token syntax kind. * True if node is of some token syntax kind.
* For example, this is true for an IfKeyword but not for an IfStatement. * For example, this is true for an IfKeyword but not for an IfStatement.
* Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
*/ */
function isToken(n: Node): boolean; function isToken(n: Node): boolean;
function isLiteralExpression(node: Node): node is LiteralExpression; function isLiteralExpression(node: Node): node is LiteralExpression;
@ -3240,7 +3269,7 @@ declare namespace ts {
function isEntityName(node: Node): node is EntityName; function isEntityName(node: Node): node is EntityName;
function isPropertyName(node: Node): node is PropertyName; function isPropertyName(node: Node): node is PropertyName;
function isBindingName(node: Node): node is BindingName; function isBindingName(node: Node): node is BindingName;
function isFunctionLike(node: Node): node is FunctionLike; function isFunctionLike(node: Node): node is SignatureDeclaration;
function isClassElement(node: Node): node is ClassElement; function isClassElement(node: Node): node is ClassElement;
function isClassLike(node: Node): node is ClassLikeDeclaration; function isClassLike(node: Node): node is ClassLikeDeclaration;
function isAccessor(node: Node): node is AccessorDeclaration; function isAccessor(node: Node): node is AccessorDeclaration;
@ -3258,7 +3287,8 @@ declare namespace ts {
function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression; function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
function isTemplateLiteral(node: Node): node is TemplateLiteral; function isTemplateLiteral(node: Node): node is TemplateLiteral;
function isAssertionExpression(node: Node): node is AssertionExpression; function isAssertionExpression(node: Node): node is AssertionExpression;
function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement; function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement;
function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement;
function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
/** True if node is of a kind that may contain comment text. */ /** True if node is of a kind that may contain comment text. */
@ -3266,6 +3296,7 @@ declare namespace ts {
function isSetAccessor(node: Node): node is SetAccessorDeclaration; function isSetAccessor(node: Node): node is SetAccessorDeclaration;
function isGetAccessor(node: Node): node is GetAccessorDeclaration; function isGetAccessor(node: Node): node is GetAccessorDeclaration;
function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
function isStringLiteralLike(node: Node): node is StringLiteralLike;
} }
declare namespace ts { declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@ -3374,8 +3405,8 @@ declare namespace ts {
function updateDecorator(node: Decorator, expression: Expression): Decorator; function updateDecorator(node: Decorator, expression: Expression): Decorator;
function createPropertySignature(modifiers: ReadonlyArray<Modifier> | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature; function createPropertySignature(modifiers: ReadonlyArray<Modifier> | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
function updatePropertySignature(node: PropertySignature, modifiers: ReadonlyArray<Modifier> | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature; function updatePropertySignature(node: PropertySignature, modifiers: ReadonlyArray<Modifier> | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
function createProperty(decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; function createProperty(decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
function updateProperty(node: PropertyDeclaration, decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; function updateProperty(node: PropertyDeclaration, decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
function createMethodSignature(typeParameters: ReadonlyArray<TypeParameterDeclaration> | undefined, parameters: ReadonlyArray<ParameterDeclaration>, type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature; function createMethodSignature(typeParameters: ReadonlyArray<TypeParameterDeclaration> | undefined, parameters: ReadonlyArray<ParameterDeclaration>, type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature; function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
function createMethod(decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: ReadonlyArray<TypeParameterDeclaration> | undefined, parameters: ReadonlyArray<ParameterDeclaration>, type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; function createMethod(decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: ReadonlyArray<TypeParameterDeclaration> | undefined, parameters: ReadonlyArray<ParameterDeclaration>, type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
@ -3414,6 +3445,10 @@ declare namespace ts {
function createIntersectionTypeNode(types: TypeNode[]): IntersectionTypeNode; function createIntersectionTypeNode(types: TypeNode[]): IntersectionTypeNode;
function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode; function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: ReadonlyArray<TypeNode>): UnionOrIntersectionTypeNode; function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: ReadonlyArray<TypeNode>): UnionOrIntersectionTypeNode;
function createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
function createThisTypeNode(): ThisTypeNode; function createThisTypeNode(): ThisTypeNode;
@ -3422,8 +3457,8 @@ declare namespace ts {
function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
function createMappedTypeNode(readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode; function createMappedTypeNode(readonlyToken: ReadonlyToken | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | undefined, type: TypeNode | undefined): MappedTypeNode; function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyToken | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
function createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; function createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
function updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; function updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode;
function createObjectBindingPattern(elements: ReadonlyArray<BindingElement>): ObjectBindingPattern; function createObjectBindingPattern(elements: ReadonlyArray<BindingElement>): ObjectBindingPattern;
@ -4288,6 +4323,7 @@ declare namespace ts {
cleanupSemanticCache(): void; cleanupSemanticCache(): void;
getSyntacticDiagnostics(fileName: string): Diagnostic[]; getSyntacticDiagnostics(fileName: string): Diagnostic[];
getSemanticDiagnostics(fileName: string): Diagnostic[]; getSemanticDiagnostics(fileName: string): Diagnostic[];
getSuggestionDiagnostics(fileName: string): Diagnostic[];
getCompilerOptionsDiagnostics(): Diagnostic[]; getCompilerOptionsDiagnostics(): Diagnostic[];
/** /**
* @deprecated Use getEncodedSyntacticClassifications instead. * @deprecated Use getEncodedSyntacticClassifications instead.
@ -4343,6 +4379,7 @@ declare namespace ts {
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>; applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange): ApplicableRefactorInfo[]; getApplicableRefactors(fileName: string, positionOrRaneg: number | TextRange): ApplicableRefactorInfo[];
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string): RefactorEditInfo | undefined; getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string): RefactorEditInfo | undefined;
organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings): ReadonlyArray<FileTextChanges>;
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput; getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
getProgram(): Program; getProgram(): Program;
dispose(): void; dispose(): void;
@ -4351,6 +4388,7 @@ declare namespace ts {
type: "file"; type: "file";
fileName: string; fileName: string;
} }
type OrganizeImportsScope = CombinedCodeFixScope;
interface GetCompletionsAtPositionOptions { interface GetCompletionsAtPositionOptions {
includeExternalModuleExports: boolean; includeExternalModuleExports: boolean;
includeInsertTextCompletions: boolean; includeInsertTextCompletions: boolean;
@ -4696,6 +4734,7 @@ declare namespace ts {
argumentCount: number; argumentCount: number;
} }
interface CompletionInfo { interface CompletionInfo {
/** Not true for all glboal completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
isGlobalCompletion: boolean; isGlobalCompletion: boolean;
isMemberCompletion: boolean; isMemberCompletion: boolean;
/** /**

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save