Upgrade to typescript 4.1.3

pull/2748/head
Alexandru Dima 4 years ago
parent fb9583ffd7
commit eaa07c08dd
No known key found for this signature in database
GPG Key ID: 6E58D7B045760DA0

6
package-lock.json generated

@ -732,9 +732,9 @@
} }
}, },
"typescript": { "typescript": {
"version": "4.0.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true "dev": true
}, },
"which": { "which": {

@ -32,7 +32,7 @@
"pretty-quick": "^3.0.2", "pretty-quick": "^3.0.2",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",
"terser": "^5.3.2", "terser": "^5.3.2",
"typescript": "^4.0.3" "typescript": "^4.1.3"
}, },
"husky": { "husky": {
"hooks": { "hooks": {

@ -50,6 +50,7 @@ libFileSet['lib.es2020.d.ts'] = true;
libFileSet['lib.es2020.full.d.ts'] = true; libFileSet['lib.es2020.full.d.ts'] = true;
libFileSet['lib.es2020.intl.d.ts'] = true; libFileSet['lib.es2020.intl.d.ts'] = true;
libFileSet['lib.es2020.promise.d.ts'] = true; libFileSet['lib.es2020.promise.d.ts'] = true;
libFileSet['lib.es2020.sharedmemory.d.ts'] = true;
libFileSet['lib.es2020.string.d.ts'] = true; libFileSet['lib.es2020.string.d.ts'] = true;
libFileSet['lib.es2020.symbol.wellknown.d.ts'] = true; libFileSet['lib.es2020.symbol.wellknown.d.ts'] = true;
libFileSet['lib.es5.d.ts'] = true; libFileSet['lib.es5.d.ts'] = true;
@ -59,6 +60,8 @@ libFileSet['lib.esnext.full.d.ts'] = true;
libFileSet['lib.esnext.intl.d.ts'] = true; libFileSet['lib.esnext.intl.d.ts'] = true;
libFileSet['lib.esnext.promise.d.ts'] = true; libFileSet['lib.esnext.promise.d.ts'] = true;
libFileSet['lib.esnext.string.d.ts'] = true; libFileSet['lib.esnext.string.d.ts'] = true;
libFileSet['lib.esnext.weakref.d.ts'] = true;
libFileSet['lib.scripthost.d.ts'] = true; libFileSet['lib.scripthost.d.ts'] = true;
libFileSet['lib.webworker.d.ts'] = true; libFileSet['lib.webworker.d.ts'] = true;
libFileSet['lib.webworker.importscripts.d.ts'] = true; libFileSet['lib.webworker.importscripts.d.ts'] = true;
libFileSet['lib.webworker.iterable.d.ts'] = true;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
declare namespace ts { declare namespace ts {
const versionMajorMinor = "4.0"; const versionMajorMinor = "4.1";
/** The version of the TypeScript compiler release */ /** The version of the TypeScript compiler release */
const version: string; const version: string;
/** /**
@ -243,207 +243,212 @@ declare namespace ts {
DeclareKeyword = 133, DeclareKeyword = 133,
GetKeyword = 134, GetKeyword = 134,
InferKeyword = 135, InferKeyword = 135,
IsKeyword = 136, IntrinsicKeyword = 136,
KeyOfKeyword = 137, IsKeyword = 137,
ModuleKeyword = 138, KeyOfKeyword = 138,
NamespaceKeyword = 139, ModuleKeyword = 139,
NeverKeyword = 140, NamespaceKeyword = 140,
ReadonlyKeyword = 141, NeverKeyword = 141,
RequireKeyword = 142, ReadonlyKeyword = 142,
NumberKeyword = 143, RequireKeyword = 143,
ObjectKeyword = 144, NumberKeyword = 144,
SetKeyword = 145, ObjectKeyword = 145,
StringKeyword = 146, SetKeyword = 146,
SymbolKeyword = 147, StringKeyword = 147,
TypeKeyword = 148, SymbolKeyword = 148,
UndefinedKeyword = 149, TypeKeyword = 149,
UniqueKeyword = 150, UndefinedKeyword = 150,
UnknownKeyword = 151, UniqueKeyword = 151,
FromKeyword = 152, UnknownKeyword = 152,
GlobalKeyword = 153, FromKeyword = 153,
BigIntKeyword = 154, GlobalKeyword = 154,
OfKeyword = 155, BigIntKeyword = 155,
QualifiedName = 156, OfKeyword = 156,
ComputedPropertyName = 157, QualifiedName = 157,
TypeParameter = 158, ComputedPropertyName = 158,
Parameter = 159, TypeParameter = 159,
Decorator = 160, Parameter = 160,
PropertySignature = 161, Decorator = 161,
PropertyDeclaration = 162, PropertySignature = 162,
MethodSignature = 163, PropertyDeclaration = 163,
MethodDeclaration = 164, MethodSignature = 164,
Constructor = 165, MethodDeclaration = 165,
GetAccessor = 166, Constructor = 166,
SetAccessor = 167, GetAccessor = 167,
CallSignature = 168, SetAccessor = 168,
ConstructSignature = 169, CallSignature = 169,
IndexSignature = 170, ConstructSignature = 170,
TypePredicate = 171, IndexSignature = 171,
TypeReference = 172, TypePredicate = 172,
FunctionType = 173, TypeReference = 173,
ConstructorType = 174, FunctionType = 174,
TypeQuery = 175, ConstructorType = 175,
TypeLiteral = 176, TypeQuery = 176,
ArrayType = 177, TypeLiteral = 177,
TupleType = 178, ArrayType = 178,
OptionalType = 179, TupleType = 179,
RestType = 180, OptionalType = 180,
UnionType = 181, RestType = 181,
IntersectionType = 182, UnionType = 182,
ConditionalType = 183, IntersectionType = 183,
InferType = 184, ConditionalType = 184,
ParenthesizedType = 185, InferType = 185,
ThisType = 186, ParenthesizedType = 186,
TypeOperator = 187, ThisType = 187,
IndexedAccessType = 188, TypeOperator = 188,
MappedType = 189, IndexedAccessType = 189,
LiteralType = 190, MappedType = 190,
NamedTupleMember = 191, LiteralType = 191,
ImportType = 192, NamedTupleMember = 192,
ObjectBindingPattern = 193, TemplateLiteralType = 193,
ArrayBindingPattern = 194, TemplateLiteralTypeSpan = 194,
BindingElement = 195, ImportType = 195,
ArrayLiteralExpression = 196, ObjectBindingPattern = 196,
ObjectLiteralExpression = 197, ArrayBindingPattern = 197,
PropertyAccessExpression = 198, BindingElement = 198,
ElementAccessExpression = 199, ArrayLiteralExpression = 199,
CallExpression = 200, ObjectLiteralExpression = 200,
NewExpression = 201, PropertyAccessExpression = 201,
TaggedTemplateExpression = 202, ElementAccessExpression = 202,
TypeAssertionExpression = 203, CallExpression = 203,
ParenthesizedExpression = 204, NewExpression = 204,
FunctionExpression = 205, TaggedTemplateExpression = 205,
ArrowFunction = 206, TypeAssertionExpression = 206,
DeleteExpression = 207, ParenthesizedExpression = 207,
TypeOfExpression = 208, FunctionExpression = 208,
VoidExpression = 209, ArrowFunction = 209,
AwaitExpression = 210, DeleteExpression = 210,
PrefixUnaryExpression = 211, TypeOfExpression = 211,
PostfixUnaryExpression = 212, VoidExpression = 212,
BinaryExpression = 213, AwaitExpression = 213,
ConditionalExpression = 214, PrefixUnaryExpression = 214,
TemplateExpression = 215, PostfixUnaryExpression = 215,
YieldExpression = 216, BinaryExpression = 216,
SpreadElement = 217, ConditionalExpression = 217,
ClassExpression = 218, TemplateExpression = 218,
OmittedExpression = 219, YieldExpression = 219,
ExpressionWithTypeArguments = 220, SpreadElement = 220,
AsExpression = 221, ClassExpression = 221,
NonNullExpression = 222, OmittedExpression = 222,
MetaProperty = 223, ExpressionWithTypeArguments = 223,
SyntheticExpression = 224, AsExpression = 224,
TemplateSpan = 225, NonNullExpression = 225,
SemicolonClassElement = 226, MetaProperty = 226,
Block = 227, SyntheticExpression = 227,
EmptyStatement = 228, TemplateSpan = 228,
VariableStatement = 229, SemicolonClassElement = 229,
ExpressionStatement = 230, Block = 230,
IfStatement = 231, EmptyStatement = 231,
DoStatement = 232, VariableStatement = 232,
WhileStatement = 233, ExpressionStatement = 233,
ForStatement = 234, IfStatement = 234,
ForInStatement = 235, DoStatement = 235,
ForOfStatement = 236, WhileStatement = 236,
ContinueStatement = 237, ForStatement = 237,
BreakStatement = 238, ForInStatement = 238,
ReturnStatement = 239, ForOfStatement = 239,
WithStatement = 240, ContinueStatement = 240,
SwitchStatement = 241, BreakStatement = 241,
LabeledStatement = 242, ReturnStatement = 242,
ThrowStatement = 243, WithStatement = 243,
TryStatement = 244, SwitchStatement = 244,
DebuggerStatement = 245, LabeledStatement = 245,
VariableDeclaration = 246, ThrowStatement = 246,
VariableDeclarationList = 247, TryStatement = 247,
FunctionDeclaration = 248, DebuggerStatement = 248,
ClassDeclaration = 249, VariableDeclaration = 249,
InterfaceDeclaration = 250, VariableDeclarationList = 250,
TypeAliasDeclaration = 251, FunctionDeclaration = 251,
EnumDeclaration = 252, ClassDeclaration = 252,
ModuleDeclaration = 253, InterfaceDeclaration = 253,
ModuleBlock = 254, TypeAliasDeclaration = 254,
CaseBlock = 255, EnumDeclaration = 255,
NamespaceExportDeclaration = 256, ModuleDeclaration = 256,
ImportEqualsDeclaration = 257, ModuleBlock = 257,
ImportDeclaration = 258, CaseBlock = 258,
ImportClause = 259, NamespaceExportDeclaration = 259,
NamespaceImport = 260, ImportEqualsDeclaration = 260,
NamedImports = 261, ImportDeclaration = 261,
ImportSpecifier = 262, ImportClause = 262,
ExportAssignment = 263, NamespaceImport = 263,
ExportDeclaration = 264, NamedImports = 264,
NamedExports = 265, ImportSpecifier = 265,
NamespaceExport = 266, ExportAssignment = 266,
ExportSpecifier = 267, ExportDeclaration = 267,
MissingDeclaration = 268, NamedExports = 268,
ExternalModuleReference = 269, NamespaceExport = 269,
JsxElement = 270, ExportSpecifier = 270,
JsxSelfClosingElement = 271, MissingDeclaration = 271,
JsxOpeningElement = 272, ExternalModuleReference = 272,
JsxClosingElement = 273, JsxElement = 273,
JsxFragment = 274, JsxSelfClosingElement = 274,
JsxOpeningFragment = 275, JsxOpeningElement = 275,
JsxClosingFragment = 276, JsxClosingElement = 276,
JsxAttribute = 277, JsxFragment = 277,
JsxAttributes = 278, JsxOpeningFragment = 278,
JsxSpreadAttribute = 279, JsxClosingFragment = 279,
JsxExpression = 280, JsxAttribute = 280,
CaseClause = 281, JsxAttributes = 281,
DefaultClause = 282, JsxSpreadAttribute = 282,
HeritageClause = 283, JsxExpression = 283,
CatchClause = 284, CaseClause = 284,
PropertyAssignment = 285, DefaultClause = 285,
ShorthandPropertyAssignment = 286, HeritageClause = 286,
SpreadAssignment = 287, CatchClause = 287,
EnumMember = 288, PropertyAssignment = 288,
UnparsedPrologue = 289, ShorthandPropertyAssignment = 289,
UnparsedPrepend = 290, SpreadAssignment = 290,
UnparsedText = 291, EnumMember = 291,
UnparsedInternalText = 292, UnparsedPrologue = 292,
UnparsedSyntheticReference = 293, UnparsedPrepend = 293,
SourceFile = 294, UnparsedText = 294,
Bundle = 295, UnparsedInternalText = 295,
UnparsedSource = 296, UnparsedSyntheticReference = 296,
InputFiles = 297, SourceFile = 297,
JSDocTypeExpression = 298, Bundle = 298,
JSDocAllType = 299, UnparsedSource = 299,
JSDocUnknownType = 300, InputFiles = 300,
JSDocNullableType = 301, JSDocTypeExpression = 301,
JSDocNonNullableType = 302, JSDocNameReference = 302,
JSDocOptionalType = 303, JSDocAllType = 303,
JSDocFunctionType = 304, JSDocUnknownType = 304,
JSDocVariadicType = 305, JSDocNullableType = 305,
JSDocNamepathType = 306, JSDocNonNullableType = 306,
JSDocComment = 307, JSDocOptionalType = 307,
JSDocTypeLiteral = 308, JSDocFunctionType = 308,
JSDocSignature = 309, JSDocVariadicType = 309,
JSDocTag = 310, JSDocNamepathType = 310,
JSDocAugmentsTag = 311, JSDocComment = 311,
JSDocImplementsTag = 312, JSDocTypeLiteral = 312,
JSDocAuthorTag = 313, JSDocSignature = 313,
JSDocDeprecatedTag = 314, JSDocTag = 314,
JSDocClassTag = 315, JSDocAugmentsTag = 315,
JSDocPublicTag = 316, JSDocImplementsTag = 316,
JSDocPrivateTag = 317, JSDocAuthorTag = 317,
JSDocProtectedTag = 318, JSDocDeprecatedTag = 318,
JSDocReadonlyTag = 319, JSDocClassTag = 319,
JSDocCallbackTag = 320, JSDocPublicTag = 320,
JSDocEnumTag = 321, JSDocPrivateTag = 321,
JSDocParameterTag = 322, JSDocProtectedTag = 322,
JSDocReturnTag = 323, JSDocReadonlyTag = 323,
JSDocThisTag = 324, JSDocCallbackTag = 324,
JSDocTypeTag = 325, JSDocEnumTag = 325,
JSDocTemplateTag = 326, JSDocParameterTag = 326,
JSDocTypedefTag = 327, JSDocReturnTag = 327,
JSDocPropertyTag = 328, JSDocThisTag = 328,
SyntaxList = 329, JSDocTypeTag = 329,
NotEmittedStatement = 330, JSDocTemplateTag = 330,
PartiallyEmittedExpression = 331, JSDocTypedefTag = 331,
CommaListExpression = 332, JSDocSeeTag = 332,
MergeDeclarationMarker = 333, JSDocPropertyTag = 333,
EndOfDeclarationMarker = 334, SyntaxList = 334,
SyntheticReferenceExpression = 335, NotEmittedStatement = 335,
Count = 336, PartiallyEmittedExpression = 336,
CommaListExpression = 337,
MergeDeclarationMarker = 338,
EndOfDeclarationMarker = 339,
SyntheticReferenceExpression = 340,
Count = 341,
FirstAssignment = 62, FirstAssignment = 62,
LastAssignment = 77, LastAssignment = 77,
FirstCompoundAssignment = 63, FirstCompoundAssignment = 63,
@ -451,15 +456,15 @@ declare namespace ts {
FirstReservedWord = 80, FirstReservedWord = 80,
LastReservedWord = 115, LastReservedWord = 115,
FirstKeyword = 80, FirstKeyword = 80,
LastKeyword = 155, LastKeyword = 156,
FirstFutureReservedWord = 116, FirstFutureReservedWord = 116,
LastFutureReservedWord = 124, LastFutureReservedWord = 124,
FirstTypeNode = 171, FirstTypeNode = 172,
LastTypeNode = 192, LastTypeNode = 195,
FirstPunctuation = 18, FirstPunctuation = 18,
LastPunctuation = 77, LastPunctuation = 77,
FirstToken = 0, FirstToken = 0,
LastToken = 155, LastToken = 156,
FirstTriviaToken = 2, FirstTriviaToken = 2,
LastTriviaToken = 7, LastTriviaToken = 7,
FirstLiteralToken = 8, FirstLiteralToken = 8,
@ -468,21 +473,21 @@ declare namespace ts {
LastTemplateToken = 17, LastTemplateToken = 17,
FirstBinaryOperator = 29, FirstBinaryOperator = 29,
LastBinaryOperator = 77, LastBinaryOperator = 77,
FirstStatement = 229, FirstStatement = 232,
LastStatement = 245, LastStatement = 248,
FirstNode = 156, FirstNode = 157,
FirstJSDocNode = 298, FirstJSDocNode = 301,
LastJSDocNode = 328, LastJSDocNode = 333,
FirstJSDocTagNode = 310, FirstJSDocTagNode = 314,
LastJSDocTagNode = 328, LastJSDocTagNode = 333,
} }
export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail;
export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken;
export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword;
export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.StaticKeyword; export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.StaticKeyword;
export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword;
export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind;
export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind; export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind;
@ -613,7 +618,8 @@ declare namespace ts {
None = 0, None = 0,
ReservedInNestedScopes = 8, ReservedInNestedScopes = 8,
Optimistic = 16, Optimistic = 16,
FileLevel = 32 FileLevel = 32,
AllowNameSubstitution = 64
} }
export interface Identifier extends PrimaryExpression, Declaration { export interface Identifier extends PrimaryExpression, Declaration {
readonly kind: SyntaxKind.Identifier; readonly kind: SyntaxKind.Identifier;
@ -945,6 +951,7 @@ declare namespace ts {
readonly kind: SyntaxKind.MappedType; readonly kind: SyntaxKind.MappedType;
readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken; readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
readonly typeParameter: TypeParameterDeclaration; readonly typeParameter: TypeParameterDeclaration;
readonly nameType?: TypeNode;
readonly questionToken?: QuestionToken | PlusToken | MinusToken; readonly questionToken?: QuestionToken | PlusToken | MinusToken;
readonly type?: TypeNode; readonly type?: TypeNode;
} }
@ -957,6 +964,17 @@ declare namespace ts {
} }
export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral;
export interface TemplateLiteralTypeNode extends TypeNode {
kind: SyntaxKind.TemplateLiteralType;
readonly head: TemplateHead;
readonly templateSpans: NodeArray<TemplateLiteralTypeSpan>;
}
export interface TemplateLiteralTypeSpan extends TypeNode {
readonly kind: SyntaxKind.TemplateLiteralTypeSpan;
readonly parent: TemplateLiteralTypeNode;
readonly type: TypeNode;
readonly literal: TemplateMiddle | TemplateTail;
}
export interface Expression extends Node { export interface Expression extends Node {
_expressionBrand: any; _expressionBrand: any;
} }
@ -1145,15 +1163,15 @@ declare namespace ts {
export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral;
export interface TemplateHead extends TemplateLiteralLikeNode { export interface TemplateHead extends TemplateLiteralLikeNode {
readonly kind: SyntaxKind.TemplateHead; readonly kind: SyntaxKind.TemplateHead;
readonly parent: TemplateExpression; readonly parent: TemplateExpression | TemplateLiteralTypeNode;
} }
export interface TemplateMiddle extends TemplateLiteralLikeNode { export interface TemplateMiddle extends TemplateLiteralLikeNode {
readonly kind: SyntaxKind.TemplateMiddle; readonly kind: SyntaxKind.TemplateMiddle;
readonly parent: TemplateSpan; readonly parent: TemplateSpan | TemplateLiteralTypeSpan;
} }
export interface TemplateTail extends TemplateLiteralLikeNode { export interface TemplateTail extends TemplateLiteralLikeNode {
readonly kind: SyntaxKind.TemplateTail; readonly kind: SyntaxKind.TemplateTail;
readonly parent: TemplateSpan; readonly parent: TemplateSpan | TemplateLiteralTypeSpan;
} }
export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail;
export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken;
@ -1685,6 +1703,10 @@ declare namespace ts {
readonly kind: SyntaxKind.JSDocTypeExpression; readonly kind: SyntaxKind.JSDocTypeExpression;
readonly type: TypeNode; readonly type: TypeNode;
} }
export interface JSDocNameReference extends Node {
readonly kind: SyntaxKind.JSDocNameReference;
readonly name: EntityName;
}
export interface JSDocType extends TypeNode { export interface JSDocType extends TypeNode {
_jsDocTypeBrand: any; _jsDocTypeBrand: any;
} }
@ -1783,6 +1805,10 @@ declare namespace ts {
readonly constraint: JSDocTypeExpression | undefined; readonly constraint: JSDocTypeExpression | undefined;
readonly typeParameters: NodeArray<TypeParameterDeclaration>; readonly typeParameters: NodeArray<TypeParameterDeclaration>;
} }
export interface JSDocSeeTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocSeeTag;
readonly name?: JSDocNameReference;
}
export interface JSDocReturnTag extends JSDocTag { export interface JSDocReturnTag extends JSDocTag {
readonly kind: SyntaxKind.JSDocReturnTag; readonly kind: SyntaxKind.JSDocReturnTag;
readonly typeExpression?: JSDocTypeExpression; readonly typeExpression?: JSDocTypeExpression;
@ -2056,6 +2082,7 @@ declare namespace ts {
* Gets a type checker that can be used to semantically analyze source files in the program. * Gets a type checker that can be used to semantically analyze source files in the program.
*/ */
getTypeChecker(): TypeChecker; getTypeChecker(): TypeChecker;
getTypeCatalog(): readonly Type[];
getNodeCount(): number; getNodeCount(): number;
getIdentifierCount(): number; getIdentifierCount(): number;
getSymbolCount(): number; getSymbolCount(): number;
@ -2162,7 +2189,7 @@ declare namespace ts {
* This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.
*/ */
getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined; getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined; getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined;
/** /**
* If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol.
* Otherwise returns its input. * Otherwise returns its input.
@ -2183,6 +2210,7 @@ declare namespace ts {
getFullyQualifiedName(symbol: Symbol): string; getFullyQualifiedName(symbol: Symbol): string;
getAugmentedPropertiesOfType(type: Type): Symbol[]; getAugmentedPropertiesOfType(type: Type): Symbol[];
getRootSymbols(symbol: Symbol): readonly Symbol[]; getRootSymbols(symbol: Symbol): readonly Symbol[];
getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined;
getContextualType(node: Expression): Type | undefined; getContextualType(node: Expression): Type | undefined;
/** /**
* returns unknownSignature in the case of an error. * returns unknownSignature in the case of an error.
@ -2453,11 +2481,13 @@ declare namespace ts {
Conditional = 16777216, Conditional = 16777216,
Substitution = 33554432, Substitution = 33554432,
NonPrimitive = 67108864, NonPrimitive = 67108864,
TemplateLiteral = 134217728,
StringMapping = 268435456,
Literal = 2944, Literal = 2944,
Unit = 109440, Unit = 109440,
StringOrNumberLiteral = 384, StringOrNumberLiteral = 384,
PossiblyFalsy = 117724, PossiblyFalsy = 117724,
StringLike = 132, StringLike = 402653316,
NumberLike = 296, NumberLike = 296,
BigIntLike = 2112, BigIntLike = 2112,
BooleanLike = 528, BooleanLike = 528,
@ -2468,10 +2498,10 @@ declare namespace ts {
StructuredType = 3670016, StructuredType = 3670016,
TypeVariable = 8650752, TypeVariable = 8650752,
InstantiableNonPrimitive = 58982400, InstantiableNonPrimitive = 58982400,
InstantiablePrimitive = 4194304, InstantiablePrimitive = 406847488,
Instantiable = 63176704, Instantiable = 465829888,
StructuredOrInstantiable = 66846720, StructuredOrInstantiable = 469499904,
Narrowable = 133970943, Narrowable = 536624127,
} }
export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
export interface Type { export interface Type {
@ -2608,8 +2638,6 @@ declare namespace ts {
node: ConditionalTypeNode; node: ConditionalTypeNode;
checkType: Type; checkType: Type;
extendsType: Type; extendsType: Type;
trueType: Type;
falseType: Type;
isDistributive: boolean; isDistributive: boolean;
inferTypeParameters?: TypeParameter[]; inferTypeParameters?: TypeParameter[];
outerTypeParameters?: TypeParameter[]; outerTypeParameters?: TypeParameter[];
@ -2624,6 +2652,14 @@ declare namespace ts {
resolvedTrueType: Type; resolvedTrueType: Type;
resolvedFalseType: Type; resolvedFalseType: Type;
} }
export interface TemplateLiteralType extends InstantiableType {
texts: readonly string[];
types: readonly Type[];
}
export interface StringMappingType extends InstantiableType {
symbol: Symbol;
type: Type;
}
export interface SubstitutionType extends InstantiableType { export interface SubstitutionType extends InstantiableType {
baseType: Type; baseType: Type;
substitute: Type; substitute: Type;
@ -2801,6 +2837,7 @@ declare namespace ts {
assumeChangesOnlyAffectDirectDependencies?: boolean; assumeChangesOnlyAffectDirectDependencies?: boolean;
noLib?: boolean; noLib?: boolean;
noResolve?: boolean; noResolve?: boolean;
noUncheckedIndexedAccess?: boolean;
out?: string; out?: string;
outDir?: string; outDir?: string;
outFile?: string; outFile?: string;
@ -2811,6 +2848,7 @@ declare namespace ts {
reactNamespace?: string; reactNamespace?: string;
jsxFactory?: string; jsxFactory?: string;
jsxFragmentFactory?: string; jsxFragmentFactory?: string;
jsxImportSource?: string;
composite?: boolean; composite?: boolean;
incremental?: boolean; incremental?: boolean;
tsBuildInfoFile?: string; tsBuildInfoFile?: string;
@ -2855,7 +2893,8 @@ declare namespace ts {
enable?: boolean; enable?: boolean;
include?: string[]; include?: string[];
exclude?: string[]; exclude?: string[];
[option: string]: string[] | boolean | undefined; disableFilenameBasedTypeAcquisition?: boolean;
[option: string]: CompilerOptionsValue | undefined;
} }
export enum ModuleKind { export enum ModuleKind {
None = 0, None = 0,
@ -2871,7 +2910,9 @@ declare namespace ts {
None = 0, None = 0,
Preserve = 1, Preserve = 1,
React = 2, React = 2,
ReactNative = 3 ReactNative = 3,
ReactJSX = 4,
ReactJSXDev = 5
} }
export enum ImportsNotUsedAsValues { export enum ImportsNotUsedAsValues {
Remove = 0, Remove = 0,
@ -3181,6 +3222,8 @@ declare namespace ts {
updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration; updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan;
createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>; createKeywordTypeNode<TKind extends KeywordTypeSyntaxKind>(kind: TKind): KeywordTypeNode<TKind>;
createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
@ -3221,10 +3264,12 @@ declare namespace ts {
updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode;
createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode;
updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode;
createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern;
updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern;
createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
@ -3404,6 +3449,8 @@ declare namespace ts {
updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType;
createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression;
updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression;
createJSDocNameReference(name: EntityName): JSDocNameReference;
updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference;
createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral;
updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral;
createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature;
@ -3418,6 +3465,8 @@ declare namespace ts {
updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag; updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag;
createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag; createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag;
updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag; updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag;
createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag;
updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag;
createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag; createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag;
updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag; updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag;
createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag; createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag;
@ -4005,6 +4054,14 @@ declare namespace ts {
function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T; function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
function getOriginalNode(node: Node | undefined): Node | undefined; function getOriginalNode(node: Node | undefined): Node | undefined;
function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined;
/**
* Iterates through the parent chain of a node and performs the callback on each parent until the callback
* returns a truthy value, then returns that value.
* If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit"
* At that point findAncestor returns undefined.
*/
function findAncestor<T extends Node>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined;
function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined;
/** /**
* Gets a value indicating whether a node originated in the parse tree. * Gets a value indicating whether a node originated in the parse tree.
* *
@ -4323,6 +4380,8 @@ declare namespace ts {
function isMappedTypeNode(node: Node): node is MappedTypeNode; function isMappedTypeNode(node: Node): node is MappedTypeNode;
function isLiteralTypeNode(node: Node): node is LiteralTypeNode; function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
function isImportTypeNode(node: Node): node is ImportTypeNode; function isImportTypeNode(node: Node): node is ImportTypeNode;
function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan;
function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode;
function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
function isBindingElement(node: Node): node is BindingElement; function isBindingElement(node: Node): node is BindingElement;
@ -4427,6 +4486,7 @@ declare namespace ts {
function isBundle(node: Node): node is Bundle; function isBundle(node: Node): node is Bundle;
function isUnparsedSource(node: Node): node is UnparsedSource; function isUnparsedSource(node: Node): node is UnparsedSource;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocNameReference(node: Node): node is JSDocNameReference;
function isJSDocAllType(node: Node): node is JSDocAllType; function isJSDocAllType(node: Node): node is JSDocAllType;
function isJSDocUnknownType(node: Node): node is JSDocUnknownType; function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
function isJSDocNullableType(node: Node): node is JSDocNullableType; function isJSDocNullableType(node: Node): node is JSDocNullableType;
@ -5360,6 +5420,10 @@ declare namespace ts {
type WithMetadata<T> = T & { type WithMetadata<T> = T & {
metadata?: unknown; metadata?: unknown;
}; };
enum SemanticClassificationFormat {
Original = "original",
TwentyTwenty = "2020"
}
interface LanguageService { interface LanguageService {
/** This is used as a part of restarting the language service. */ /** This is used as a part of restarting the language service. */
cleanupSemanticCache(): void; cleanupSemanticCache(): void;
@ -5411,10 +5475,22 @@ declare namespace ts {
getCompilerOptionsDiagnostics(): Diagnostic[]; getCompilerOptionsDiagnostics(): Diagnostic[];
/** @deprecated Use getEncodedSyntacticClassifications instead. */ /** @deprecated Use getEncodedSyntacticClassifications instead. */
getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
/** @deprecated Use getEncodedSemanticClassifications instead. */ /** @deprecated Use getEncodedSemanticClassifications instead. */
getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
/** Encoded as triples of [start, length, ClassificationType]. */
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; /**
* Gets semantic highlights information for a particular file. Has two formats, an older
* version used by VS and a format used by VS Code.
*
* @param fileName The path to the file
* @param position A text span to return results within
* @param format Which format to use, defaults to "original"
* @returns a number array encoded as triples of [start, length, ClassificationType, ...].
*/
getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications;
/** /**
* Gets completion entries at a particular position in a file. * Gets completion entries at a particular position in a file.
* *
@ -5573,6 +5649,10 @@ declare namespace ts {
textSpan: TextSpan; textSpan: TextSpan;
classificationType: ClassificationTypeNames; classificationType: ClassificationTypeNames;
} }
interface ClassifiedSpan2020 {
textSpan: TextSpan;
classificationType: number;
}
/** /**
* Navigation bar interface designed for visual studio's dual-column layout. * Navigation bar interface designed for visual studio's dual-column layout.
* This does not form a proper tree. * This does not form a proper tree.
@ -5969,6 +6049,12 @@ declare namespace ts {
/** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
isGlobalCompletion: boolean; isGlobalCompletion: boolean;
isMemberCompletion: boolean; isMemberCompletion: boolean;
/**
* In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use
* this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span
* must be used to commit that completion entry.
*/
optionalReplacementSpan?: TextSpan;
/** /**
* true when the current location also allows for a new identifier * true when the current location also allows for a new identifier
*/ */
@ -6512,9 +6598,9 @@ declare namespace ts {
/** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */
const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode;
/** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */
const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode;
/** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */
const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode;
/** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */
const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode;
/** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */

File diff suppressed because it is too large Load Diff

@ -2,4 +2,4 @@
// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript` // **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`
// //
export const typescriptVersion = "4.0.3"; export const typescriptVersion = "4.1.3";

Loading…
Cancel
Save